Repository navigation
feat(source-control): provision a record's declared prerequisites - #18184
Conversation
Claim commit for the draft pull request; the build follows. Refs: #16683 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RAoAtViDMW2P121uLvSb35
An ecosystem record's requires entry may carry an install object,
{manager: npm, lockfile: <repo-relative path>}, and nothing else. The new
provisioning step, plugins/source-control/scripts/provision-prerequisites.sh,
runs npm ci --ignore-scripts --no-audit --no-fund in the directory of each
declared lockfile and nothing for an entry without install. Its lister,
provision-prerequisites.mjs, reads the records from .claude/ecosystems and
docs/conventions/ecosystems.
worktree-create.sh no longer runs npm ci itself: it calls the step, which
keeps the shared-seed install, so new worktrees install with scripts off and
install no lockfile a record does not declare. This repository's
typescript record declares the root package-lock.json with install, so new
worktrees still get root node_modules.
The check still installs nothing: toolchain's not-run report names the step
beside the hint. The schema gains the install object and its test cases. The
verify-load probe and the adherence experiment now use node_modules/.bin/claude
only when it runs, since a scripts-off install can leave it a stub.
Closes #16683
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RAoAtViDMW2P121uLvSb35
Refs: #16683 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RAoAtViDMW2P121uLvSb35
Refs: #16683 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RAoAtViDMW2P121uLvSb35
… in place Refs: #16683 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RAoAtViDMW2P121uLvSb35
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9cf4b56102
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Lane run report
Run 45057023911, attempt 1
Failed GitHub API callsNo failed call recorded by the run job's scripts. |
|
claude-security-review reviewed Security review: PR #18184 at
|
|
claude-review reviewed Code review (
|
|
The pr-verify verifier failed head What it wrote (35 lines)This pull request leaves the merge queue, and ci-status holds it out while it carries |
… helper's directory - provision-prerequisites.sh hashes npm-shrinkwrap.json into the seed key, so a changed shrinkwrap builds its own seed instead of reusing a stale one. - --cap or --seed-root given last exits 2 with a message instead of looping forever on a failed shift. - worktree-create.sh resolves its own directory once and uses it for every sourced library and helper, so `bash worktree-create.sh` run with no slash in the path finds them and the provisioning step. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RAoAtViDMW2P121uLvSb35
…ontract's next major When no ecosystem record declares any install entry, the provisioning step still installs a root npm-shrinkwrap.json or package-lock.json with the same scripts-off npm ci, and prints one notice naming the lockfile and how to declare it. Any declared install entry, a skipped one included, turns the fallback off. The end condition (the ecosystem-commands contract's next major version, with the legacy-location read) is recorded in the contract's Provisioning section and changelog. The tests "an undeclared lockfile is not installed" (provision step) and "undeclared lockfile: npm is not run" (worktree helper) now assert the fallback, per the owner's decision of 2026-11-22. The worktree helper's no-npm case asserts the exact npm-missing warning and remedy again, and both no-npm cases put node back on PATH alone so they run where node and npm share a directory. A new toolchain test fails if the not-run rules stop naming provision-prerequisites.sh. Refs: #16683 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RAoAtViDMW2P121uLvSb35
The toolchain test no longer checks that source-control's step file exists: a plugin's code never loads a file from a sibling plugin (docs/conventions/architecture/README.md). The toolchain fragment names the new test. Refs: #16683 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RAoAtViDMW2P121uLvSb35
|
Hold lifted. The owner chose "Fallback with end date (Recommended)" for #16683, recorded on the issue (#16683 (comment)). Head 27cbde8 builds that fallback, and all 7 review threads are answered and resolved. This pull request is clear to merge once its gates pass at this head; it merges after #18187. Posted by an agent session. |
Lane run report
Run 45066894747, attempt 1
Failed GitHub API callsNo failed call recorded by the run job's scripts. |
Takes the ecosystem records' move to docs/conventions/ecosystems/ (ecosystem-commands 1.7.0). The provisioning step's contract change becomes 1.8.0 above it. The repository's typescript.yaml install entry moves with the record. The provisioning lister reads the new home first and a legacy .claude/ecosystems/ file only for a name absent there, warning when both exist; its tests and the worktree-create fixture use the new home. Review fixes from the location change: the unattended "write nothing" rule in toolchain check, lint and the resolution ladder also names the legacy .claude/ecosystems/, and code-metrics reference/config.md links the contract's Legacy location section. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RAoAtViDMW2P121uLvSb35
Lane-Activity: pr-unblock/resolve-conflicts
Lane run report
Run 45066894747, attempt 1
Failed GitHub API callsNo failed call recorded by the run job's scripts. |
…es' into feat/16683-provision-prerequisites
Closes #16683
Summary
Adds the provisioning step the issue's 2026-11-21 amendment defines. An ecosystem record's
requiresentry may carryinstall: {manager: npm, lockfile: <repo-relative path>}, and nothing else. A separate step runsnpm ci --ignore-scripts --no-audit --no-fundin that lockfile's directory. The check itself still installs nothing.Fix
Each Done when item, in order:
docs/contracts/ecosystem-commands/ecosystem.schema.jsonadds an optionalinstallobject on a prerequisite:additionalProperties: false,managerlimited tonpm, and a requiredlockfilethat must be a repo-relativepackage-lock.jsonornpm-shrinkwrap.json.examples.test.shadds one accepted case and five rejected ones: an extra key, a manager other than npm, no lockfile, a..path and an absolute path. The contract README gains a "Provisioning" section, and the contract CHANGELOG gains 1.8.0, above the 1.7.0 location change from feat(ecosystems): move ecosystem records to docs/conventions/ecosystems #18187.plugins/source-control/scripts/provision-prerequisites.shtakes its list fromprovision-prerequisites.mjs listand runs the npm command in each declared lockfile's directory. An entry withoutinstallgets nothing. The shared-seed install moved here from the worktree helper, and the seed key now includes the npm command, so seeds built with scripts on are not reused.docs/conventions/ecosystems/typescript.yamldeclares the rootpackage-lock.jsonundercheck-cmdwithinstall. This is one added hunk.worktree-create.shhas nonpm ciof its own and calls the step.skills/worktree/context/create.mddescribes that path with scripts off.worktree-create.test.sh"lockfile: node_modules/.bin lands in the new worktree" creates a real worktree from a repo whose committed record declares its lockfile. The step installs it with no manual command. Inprovision-prerequisites.test.sh, the entry's probe passes after the step runs.provision-prerequisites.test.shshows the failure path: the install fails, the step exits 1 and names the entry and the command, and the entry's probe still reports absent. A model-run skill writes theskip (prerequisite missing: <name>)cell itself, so no deterministic test can show it. The existing evalplugins/toolchain/evals/ck-prerequisite-missing-incompletecovers that cell; it was not run for this change. Neither toolchain skill runs the step.toolchain:check, its gates context andtoolchain:lintnamesprovision-prerequisites.shbeside the hint.Other changes:
node_modules/.bin/claudeas an executable stub that does not run. Soverify-load.test.shandadherence-experiment.shnow use that path only when--versionruns, and fall back toclaudeon PATH otherwise.package-lock.jsonthat no record declares. This follows the decision ("installing only what records' requires entries name"), and the source-control changelog fragment says so.check-cmd. No typescript command strictly needs the root install, since biome runs only inplugins/miro/server, which has its ownnode_modules. So any key carries the same cost: in a clone without rootnode_modules, every typescriptcheck-cmdreads skip.check-cmdis the command whose tool, biome, the root lockfile provides. Basis: judgment,package.jsondevDependencies.worktree-create.sh(9 lines, 2 of them stale aboutnpm ci) was deleted instead of edited, along with the new block's comments. The helper's--helptext still documents dependency install. Basis: thecode-tidying-remote-comment-lintpre-commit output.install.docs/conventions/ecosystems/first and a legacy.claude/ecosystems/file only for a name absent there, warning with both paths when both exist, as the contract's "Legacy location" section and feat(ecosystems): move ecosystem records to docs/conventions/ecosystems #18187's readers do.toolchain:check(SKILL.md),toolchain:lint(SKILL.md) andplugins/toolchain/reference/resolution-ladder.mdnow names the legacy.claude/ecosystems/besidedocs/conventions/ecosystems/, matching the graders ofck-unattended-stated-unresolvedandck-unsure-run-is-unattended; andplugins/code-metrics/reference/config.mdlinks the contract's "Legacy location" section.No change under
.github/workflows/. The amendment takes the CI setup step and the CI cache out of this issue's Done when list, and it leaves CI's "Install the locked root toolchain" step outside the provisioning step.Verification
bash plugins/source-control/scripts/provision-prerequisites.test.sh: 45 passed, including a legacy-location record read when the new home lacks that name, and a shadowed legacy record not read and named in a warning.bash plugins/source-control/scripts/worktree-create.test.shon the final tree: 404 passed, 1 skipped (Windows-only). This includes the declared-lockfile, undeclared-lockfile, seed and scripts-off cases.scripts/check-affected.sh --base <merged main>: 21 passed, 1 skipped, over 24 changed files.bash plugins/toolchain/tests/not-run-names-provisioning-step.test.sh: 7 passed.scripts/sync-shared-copies.sh --check: all registered copies match.scripts/check-changelog-fragments.sh --check-required: every changed fragment-mode plugin (4) has a fragment.node_modules/.bin/claude --versionin a worktree installed with scripts on prints2.1.329 (Claude Code), so the verify-load change still picks the root binary there.scripts/check-read-caller-keys.sh --check, which needs.github/standards/runner-policy's packages installed locally. CI runs it.bash docs/contracts/ecosystem-commands/examples.test.sh: 16 passed.check-jsonschemavalidates the editeddocs/conventions/ecosystems/typescript.yamlagainst the new schema.shellcheckis clean on every changed shell file.scripts/selection-audit.sh trace --stricton the new suite and onworktree-create.test.sh: no gap.verify-load.test.shwas not run, because it starts a Claude session.Related
docs/conventions/ecosystems/. The step keeps the per-file legacy read until the cross-repo migration retires it.🤖 Generated with Claude Code
https://claude.ai/code/session_01RAoAtViDMW2P121uLvSb35