Repository navigation
feat(pr-pipeline): fail ci-status while a pull request carries needs-human - #9312
Conversation
…human ci-status now fails on a pull_request event, contract-only runs included, while the pull request carries the human-gated label, and the merge_group hold step fails on that label as well as do-not-merge. The label is the base commit's .work-item-tracker.json role_labels.human-gated (default needs-human), read through the contents API at the base SHA; labels are read live with three tries and an unreadable tracker config or label list fails closed. The PR-event error names the reason from the newest review-lane hold comment (claude[bot], or github-actions[bot] ending in a claude-lane footer) and says that removing the label approves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 Security review (incremental, since 1ea1478)Scope: Result: no security issues found. The change replaces three literal backticks in jq regexes with the
critical-findings: 0 |
|
claude-review reviewed Incremental review of The change replaces three literal backticks with the jq string escape I did not run the filter: the sandbox refused the Manifest items: no plugin manifest changed. |
actionlint's shellcheck pass (SC2016) read the literal backtick inside the single-quoted jq programs as an unexpanded expression and failed lint-repo. ` is the same character to jq's regex, so behavior is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs: #9276
Summary
ci-statusnow fails while a pull request carries the human-gated label (needs-humanby default), on everypull_requestevent (contract-only and draft runs included) and in the merge queue. The error names the reason from the newest review-lane hold comment and says that removing the label approves the pull request. This is the first PR of the #9276 plan: it gives the review lanes a hold that the one required check enforces.Fix
ci-statusstep,Fail a pull request carrying the human-gated label, forpull_requestevents. It resolves the label from.work-item-tracker.jsonrole_labels.human-gatedat the PR's base SHA through the contents API (a 404 falls back toneeds-human; the same jq expression aspr-merge.yml), so a PR cannot rename its own hold. It reads labels live from the API, not the payload, with 3 tries. An unreadable tracker config, invalid JSON, a malformed base SHA or an unreadable label list fails closed. Error:#N carries 'needs-human' (<reason>). Removing the label approves this pull request; ci-status re-runs on the unlabel.claude-lane-hold lane=HTML-comment marker line and is authored byclaude[bot], or bygithub-actions[bot]when its last non-blank line is theclaude-lane: <lane>footer (the lane-comment rule from feat(pr-pipeline): run the security review on pr-review-cli with key-first funding #9307). The footer and comment lines are stripped, the text is cut to 300 characters, and%is escaped. Comments are read only when the label is present. A failed comment read still fails the step, just without a reason.Fail a queued pull request carrying a hold label, now fails on the human-gated label (resolved atmerge_group.base_sha) as well asdo-not-merge.ci-statustimeout comment now counts the added retries (45 s of own-gate retries). The 5-minute cap still holds.GITHUB_TOKENstarts no new workflow run, so aci-statusthat is already green stays green until the plannedrerun-ci-statuslistener lands. Until then the merge_group step is the backstop. A person's unlabel does re-runci-status, so the error text is accurate.Verification
scripts/ci-hold-human-gated.test.sh(new) runs the step body underbash -eagainst stubghandsleep: PASS=24 FAIL=0. It covers the step's condition, its base-SHA read, its position before the aggregate,ci-statushaving no contract-only gate, the label held and absent, a substring label, the custom tracker label, a 404 fallback, invalid JSON, tracker and label retries, failing closed, reason extraction (newest hold comment, footer stripped, a person's marker ignored,github-actions[bot]without a footer ignored,claude[bot]read, 300-character cut,%escaped), and an unreadable comment list.scripts/ci-hold-merge-group.test.sh(extended): PASS=22 FAIL=0, adding the human-gated label, the custom tracker label, the fallback, invalid or unreadable tracker config, and a bad base SHA.scripts/check-affected.sh --tests: 10 passed, 4 skipped. Alsoscripts/check-lane-coverage.sh --check,scripts/check-test-tmp-cleanup.sh --checkandscripts/check-silent-skips.shpass, andrun-plugin-tests.sh --listincludes the new suite..github/scripts/pr-unblock/fix-ci-dispatch.mjs:39,137, with the tracker's label added at.github/scripts/pr-unblock/dispatch.mjs:473-478). The reconciler re-runs a failed run once only when a lane job other thanci-statusfailed (.github/scripts/maintenance-reconcile-lost-runs/infra-failure.mjs:50-56, whose comment names a hold label as the case it skips), andtestedRunsteps past red contract-only runs (infra-failure.mjs:104-115). A hold red therefore spends no fix-ci run and no reconciler re-run.Related
claude-lane:footer) this step reads.🤖 Generated with Claude Code