feat(makefile): plugin resolver and lockfile (Story 13.3)#34
Merged
matthew-on-git merged 1 commit intomainfrom May 3, 2026
Merged
feat(makefile): plugin resolver and lockfile (Story 13.3)#34matthew-on-git merged 1 commit intomainfrom
matthew-on-git merged 1 commit intomainfrom
Conversation
Implements `make plugins-update` and `_plugins-verify` for the v1.10.x plugin architecture. Builds on Story 13.2's loader + review fixes. Components: - scripts/plugin-resolver.sh — for each plugin in `.devrail.yml`, resolve `rev:` to an immutable SHA via `git ls-remote`, fetch the tree to the rev-aware cache path Story 13.2's loader reads, compute deterministic content_hash, and write `.devrail.lock` atomically. Branch refs are rejected; SHA passthrough for 40-char hex; tag-to-SHA via ls-remote (peeled form preferred for annotated tags). Idempotent. - scripts/plugin-lockfile-verify.sh — fast verification used as `_plugins-load` prereq on every `make check`. Detects rev mismatch, missing lockfile, missing cached tree, and tag-rebase tampering. No-op when no plugins declared. - Makefile — new `plugins-update` public + `_plugins-update` and `_plugins-verify` internal targets. `_plugins-load` prereq updated: _check-config → _plugins-verify → _plugins-load. - tests/fixtures/plugin-repos/elixir-v1/ + elixir-v1-tampered/ — fixture trees; harness initialises git per case. - tests/test-plugin-resolver.sh — 11-case smoke covering: SHA passthrough, tag→SHA, branch rejection, lockfile determinism, idempotent fetch, lockfile mismatch, tampering detection, missing lockfile, no-plugins regression, unreachable source, atomic-lockfile. - tests/test-plugin-loader.sh — integration cases now write a matching .devrail.lock via a write_matching_lockfile helper. CI: new "Plugin resolver smoke test" step in ci.yml. Docs: CHANGELOG [Unreleased] Added entry; STABILITY.md row extended. Test results (local against freshly built image): - tests/test-plugin-resolver.sh — 11/11 pass - tests/test-plugin-loader.sh — 11/11 pass (regression-safe) - tests/smoke-rails.sh — 4/4 pass (regression-safe) - make _check on dev-toolchain itself — pass Implementation note: file:// URLs in tests need `-c protocol.file.allow=always` because git 2.38+ blocks the file protocol from non-interactive contexts. Production plugins use https/ssh; only the local-fixture test harness needs the override. Scope boundary: stops at "lockfile written and verified". Build pipeline (13.4) and execution loop (13.5) are out of scope. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements
make plugins-updateand_plugins-verifyfor the v1.10.x plugin architecture. Builds on Story 13.2's loader (PR #31, v1.10.0) + review fixes (PR #33, v1.10.1).What's in the PR
`scripts/plugin-resolver.sh`
For each plugin in `.devrail.yml`:
`scripts/plugin-lockfile-verify.sh`
Fast verification used as `_plugins-load` prereq on every `make check`:
Makefile
Fixtures + tests
Acceptance criteria from Story 13.3
Test plan
Implementation note
git 2.38+ blocks the `file://` protocol from non-interactive contexts (CVE-2022-39253 mitigation). Resolver passes `-c protocol.file.allow=always` to `ls-remote`/`fetch`/`remote add`. Production plugins use `https://` or `ssh://` and aren't affected; only the local-fixture test harness exercises this code path.
Out of scope (next stories)
🤖 Generated with Claude Code