Repository navigation
fix(pr-pipeline): hold an apply-patch push on a body Hold: line - #10300
Conversation
held() for the pr target now treats a pull request the lanes App did not open as held when its body matches merge-holds.mjs BODY_HOLD (a Hold: line in any case after any whitespace, NBSP included, a bare CR ending a line, or "do not merge"). On the lanes App's own PR that line holds the merge, not a fix, so it does not stop the push. Every pr-target push reads it. The lanes App login is one export of merge-holds.mjs, which stays import-free; clear-escalations.mjs and refire-refused.mjs read it in place of their own literals. The write runner's "Copy the apply-patch base files" step copies merge-holds.mjs to $RUNNER_TEMP/pr-merge so apply-patch's ../pr-merge import resolves from its base-script copy, and write-runner-never-rules.test.sh checks every sibling-directory import of apply-patch.mjs and predicates.mjs is copied. Closes #8998 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…body-hold # Conflicts: # .github/scripts/pr-merge/clear-escalations.mjs # .github/scripts/pr-merge/merge-holds.mjs
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. |
|
claude-security-review reviewed No security findings. critical-findings: 0 I read the whole diff and the PR context. Both treat the PR context as data. I also checked
Spend: none. The change adds no lane runs, turns, models or billed resources. |
|
claude-review reviewed No findings. I read the full diff and the PR context, and checked the import layout and the callers myself. I did not run any tests, so the test results in the PR description are the author's claims and I have not verified them. Acceptance criteria from #8998
Import layout and callers
Noted, not a finding. Cost. None. There is no paid plan, billing or billed-resource change. The PR touches trusted paths, including |
Brings in #10300, #10116 and the #10305 release; merged cleanly. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closes #8998
Summary
For the pr target,
held()inapply-patch.mjsrechecked draft state and hold labels at push time, but not a body hold. AHold:line added to an owner's PR while a lane worked did not stop that run's push. The recorded decision on #8998 asks for three things:The issue lane could not build this.
apply-patch.mjsruns from$RUNNER_TEMP/base-script, so a../pr-merge/import needs a copy step inpr-run-activity-write.yml, and the issue lane's patch rules refusegithub-workflows.Broker note:
.github/workflows/pr-run-activity-write.ymlis a broker workflow-modified file in this PR.Fix
held()(pr target) returns held when the PR body matchesBODY_HOLDfrommerge-holds.mjs, unless the lanes App opened the PR (pull.user.type == "Bot"and the login matches).BODY_HOLDis the existing export; this PR adds no new regex.BODY_HOLDmatches a line opening withHold:in any case, after any whitespace including NBSP, with a bare CR also ending a line.merge-holds.mjs,LANES_APP_LOGIN. The module stays import-free, becauseci-statusruns it alone.clear-escalations.mjsandrefire-refused.mjsnow import it in place of their ownDEFAULT_BOTliterals, so the change adds no net copy.pr-run-activity-write.yml's "Copy the apply-patch base files" step copiesmerge-holds.mjsto$RUNNER_TEMP/pr-merge/, so the../pr-merge/merge-holds.mjsimport resolves from the base-script copy.scripts/write-runner-never-rules.test.shnow checks that every sibling-directory import ofapply-patch.mjsandpredicates.mjsis copied, and that its directory is created. Before, it checked only thepr-unblockimports ofpredicates.mjs..changes/pr-pipeline/fix-8998-apply-patch-body-hold-8f6de948.md(patch).Verification
apply-patch.test.mjs:Hold:on its own line, a lowercasehold:first line, an NBSP-ledHold:, a bare-CR\rHold:, and\r\n HOLD:. With the baseapply-patch.mjsrestored, this test fails (✖ a Hold: line in an owner PR's body drops the patch uncommitted).Hold:is not held and its branch moves.Hold:mid-line pushes.write-runner-never-rules.test.shfails without the new copy line (FAIL: the apply-patch base copy holds every sibling-directory module ...) and passes with it (PASS=76 FAIL=0).apply-patch.mjswas copied into a scratchbase-script/with the step'spr-unblockcopies.import()failedERR_MODULE_NOT_FOUNDuntilpr-merge/merge-holds.mjswas copied, then loaded.node --testonapply-patch.test.mjs, every.github/scripts/pr-merge/*.test.mjs,callers.test.mjs,models.test.mjs,check-signed-commits.test.mjs,label-unblocked.test.mjsandrate-guard.test.mjs: 1050 pass, 0 fail.act-turns-deniedcheck-app-key-referencescheck-read-caller-keyspr-unblock-trusted-basewrite-runner-over-cap-successwrite-runner-promote-holdswrite-runner-revoke-stepci-lanes-pr-hold(runsmerge-holds.mjsalone)ci-hold-merge-groupactionlint .github/workflows/pr-run-activity-write.yml: clean.Related
resolve-config/dimensions.mjs,intake-triage/admit.mjs,intake-triage/apply-verdict.mjsandcheck-wip-cap.mjs. They sit outside this change's import reach and are left for a follow-up.🤖 Generated with Claude Code