Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
bump: patch
---

### Changed

- The "Both lanes review the head" hold names the status jobs it now reads, `pr-review / review-status` and `pr-review-security / review-status`. A review from a status job under the names pr-review.yml and pr-review-security.yml gave before ci-workflows#866 no longer counts.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
bump: none
---

Test-only change: a babysit sync test case that expected the repository's merge-holds gate to read a retired review status job name is removed; the shipped scripts are unchanged.
14 changes: 8 additions & 6 deletions .github/scripts/pr-merge/clear-escalations-recheck.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ const LANES = {
"pr-review-hosted.yml": { check: "pr-review / review-status", lane: "claude-review" },
"pr-review-security-hosted.yml": { check: "pr-review-security / review-status", lane: "claude-security-review" },
};
// pr-review-cli.yml's status job names before ci-workflows#866.
const EARLIER_CHECKS = { "pr-review-hosted.yml": "pr-review / claude-review-status", "pr-review-security-hosted.yml": "pr-review-security / security-review" };
// The status job names pr-review-cli.yml gave before it named both review-status.
const RETIRED_CHECKS = { "pr-review-hosted.yml": "pr-review / claude-review-status", "pr-review-security-hosted.yml": "pr-review-security / security-review" };
const pushes = [
{ activity_type: "push", actor: PERSON, after: HEAD, timestamp: "2026-10-18T11:00:00Z" },
{ activity_type: "push", actor: PERSON, after: OLD, timestamp: "2026-10-18T09:50:00Z" },
Expand Down Expand Up @@ -141,10 +141,12 @@ test("ci-status's recheck accepts the App's removal while the hold still no long
assert.ok(w.calls.every((call) => call.startsWith("GET ") || call === "POST /graphql"), "the recheck writes nothing");
});

test("ci-status's recheck reads each lane's status job under its earlier name too", async () => {
const { code, log } = await run(world({ checks: EARLIER_CHECKS }));
assert.equal(code, 0, log);
assert.match(log, new RegExp(`the hold at ${OLD} no longer stands at ${HEAD}`));
test("ci-status's recheck fails when a lane's status job runs under its retired name", async () => {
for (const [file, check] of Object.entries(RETIRED_CHECKS)) {
const { code, log } = await run(world({ checks: { [file]: check } }));
assert.equal(code, 1, check);
assert.match(log, new RegExp(`${LANES[file].lane} has not passed on ${HEAD}`), check);
}
});

test("ci-status's recheck fails when a lane's status job runs under another caller job", async () => {
Expand Down
9 changes: 4 additions & 5 deletions .github/scripts/pr-merge/clear-escalations.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -498,15 +498,14 @@ async function checksHeld(read, repo, head) {

// The review lanes reviewLanesClean reads, as pr-require-checks.yml's
// `Require both review lanes on this head` step names them: the workflow, the
// lane its completion record names, its status job's names (pr-review-cli.yml's,
// then the one it gave before ci-workflows#866), and whether only a whole
// review counts.
// lane its completion record names, its status job's names (as pr-review-cli.yml
// names it), and whether only a whole review counts.
const LANE_RECORDS = Object.freeze([
{ file: "pr-review-hosted.yml", lane: "claude-review", jobs: ["pr-review / review-status", "pr-review / claude-review-status"], whole: false },
{ file: "pr-review-hosted.yml", lane: "claude-review", jobs: ["pr-review / review-status"], whole: false },
{
file: "pr-review-security-hosted.yml",
lane: "claude-security-review",
jobs: ["pr-review-security / review-status", "pr-review-security / security-review"],
jobs: ["pr-review-security / review-status"],
whole: true,
},
]);
Expand Down
7 changes: 4 additions & 3 deletions .github/scripts/pr-merge/clear-escalations.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1241,8 +1241,8 @@ test("a lanes App push is not a trusted move: the App never lifts its own stop w
// marker carrying its summary.
const REVIEW_FILES = { "claude-review": "pr-review-hosted.yml", "claude-security-review": "pr-review-security-hosted.yml" };
const STATUS_JOBS = { "claude-review": "pr-review / review-status", "claude-security-review": "pr-review-security / review-status" };
// pr-review-cli.yml's status job names before ci-workflows#866.
const EARLIER_STATUS_JOBS = { "claude-review": "pr-review / claude-review-status", "claude-security-review": "pr-review-security / security-review" };
// The status job names pr-review-cli.yml gave before it named both review-status.
const RETIRED_STATUS_JOBS = { "claude-review": "pr-review / claude-review-status", "claude-security-review": "pr-review-security / security-review" };
function laneReader({ pushes = [pushedBy(APP_ACTOR)], scopes = { "claude-review": "incremental since=" + KEY, "claude-security-review": "whole" }, runStatus = "completed", jobs = STATUS_JOBS } = {}) {
const fallback = readerFor({ pushes });
return async (method, path) => {
Expand Down Expand Up @@ -1277,7 +1277,6 @@ test("feedback-not-landed comes off after a lanes App push once both review lane
for (const [severity, jobs] of [
["severity: SUGGESTION", STATUS_JOBS],
["severity: IMPORTANT", STATUS_JOBS],
["severity: SUGGESTION", EARLIER_STATUS_JOBS],
]) {
const label = `${severity} ${jobs["claude-review"]}`;
const w = world({ timeline: notLandedTimeline(), reader: laneReader({ jobs }), reviewThreads: () => threadPage([reviewThread(true, [LANE_AUTHOR]), severityThread(severity)]) });
Expand All @@ -1297,6 +1296,8 @@ test("feedback-not-landed stays after a lanes App push while the review lanes ha
["runs still in progress", laneReader({ runStatus: "in_progress" }), notLandedTimeline()],
["a status job under another caller job", laneReader({ jobs: { ...STATUS_JOBS, "claude-review": "other / review-status" } }), notLandedTimeline()],
["the other lane's status job name", laneReader({ jobs: { ...STATUS_JOBS, "claude-security-review": "pr-review / review-status" } }), notLandedTimeline()],
["the review status job's retired name", laneReader({ jobs: { ...STATUS_JOBS, "claude-review": RETIRED_STATUS_JOBS["claude-review"] } }), notLandedTimeline()],
["the security status job's retired name", laneReader({ jobs: { ...STATUS_JOBS, "claude-security-review": RETIRED_STATUS_JOBS["claude-security-review"] } }), notLandedTimeline()],
["an incremental security review", laneReader({ scopes: { "claude-review": "whole", "claude-security-review": `incremental since=${KEY}` } }), notLandedTimeline()],
["no security summary", laneReader(), notLandedTimeline(commented(ACTIONS_BOT, "CI summary.", "2026-10-18T11:30:00Z"))],
["a summary of an earlier head", laneReader(), notLandedTimeline(securitySummary(0, KEY))],
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/pr-merge/enable-auto-merge.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function world(pulls, { failArm = false, armErrors = {}, disarmErrors = {}, file
return { files: [{ filename: "infra/main.tf" }] };
}
if (method === "GET" && path === "/repos/melodic-software/claude-code-plugins/actions/runs/9/jobs?filter=all&per_page=100&page=1") {
return { jobs: [{ id: 90, name: "pr-review / claude-review-status", completed_at: "2026-10-22T11:00:00Z" }] };
return { jobs: [{ id: 90, name: "pr-review / review-status", completed_at: "2026-10-22T11:00:00Z" }] };
}
if (method === "GET" && path === "/repos/melodic-software/claude-code-plugins/check-runs/90/annotations?per_page=100&page=1") {
return [{ annotation_level: "notice", message: `claude-lane-hold lane=claude-review sha=${HEAD} criteria=cost label=needs-human` }];
Expand Down
9 changes: 4 additions & 5 deletions .github/scripts/pr-merge/merge-holds.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -746,12 +746,11 @@ export function namesPull(text, number) {

// The review lanes whose status job records a `claude-lane-hold` notice, as
// [workflow file, status job names] (ci-status's cost-hold step reads the same
// two): pr-review-cli.yml's name, then the one it gave before
// ci-workflows#866. The notice's head and criteria, and the base branch name a
// compare takes, as the hold step reads it.
// two), as pr-review-cli.yml names it. The notice's head and criteria, and the
// base branch name a compare takes, as the hold step reads it.
export const REVIEW_LANES = [
["pr-review-hosted.yml", ["pr-review / review-status", "pr-review / claude-review-status"]],
["pr-review-security-hosted.yml", ["pr-review-security / review-status", "pr-review-security / security-review"]],
["pr-review-hosted.yml", ["pr-review / review-status"]],
["pr-review-security-hosted.yml", ["pr-review-security / review-status"]],
];
const HOLD_NOTICE = /^claude-lane-hold lane=[a-z-]+ sha=([0-9a-f]{40}) criteria=([a-z,-]+) label=/;
const BRANCH = /^(?!-)(?!.*\.\.)[A-Za-z0-9._/-]{1,255}$/;
Expand Down
6 changes: 2 additions & 4 deletions .github/scripts/pr-merge/merge-holds.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -696,15 +696,13 @@ test("the decided head is the newest cost notice a lane's status job recorded be
assert.equal((await runs(laneRun(HEAD, "2026-10-22T11:30:00Z"))).link, LINK);
assert.equal((await runs(laneRun(HEAD, "2026-10-22T11:30:00Z", { lane: "pr-review-security-hosted.yml" }))).link, LINK);
assert.equal((await runs(laneRun(HEAD, "2026-10-22T11:30:00Z", { criteria: "cost,trust-gate" }))).link, LINK);
// pr-review-cli.yml named the status job this before ci-workflows#866.
assert.equal((await runs(laneRun(HEAD, "2026-10-22T11:30:00Z", { job: "pr-review / claude-review-status" }))).link, LINK);
assert.equal((await runs(laneRun(HEAD, "2026-10-22T11:30:00Z", { lane: "pr-review-security-hosted.yml", job: "pr-review-security / security-review" }))).link, LINK);
for (const [name, extra] of Object.entries({
"a job done after the decision": laneRun(HEAD, "2026-10-22T12:30:00Z"),
"a run started after the decision": laneRun(HEAD, "2026-10-22T11:30:00Z", { created: "2026-10-22T12:10:00Z" }),
"a job other than the status job": laneRun(HEAD, "2026-10-22T11:30:00Z", { job: "pr-review / review-key" }),
"the other lane's status job name": laneRun(HEAD, "2026-10-22T11:30:00Z", { job: CHECKS["pr-review-security-hosted.yml"] }),
"the other lane's earlier status job name": laneRun(HEAD, "2026-10-22T11:30:00Z", { job: "pr-review-security / security-review" }),
"the status job's retired name": laneRun(HEAD, "2026-10-22T11:30:00Z", { job: "pr-review / claude-review-status" }),
"the security status job's retired name": laneRun(HEAD, "2026-10-22T11:30:00Z", { lane: "pr-review-security-hosted.yml", job: "pr-review-security / security-review" }),
"the status job's name under another caller job": laneRun(HEAD, "2026-10-22T11:30:00Z", { job: "other / review-status" }),
"the status job's bare name": laneRun(HEAD, "2026-10-22T11:30:00Z", { job: "review-status" }),
"a notice naming another head than its run's": laneRun(OLD, "2026-10-22T11:30:00Z", { notice: HEAD }),
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/pr-require-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5562,8 +5562,7 @@ jobs:
# `ran` lists, per lane, the heads of its runs from this repository
# started before the decision.
notices='[]' vetted='' ran='[]'
# Each lane's status job names, split by `|`: pr-review-cli.yml's,
# then the one it gave before ci-workflows#866.
# Each lane's status job name, as pr-review-cli.yml names it.
while read -r file checks; do
runs=$(read_api "repos/$repo/actions/workflows/$file/runs?event=pull_request&branch=$ref&per_page=100" --paginate) || keep "the $file runs are unreadable"
ran=$(jq -nc --argjson ran "$ran" --arg repo "$repo" --argjson decided "$decided_at" '$ran + [[inputs.workflow_runs[]
Expand Down Expand Up @@ -5594,8 +5593,8 @@ jobs:
done < <(jq -nr --arg repo "$repo" --argjson since "$since" --argjson decided "$decided_at" '[inputs.workflow_runs[]
| select(.head_repository.full_name == $repo)
| select((.updated_at | fromdateiso8601) > $since or (.created_at | fromdateiso8601) < $decided) | "\(.id) \(.head_sha)"] | unique[]' <<<"$runs")
done <<<'pr-review-hosted.yml pr-review / review-status|pr-review / claude-review-status
pr-review-security-hosted.yml pr-review-security / review-status|pr-review-security / security-review'
done <<<'pr-review-hosted.yml pr-review / review-status
pr-review-security-hosted.yml pr-review-security / review-status'
# The decided head: the sha of the newest cost notice before the
# decision that names its own run's head; none when two heads share
# that time.
Expand Down Expand Up @@ -7022,11 +7021,10 @@ jobs:
# melodic-standards-sync[bot], as
# .github/standards/trusted-actors/trusted-actors.json lists them.
exempt_author_ids='49699333 337859524 300666570'
# Each lane's status job names, split by `|`: pr-review-cli.yml's,
# which the messages below name, then the one it gave before
# ci-workflows#866.
lanes='pr-review-hosted.yml claude-review pr-review / review-status|pr-review / claude-review-status
pr-review-security-hosted.yml claude-security-review pr-review-security / review-status|pr-review-security / security-review'
# Each lane's status job name, as pr-review-cli.yml names it and the
# messages below name it.
lanes='pr-review-hosted.yml claude-review pr-review / review-status
pr-review-security-hosted.yml claude-security-review pr-review-security / review-status'
if [[ ! $HEAD_SHA =~ ^[0-9a-f]{40}$ ]]; then
echo "::error::the head '$HEAD_SHA' is not a commit SHA."
exit 1
Expand Down
4 changes: 2 additions & 2 deletions docs/conventions/pr-pipeline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3139,8 +3139,8 @@ them on every `pull_request` run, contract-only runs included:
ci-status's merge-holds step still fails on the veto comment until a later comment by the same
member lifts it, so the veto holds before the label lands and if the label is removed.
- **Both lanes review the head.** On a ready PR, the newest `pull_request` run of each caller on the
head must have a successful status job (`pr-review / claude-review-status`,
`pr-review-security / security-review`) whose `Apply the hold` step ran. A summary-mode run or
head must have a successful status job (`pr-review / review-status`,
`pr-review-security / review-status`) whose `Apply the hold` step ran. A summary-mode run or
one with no hold label does not count. A pending, failed, cancelled or skipped review fails with
the cause named. A lane a kill switch stopped (the switch was on when the review run started)
fails too: the kill switch pauses review and never waives it. Once it is off, the lost-run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -981,9 +981,6 @@ def _plain(lane: str) -> dict[str, Any]:
"a job other than the status job": {
"runs": [_run(HEAD, job="pr-review / review-key")]
},
"a status job named as pr-review.yml names it": {
"runs": [_run(HEAD, job="pr-review / claude-review-status")]
},
"a status job under another caller job": {
"runs": [_run(HEAD, job="other / review-status")]
},
Expand Down Expand Up @@ -1303,7 +1300,6 @@ def test_both_carry_a_decision_to_the_same_heads(self) -> None:
"a notice at the head",
"a base merge since the decided head",
"a notice from the security lane",
"a status job named as pr-review.yml names it",
"a newer head pushed before it with a run of every lane",
}
for case in carried:
Expand Down
4 changes: 2 additions & 2 deletions scripts/ci-hold-cost-decision.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -627,11 +627,11 @@ expect "a notice under the other lane's status job name in this lane's workflow
nodecided
decided "$HEAD" 2026-10-23T13:12:00Z cost pr-review-security-hosted.yml "$SEC_CHECK"
expect "a cost notice from the security lane's status job decides its head" yes yes yes
# pr-review-cli.yml named its status jobs these before ci-workflows#866.
# The status job names pr-review-cli.yml gave before it named both review-status.
for lane in 'pr-review-hosted.yml pr-review / claude-review-status' 'pr-review-security-hosted.yml pr-review-security / security-review'; do
nodecided
decided "$HEAD" 2026-10-23T13:12:00Z cost "${lane%% *}" "${lane#* }"
expect "a cost notice from the status job named '${lane#* }' decides its head" yes yes yes
expect "a cost notice from the retired status job name '${lane#* }' decides nothing" no no no "covering this head"
done
for name in 'other / review-status' 'review-status'; do
nodecided
Expand Down
4 changes: 2 additions & 2 deletions scripts/ci-review-lanes.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,10 @@ else
fail "unexpected reads: '$(sort -u "$TMP_ROOT/log")'"
fi

# pr-review-cli.yml named its status jobs these before ci-workflows#866.
# The status job names pr-review-cli.yml gave before it named both review-status.
JOBS_10="$(jobs "$(kill_job success skipped)" "$(status 'pr-review / claude-review-status' completed success)")"
JOBS_20="$(jobs "$(kill_job success skipped)" "$(status 'pr-review-security / security-review' completed success)")"
expect "status jobs under their earlier names count" 0 "'$SEC_CHECK' passed on $HEAD" "::error::"
expect "status jobs under their retired names do not count" 1 "'$CODE_CHECK' did not run on $HEAD" "passed on $HEAD"
# A status job counts only under its own lane's caller job.
for name in 'other / review-status' 'review-status' "$CODE_CHECK"; do
JOBS_20="$(jobs "$(kill_job success skipped)" "$(status "$name" completed success)")"
Expand Down
Loading