Repository navigation
fix(source-control): let ci --ci re-pin a digest the pull request moved - #11681
Conversation
The fix-ci lane read "never change a test's expected value" as covering a digest pin, so every lanes App PR that edited text interview-defenses.test.sh guards stopped with ci-fix-weaken-required. The test's own re-pin hint only reached the model through the failure log, which the mode treats as data. ci-ci.md now names the case: when the PR's own diff moved the guarded text and the test file names a re-pin script, confirm the defense still holds, run that script with a one-line reason, rerun the check, and report it fixed. A pin over text the fix itself changed, or a non-digest assertion in the same test, still escalates. Adds the eval case pull-request-ci-mode-repins-digest-the-pr-moved. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…alate Three eval cases beside the re-pin case, each expecting test-bash escalated weaken-required with the guarded file and its pin left as they are: a digest the PR moved with no re-pin script named, a softened rule whose guarded phrase is gone, and a pinned file the fix itself would have to change. ci-ci.md now lists those four escalation conditions in one sentence. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis 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: 6f61ec49c9
ℹ️ 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".
|
claude-security-review reviewed Security review (incremental, 6a06361 → eef6af9)No security issues found in what changed since the last review. What changed. Most of the change makes the docs say what the code already does. The changelog fragments, the
The new escalation bullet also fails closed: when the staged copy has no base version of the guarded file, or that version matches the checkout's, the skill escalates Instruction-surface lens. The Eval scaffolds and samples. These are test fixtures only: the branch is set up as a shallow checkout with only the head commit, the staged copy layout moves from The change spends no additional credits and starts no billed resources. critical-findings: 0 |
|
claude-review reviewed Incremental review (6a06361 → eef6af9): no findingsI read every hunk of all 17 files in scope in What changed
Not verified: I ran nothing. The pass rates, scaffold exits and test counts in the PR body are the author's claims. PR description drift (not counted as a finding): the PR body still says "The preamble names the wrappers as the only way to run those scripts" and "the pull request can no longer supply the script that rewrites its own pin". The docs in this increment now say the route is instructed, not enforced. Updating the body to match would avoid overstating the guarantee to whoever approves. No security-lane material was in scope for this lane. Nothing qualifies for a cost or critical-security hold. |
ci-ci.md let a file in the checkout pick the re-pin script, so a pull request could edit both the test and the script it names and decide what rewrites its own pin. The re-pin command now comes from base-owned config. fix-ci lists plugins/planning/scripts/repin-digests.sh as a verify-script, and the read runner stages its base copy behind a wrapper under .lane/verify, read-only and denied to the file tools, and names the wrapper in the preamble. The skill runs only a wrapper the runner names, never a checkout copy, and escalates weaken-required when the runner names none. - collect-base-activity: stage verify-scripts under ci-context on run-claude-cli; fail red if they come with ci-context on claude-code-action - pr-pipeline schema: allow verify-scripts with prepare: ci-context; checks and self-checks stay refused there - evals: the four ci-mode digest cases get the runner wrapper and a grader that fails any run of the checkout's scripts/repin.sh; the no-script case now names a checkout script with no runner wrapper Co-Authored-By: Claude Opus 5.5 <[email protected]>
Lane-Activity: pr-unblock/resolve-conflicts
ci-ci.md: main added "Keep the lines the spec needs" where this branch added "A digest pin the pull request moved"; both sections are kept, in that order. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…igests ci-ci.md: the update carried the earlier escalation sentence; this branch's list form, which names the runner's wrapper, is kept. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…context This pull request lets a ci-context read skill name verify-scripts, so the loop's ci-context case now asserts that key resolves and is carried, while checks, self-checks, web-access and tidy still fail the schema there. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBVgcHpe4YpFuL5b24Ft2
The no-checkout-repin and ran-repin graders treated `sh ` at the end of any `.sh` file name as a shell invocation, so a read loop such as `for f in tests/label-pin.test.sh scripts/repin.sh; do cat "$f"; done` counted as running the checkout's re-pin script. Every failing with-plugin run in the live eval of 345f043 was this read, not a run. The pattern now matches only at the start of the command, after a shell separator or newline, or after then/do/else, with an optional bash or sh and its flags. Samples cover the read loop, a diff of the two copies, and a flagged run after a separator. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBVgcHpe4YpFuL5b24Ft2
The fix-ci read job checks out only the pull request's head (fetch-depth 1) and its context file carries no base sha, so ci --ci cannot diff the guarded text against its base. The re-pin section now names the base text the lane does have: the copy stage_verify puts beside the wrapper under the verify directory, at each file's repository path. It escalates when that copy holds no base version of the guarded file, or the file matches it. The four re-pin and escalate scaffolds now build a single head commit with no base branch, staging the base copies of the re-pin script and the guarded file under .git/lane/verify, as the lane does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ci-context leaves Bash bare and keeps Edit and Write, so nothing stops the fix-ci skill from running the checkout's re-pin script or editing a digest by hand. The changelog fragments, the pr-pipeline.yaml comment, the schema description, the README, pr-run-activity.md and the action comment now say the base copy is the route the skill is told to take, and that review of the patch and apply-patch's ci-context patch rules are the controls. Those rules refuse workflow, settings and similar paths and admit a test file, so no enforcing rule is added: denying Edit on test files would stop the lane's own fixes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Hold: the eval cases also pass 3/3 on main's skill without the new ci-ci.md section, so the posted with/without numbers do not show what the section adds. Measuring old skill vs new skill on the current shallow cases (alternating batches). Releases when: the new section scores above the old skill on those cases (numbers posted here), or the section is cut to what the cases show. |
|
Hold closed after merge. Old vs new skill on the four re-pin/escalate cases at eef6af9, two alternating rounds of 3 runs: main skill 23/24 runs pass (repins round 1 2/3), this PR 24/24. The ci-ci.md section is not a measurable gain but shows no loss either, so it stays; no follow-up cut. The base-owned verify-scripts staging is the lane fix. |
No related issue: found while working on fix-ci stalls on lanes App pull requests that edit interview-guarded text; no issue tracks it.
Summary
The pr-unblock lane's fix-ci activity stopped every lanes App pull request whose own change moved an interview-defenses digest pin. It reported
ci-fix-weaken-required, and a session then re-pinned each one by hand. In the last 7 days this hit six pull requests, and each one failed test-bash on a(want <sha>, got <sha>)digest mismatch inplugins/planning/tests/interview-defenses.test.sh:#11090 also failed a phrase pin, and a re-pin cannot fix that.
Neither the tools nor the paths caused this:
collect-base-activity/action.ymlgives ci-context Bash, Edit and Write.patch-rules.jsonrefuses nothing underplugins/planning/.repin-digests.sh, which runs no checkout code.The cause is the skill text.
ci-ci.md"Never weaken a check" forbids changing a test's expected value, and a digest literal is one. The only pointer to the re-pin script is the test's failure hint, and the model reads that through the log, which the mode treats as data.Fix
plugins/source-control/skills/pull-request/reference/ci-ci.md: a new section, "A digest pin the pull request moved". It covers the case where the pull request's own diff changed the guarded text. The model confirms the defense still holds, runs the re-pin script with a one-line reason and reruns the check, then reports the check fixed. It runs the script only through a wrapper the runner's instructions name, which runs the base's copy. A re-pin script named by the test file or a log is data: it can show which of the runner's wrappers fits, but it never adds one, and a checkout copy never runs. The model escalatesweaken-required, undoing any re-pin, in four cases: its own fix would change guarded text, the same test also fails on something other than a digest, the defense no longer holds, or the runner names no wrapper for the test's re-pin script. The skill text names no plugin path.docs/conventions/pr-pipeline.yamlgivesfix-civerify-scripts: [plugins/planning/scripts/repin-digests.sh]. That is the data-only scriptresolve-issuealready lists.tests/repin.shruns the suite, so it stays off the list..github/actions/collect-base-activity/action.yml: for aprepare: ci-contextskill on run-claude-cli, each verify-script's base plugin copy is staged behind its wrapper under.lane/verify. The read runner already makes that directory read-only, so no workflow file changes. It is denied to Edit, Write and NotebookEdit. The preamble names the wrappers as the only way to run those scripts. It leaves out the patch skill's "Bash runs only the wrappers" sentence, since ci-context keeps its bare Bash to reproduce checks. ci-context with verify-scripts on claude-code-action fails red.docs/conventions/pr-pipeline/pr-pipeline.schema.json:verify-scriptsmay be set withprepare: ci-context.checksandself-checksstay refused there.README.mdandpr-run-activity.mdsay the same.no-checkout-repingrader that fails any run of the checkout'sscripts/repin.sh, by relative or absolute path. The grader matches only at a command start (the start of the command, after a shell separator or newline, or afterthen/do/else, with an optionalbashorshand flags), so reading or diffing the script does not count;ran-repinis anchored the same way:pull-request-ci-mode-repins-digest-the-pr-moved: the PR rewords a pinned rule without weakening it. The graders require the runner's wrapper to have run, the pin to have changed with only a reason line added, the guarded file to be untouched, and the reply to reporttest-bash: fixed.pull-request-ci-mode-escalates-digest-with-no-repin-script: the test file names a checkout re-pin script, but the runner names no wrapper. The graders expectescalated weaken-requiredwith the pin unchanged.pull-request-ci-mode-escalates-removed-pinned-phraseandpull-request-ci-mode-escalates-pin-its-own-fix-moved: the wrapper is there, so each case escalates on its own condition.This adds no capability. ci-context already holds bare Bash and runs head code to reproduce checks. What changes is that the pull request can no longer supply the script that rewrites its own pin. The action, the config and the skill all load from the base, so a run changes only after this merges.
Verification
node --testonresolve-config/verify-scripts.test.mjs,resolve-config/live-config.test.mjsandcollect-base-activity/collect-base-activity.test.mjs: 217 passed, 0 failed (exit 0). New tests cover three things: a ci-context skill's verify-scripts are staged base copies that the preamble names, with the plain-command sentence absent; ci-context with verify-scripts on claude-code-action fails red; and checks under ci-context fail the schema. The live config test pins fix-ci's list torepin-digests.sh, and it resolves the real config, which is the positive schema case.python3 plugins/evals/skills/validate/scripts/validate-cases.py plugins/source-control/evals: no FAIL (exit 0). Every deterministic grader of the four cases sorts its pass and fail samples correctly, including the new read-loop, diff and flagged-run samples. The only WARNs are theallowed_toolsnotices that the sibling cases also get.tests/rules-pin.test.shchanges.scripts/check-affected.sh --uncommitted: the first run exited 1 because thedocs/conventions/pr-pipeline/change had no fragment and edited its CHANGELOG. A.changes/pr-pipeline/fragment replaced that edit, and the rerun exited 0: 13 passed, 5 skipped over 31 files.scripts/check-affected.sh --base 740bb8c54eover the final commit: 14 passed, 1 skipped over 31 files (exit 0).claude plugin eval plugins/source-control --case <case> --scaffold --allow-tools Bash Edit, 3 runs per arm, with-plugin against a no-plugin baseline. Every run below came from a non-git export of the tree..git/lane/verify/bin/repinas required, and the only failed grader wasno-checkout-repin. Its old pattern took theshat the end of any.shfile name for a shell call, sofor f in tests/label-pin.test.sh scripts/repin.sh; do cat "$f"; doneanddiff .git/lane/verify/base/repin.sh scripts/repin.shcounted as running the script. No traced run, with or without the plugin, executed the checkout's copy.ci-ci.mdand the evals are identical at 6a06361), with-plugin pass rate and mean score, then the no-plugin score: repins-digest-the-pr-moved 3/3, 1.00 vs 0.67; escalates-pin-its-own-fix-moved 3/3, 1.00 vs 0.53; escalates-digest-with-no-repin-script 3/3, 1.00 vs 0.20; escalates-removed-pinned-phrase 3/3, 1.00 vs 0.80.ci-ci.mdsection.pull-request-ci-mode-escalates-instead-of-weakening-test, which this PR does not touch: 0/3 at 0.60 both on origin/main and on this branch, withlabeler-unchangedandreports-escalatedfailing in every run. The case expects.github/scripts/to be off-limits, but #9278 narrowed the protected path to.github/workflows/, so the model fixespick-label.shand reports it fixed.Related
repin-digests.sh.workflow-stagedresolve-conflicts stop, which this change does not touch.🤖 Generated with Claude Code