Skip to content

fix(pr-pipeline): read pr-verify's FAILs in the merge queue for owner-login PRs - #13412

Merged
kyle-sexton merged 4 commits into
mainfrom
ccp-owner-queue-verify
Nov 5, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
ccp-owner-queue-verify

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: a merge-hold bypass reported by PR Lane Automation and routed by the hub. #13124 merged at 07:57Z while capped by verify:repeated-fail.

Summary

In merge_group runs, the holds step in pr-require-checks.yml exits 0 for any author that isn't the lanes App ("#$pr is not the lanes App's; pr-merge's gate or a person reads its holds."). So a PR under the owner's login, enqueued on the owner's credentials, merges with no pr-verify verdict read. The file never read verify-authors.

Owner decisions, made in the Automation Lanes session on 2026-11-04:

  • First pick, 22:56:02Z, verbatim: "Hold on FAIL only (Recommended)". The question wrongly said the owner's own approval lifts the hold.
  • After that was corrected (GitHub forbids approving your own pull request, docs, and the owner is the only person on the trusted list), the pick, verbatim: "FAIL holds, cap not (Recommended)".

Fix

  • queued_author and the holds step mirror resolve-pr.mjs's verify-authors predicate, read at the base. A dependency-manager Bot is never judged. Under lane-or-owner, a judged author is the lanes App or any User or Bot whose id is on trusted-actors.json (resolve-pr.mjs:266, :818-828). A test checks the two copies match line for line. queued_author gains a verify_judged output for the steps that warm the reader. The lanes-only carry steps still key on lanes.
  • For a judged non-lanes author in merge_group, the step runs the verdict reader (babysit_verify_evidence.py evidence --base-sha) and holds only on verify:fail or verify:earlier-fail at the head, through the base module's evidenceHold. A head that pr-verify passes clears it. A trusted approval of the head also lifts it, but an owner can't approve their own PR.
  • verify:repeated-fail prints ::warning::#<pr>: pr-verify's repeated-fail cap stands at this head; owner-login PRs are not held on the cap (owner decision 2026-11-04) and exits 0. Every other refusal, a missing pass, a stale pass, untrusted-spec, unreadable, too-old and a reader failure all exit 0 with a "not held" line.
  • These stay lanes-only: the kill switch, member veto, hold paths, cost and trusted-actor holds. Lanes App PRs are unchanged. verify-authors is unchanged. Nothing loosens a hold.

Friction: owner-login and listed-bot PRs that merge today are now held on verify:fail and verify:earlier-fail at their head, and nothing else. The 7-day count of such merges is UNVERIFIED. A search for merged non-lanes PRs carrying pr-verify-failed finds 1 (#11258), but a later pass removes that label, so the search undercounts (#13124 is missing from it).

Cost: each judged non-lanes queue entry now runs the verdict reader, about 200 a day (1,507 non-lanes merges since 10-28). In FAIL index mode the per-entry request cost is UNVERIFIED. The warm figure measured on lanes PRs is about 73 requests.

Verification

  • scripts/ci-lanes-pr-hold.test.sh: 344 pass, 0 fail. New cases:
    • an owner PR with verify:fail or verify:earlier-fail is held;
    • one with verify:repeated-fail passes with the warning;
    • no pass, spec-changed and untrusted-spec pass with "not held";
    • an approval of the head lifts a verify:fail hold, and an approval of an earlier head does not lift earlier-fail;
    • an unlisted author keeps the old line, and the lanes App path is unchanged.
  • test_merge_holds_sync: 21 OK. actionlint, shellcheck and check-lane-coverage --check are clean.
  • scripts/check-affected.sh --base origin/main --no-fetch: 12 passed, 4 skipped, after merging origin/main.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 4 commits November 4, 2026 17:54
… the merge queue

ci-status's lanes-hold step exited 0 in the merge queue for every author
but the lanes App, so an owner pull request queued on owner credentials
merged with no pr-verify verdict read (#13124 merged while capped by
verify:repeated-fail).

In merge_group runs the step now judges the author as resolve-pr.mjs
resolvePull does (no dependency manager, then merge.verify-authors read
from the hold config's pr-pipeline.yaml with its trusted-actor list) and,
for a judged author, runs the same verdict reads and merge-holds.mjs
verifier, link and FAIL holds. It reads only that pull request's reviews,
bodies blanked, and no file list, so the kill switch, member veto, hold
paths, cost paths and trusted-actor list holds stay the lanes App's.
The queued_author step outputs verify_judged by the same predicate, and
the three verdict-read steps gate on it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rify FAIL

Owner decision 2026-11-04, "Hold on FAIL only (Recommended)": in the merge
queue, a pull request whose author pr-verify judges but is not the lanes
App holds only when the verdict reader reports a FAIL class for its head
(verify:fail, verify:earlier-fail, verify:repeated-fail), judged by the
base module's evidenceHold, with a trusted approval of the head lifting
it. No pass, a stale or untrusted-spec pass, verify:unreadable,
verify:too-old and a reader that does not judge leave it to merge. The
pass lookup, record download and link check stay the lanes App's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… non-lanes pull requests

Owner decision 2026-11-04, "FAIL holds, cap not (Recommended)": in the
merge queue a judged non-lanes pull request holds on verify:fail and
verify:earlier-fail at its head, and verify:repeated-fail only warns. An
author cannot approve their own pull request, so on an owner-login pull
request the lift is a new head that pr-verify passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 5, 2026 01:22
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T01:24:06.714783Z 2d0380c Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 2d0380cbc222714901991d16d875674263b1f5c0: read 5 of 5 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

This was the lane's first review of this pull request (blocking only: no). I read every hunk of all 5 changed files.

What I checked. .github/workflows/pr-require-checks.yml is on the trusted paths, and its ci-status hold steps are a merge-hold control. So I read its whole change, plus the code those steps rely on that the diff doesn't touch (lines 6333–6549 at head).

  • Lanes App path unchanged. lanes is set by the same jq id/type test as at base (L6439). Every block that is now gated on lanes runs exactly as before when lanes=true:

    • the kill-switch block ([ "$lanes" = true ] && { … });
    • the file-list read;
    • the changed-file count check;
    • the three-kind discussion read.

    ${reason:-} only guards an unset variable. I found no path where a lanes App pull request falls into the new lanes=false branch.

  • Non-lanes authors: stricter, not looser. At base, every non-lanes author exited 0 at the author check. At head, a judged author in merge_group can now exit 1 on verify:fail or verify:earlier-fail. If the hold config can't be read, it also exits 1 and fails closed (::error::cannot read whether pr-verify judges the author…). Authors that aren't judged, and every author on a pull_request event, still exit 0 as before. No hold that existed at base is weakened.

  • Where the code and config come from. pr-pipeline.yaml, trusted-actors.json and merge-holds.mjs are read from $BASE_CONFIG (the hold-config checkout, L6507–6512). The verdict reader is .base/…/babysit_verify_evidence.py (L6340). None of the new logic loads code from the pull request's head.

  • Untrusted text. The new branch reads only pulls/$pr/reviews, and blanks each body (.body = "") before fromRest/pathLifters. Comment text therefore can't reach the hold decision. The FAIL message is escaped for %, CR and LF before it goes into the ::error annotation. The approval lift still requires an approval of the exact head by someone on the trusted-actor list (humansOf), from the base checkout.

  • Token and trust controls. The new step uses GH_TOKEN: ${{ github.token }}, as the existing steps do. The diff doesn't change any permissions: block, the trusted-trigger check, the token broker, or the trusted-actor list.

  • Carry-step gating. main_tip, verdict_reads_restore and verdict_reads_carry now skip on verify_judged != 'false' instead of lanes != 'false'. When the author or config can't be read, the outputs stay unset and the steps run, so this fails toward running them. For lanes App pull requests, verify_judged is always true.

  • Embedded text. The PR context contains no instructions to the lane.

Owner threat model. The repeated-fail cap (verify:repeated-fail) only warns for owner-login pull requests, and the kill switch, member veto and hold paths stay lanes-only. These are owner friction choices, and they add holds rather than remove any. They are not findings.

Usage, not a charge. Each judged non-lanes merge-queue entry now runs the verdict reader against GITHUB_TOKEN's REST budget (about 200 runs a day, per the PR description). This uses Actions API quota, not billed resources.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 2d0380cbc222714901991d16d875674263b1f5c0: read 5 of 5 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

I read every hunk of all 5 changed files: the changelog fragment, pr-require-checks.yml, pr-pipeline/README.md, ci-lanes-pr-hold.test.sh and lane-coverage-step-opt-outs.txt. I also read the hold step as it stands at head, from the queued_author step through the start of the lanes verdict path.

What I checked

  • Author test matches resolve-pr.mjs. The jq author test copied into queued_author and the lanes-hold step matches resolve-pr.mjs resolvePull on four points:

    • a dependency manager is skipped first;
    • an unknown verify-authors value judges no one;
    • lane checks the lanes App by login;
    • lane-or-owner also accepts a listed User or Bot by id.

    The new test checks that the two jq copies match line for line.

  • Inputs exist before the new owner path reads them. identity, merge-holds.mjs and trusted-actors.json are set or copied to $RUNNER_TEMP before the new lanes=false branch reads them (L6388-L6394, L6507-L6512). BABYSIT_VERIFY_PULL is written before the reader runs.

  • Lanes App path is unchanged. The kill-switch block, the file-count check and the three discussion kinds still run only when lanes=true, and ${reason:-} covers the skipped kill-switch read.

  • Failure modes.

    • A verify-authors read that fails in the queue fails closed.
    • If the hold config is not read in queued_author, verify_judged stays unset, so the cache-warming steps still run (the safe direction).
    • A reader failure or refusal other than a FAIL class does not hold. That is the stated owner decision ("Hold on FAIL only", "FAIL holds, cap not"), so I did not flag it.
  • Cold reads. The owner path skips the lanes path's cold-read headroom gate. That gate only runs when the legacy FAILs file is absent, and verify-legacy-fails.json is present at head. So index mode applies, and the per-read floor (BABYSIT_READ_FLOOR_STOP=1) is the guard on both paths.

Not a finding: description doesn't match the diff. The PR body says "The lanes-only carry steps still key on lanes". In the diff, all three steps that warm the reader (main_tip, verdict_reads_restore, verdict_reads_carry) now key on verify_judged, and nothing reads the lanes output any more. The code, comments and tests agree with each other; only the description is out of date.

Verification. I had no shell, so I ran nothing. The PR body's results (344 pass in ci-lanes-pr-hold.test.sh, 21 OK in test_merge_holds_sync, clean actionlint, shellcheck and lane-coverage) are the author's claims and are unverified here.

API usage (not billed, not a hold). Each queued owner or listed-bot pull request now runs the verdict reader on GITHUB_TOKEN REST requests. The author estimates about 200 entries a day, and the per-entry cost in FAIL index mode is unmeasured.

No closing issue. The PR links none, so there are no acceptance criteria to check. I found no embedded instructions in the PR context. No plugin manifest changed.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit 2b07197 Nov 5, 2026
89 checks passed
@kyle-sexton
kyle-sexton deleted the ccp-owner-queue-verify branch November 5, 2026 01:54
@kyle-sexton kyle-sexton added do-not-merge Hard merge gate: do not merge while applied. and removed do-not-merge Hard merge gate: do not merge while applied. labels Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant