Repository navigation
fix(admission): pin the packet and declaration to the bundle's commit (#14920) - #14932
Conversation
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 26 minutes. View limit details
|
There was a problem hiding this comment.
Code Review
This pull request updates the candidate admission logic to use the live base tip for pull request runs, ensuring that stale branches are evaluated against current rules. The changes include updates to the test suite to simulate these scenarios and the addition of a changelog entry. I have reviewed the suggested improvements regarding unused imports, safer environment variable access, and test loop simplification, all of which are valid and recommended for implementation.
There was a problem hiding this comment.
Code Review
This pull request updates the candidate admission tests to support checking out the trusted admission bundle at the live base tip for pull_request runs instead of pull_request.base.sha. It stubs the gh CLI tool to return the live base SHA and adds test cases for missing references and merge group behavior. A changelog entry is also added to document these changes. The review feedback suggests simplifying a single-element loop in the new test assertions to avoid unnecessary complexity and dynamic dictionary unpacking.
|
Coordination finding only: overlapping repair with #14894, not a source-review verdict or validator-policy approval. Inspected #14932 head The competing identities are materially different:
Please reconcile these existing lanes before treating them as additive or choosing a successor: explicitly state the intended identity relation among the judged workspace tree, trusted executable bundle, declaration source and enforcement packet, including base movement between reads. Preserve tests for stale recorded bases, unavailable identity/fail-closed behavior, and the merge-group base. Resolve any selector/test conflict intentionally rather than replacing one identity contract incidentally. #14920's baseline.json refusal overlaps the same family blocking #14658. Dependent qualification should wait for the selected repair to land and its actually executed controller to be verified; no unchanged retry is requested. #14932's body also discloses four action-execution cases unproven locally due missing jq, separate from its passing selector cases. No branch, label, queue entry, required check or approval was changed by this coordination note. |
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
Exact-head review of #14932 at 8ce6606.
Identity. Three files, +63/-8: the Select trusted admission source step, the selector test, and the changelog. git merge-tree --write-tree against current main exits 0 at tree dc10ce2e43.
The identity change is the right one, and it is bounded. The trusted bundle is admission code, not the candidate's source. The .gitattributes declaration and the enforcement packet are already read from the live base tip, so using the recorded base for the bundle made the bundle and the declaration two different objects. The new arm resolves repos/<repo>/git/ref/heads/<base_ref> and uses that SHA for both. Newly admitted: a stale branch whose recorded base lacks a .gitattributes declaration the live base carries (previously refused for the mismatch). Newly refused: a PR with an absent base ref or an unresolvable live tip (fail-closed), and a PR whose live base has stricter admission rules than its recorded base. The candidate's source is unchanged; the rules are current. The result is reproducible if you know the live base tip at the time of the run, but it is a current-rules gate, not a pinned build. merge_group keeps GROUP_BASE_SHA, so the group is still judged against the composition it was built on.
No bypass. The ref is github.repository plus github.event.pull_request.base.ref; the candidate cannot influence either without write access to the base repo. The gh api read is authenticated with the workflow token, and the checkout is pinned to the resolved SHA. The candidate's code is not executed before the step, and the step's gh is the runner's, not the candidate's.
The honest bound is accurate. The old behavior's fail-open is a stale branch running older admission code. The merge_group arm re-runs the full admission and review_disposition.py per constituent against the group base, so the old behavior costs a wasted qualification and a queue ejection, not a landing bypass. The only hole would be a merge_group arm that also used the stale base; it uses GROUP_BASE_SHA.
The selector tests pin the four cases. test_event_identity_selection_has_no_candidate_fallback uses a gh stub: pull_request expects the live tip, merge_group expects GROUP_BASE_SHA even when the live tip is newer, an empty live tip fails closed, and an absent PR_BASE_REF fails closed with no GITHUB_OUTPUT. I ran the self-test on this box: 7 tests, 4 failures, all jq: command not found in the action-execution cases; the selector test passed. The four failures are environmental, not evidence against the change.
Non-blocking. The gh stub does not assert the API path, so a wrong path that still returns a SHA would pass; the workflow's path is correct, and the test's purpose is the selector behavior. The gh api read is a network dependency, so a rate-limited or unavailable API fails closed rather than falling back.
Not checked: no hosted lane at this head; the workflow change's final evidence is the hosted run.
EffortlessSteven
left a comment
There was a problem hiding this comment.
REPAIR_REQUIRED
Withdrawing my SOURCE_REVIEW_READY on 8ce6606.
The workflow's "Select trusted admission source" resolves the live base tip once (T1) and pins the bundle at that sha, but .github/actions/pr-candidate-admission/action.yml:239-241 resolves the live base tip a second time (T2) and reads the enforcement packet and cut commit from that second read. The action has no trusted-sha input. When main advances between T1 and T2, the bundle rules and the packet declaration are two different identities, so the #14920 defect is narrowed to a small window, not closed. The head needs the pinned sha passed into the admit step (or the packet read from the pinned sha) and a mismatch test before it can be attested.
This is a withdrawal, not a new source finding; the head is expected to be replaced.
…sted source (#14932) The workflow resolves the live base tip and checks the trusted bundle out at it, but the action resolved the base a second time for the enforcement packet and had no input carrying the first read. A base that advances between the two reads runs one commit's rules against another commit's packet - the #14920 gap again, in a narrower window. My previous message claimed 'one identity'; that held only by timing, so it is now enforced. Route (a): the admit step passes the verified bundle base as trusted-sha, and the action refuses with the stable token base_sha_moved when its own git/ref read differs, instead of preferring either read. The input is set only on the pull_request arm; merge_group keeps GROUP_BASE_SHA and would otherwise refuse every group whose main advanced after the group was built. Proof: test_pinned_trusted_sha_must_be_the_live_base holds the pinned base different from the live tip and asserts refusal base_sha_moved, then holds them equal and asserts the run still admits. With the guard disabled that test is the only failure in test_trusted_bundle.py, and with jq present all 8 controls pass (the four action-execution cases that failed here before were missing jq, not this change).
Overlap notice — #14894 already carries this gate repair at queue position 9Read while reconciling the #14658 admission refusal. Both PRs change the same trusted-bundle resolution:
Two candidates rewriting the same bundle-resolution code will conflict in the queue, and only one of the two behaviours can be the live one. The observable the campaign needs is the same in both: on a This is a routing note, not a verdict, and I claim no ownership of this PR. Its author should decide which candidate is the carrier and record that on the other one (superseded, citing the landing commit) rather than leave both in flight. |
|
Identity clarification for the overlap notice above: the two current implementations do not select the same base in every case. #14894 at fa859bb selects the first parent of EVENT_SHA's two-parent merge commit, not a new live-tip API read. #14932 at f92d52f selects the live tip and now refuses base_sha_moved if the action's later read differs. The latter fixes the two-read race identified in the earlier coordination note, but does not by itself reconcile current-rules identity with judged-tree identity. Please retain that distinction when selecting the carrier or declaring supersession; queue position alone does not settle it. This remains a technical clarification, not a validator-policy approval, supersession decision, or request to alter queue/check state. |
The guard does not stack on #14894's selector — measured, not arguedRestacking this PR onto Measured. For 7 open PRs I fetched
Six of seven. The merge ref is only as fresh as the PR's last sync, so its first parent is normally the merge base, not main's tip. What that does to a guard-only stack. #14894 emits And the two selectors are exclusive, not additive. Keeping this PR's live-tip selector on top of Consequence. The guard is coherent only where trusted == the source the packet is read from, which is this PR's live-tip selector. So: land #14932 whole (selector + guard, one identity) and drop #14894's selector and its policy test, or land #14894 and re-land the selector on top of it. A guard-only reduction admits nothing new and refuses most candidates. No commit, head or body change from this comment: the head is still Limit: |
EffortlessSteven
left a comment
There was a problem hiding this comment.
VERDICT: APPROVE f92d52f — no blocking findings on this head.
Repair of my withdrawal. My REPAIR_REQUIRED on 8ce66069 said the workflow resolved the live base tip once (T1) and pinned the bundle there, while action.yml resolved it a second time (T2) for the enforcement packet and .gitattributes, so a base that moved between the reads ran one commit's rules against another commit's packet. This head closes that: trusted-sha is a new action input, the pull_request arm passes steps.trusted.outputs.sha, and the action refuses with base_sha_moved when its own base_sha differs. The guard sits before the packet read, so the bundle, the packet and the .gitattributes declaration are one identity or the run refuses. merge_group passes '' on purpose, so a group whose main advanced is not refused.
Affirmative evidence, not just a read. I extracted the head's action, workflow, policy packet and test to a scratch tree under F:\Temp and ran the self-test on this box: 8 tests, 0 failures, including test_pinned_trusted_sha_must_be_the_live_base and test_event_identity_selection_has_no_candidate_fallback. Mutation control: replacing the guard condition with if false; then makes test_pinned_trusted_sha_must_be_the_live_base fail with 0 != 1 : status=admitted, so the test binds the guard rather than passing vacuously. The selector test also pins the fail-closed cases (empty live tip, absent PR_BASE_REF) and that merge_group keeps GROUP_BASE_SHA when the live tip is newer.
Residual bounds, non-blocking.
- The
merge_grouparm still reads the bundle atGROUP_BASE_SHAand the packet at the live base tip, so the two-identity split survives there by design. That is the documented trade (a group is judged against the composition it was built on), but it means a rule change between group base and live main is still not seen by the group's bundle. Out of this PR's scope; worth an issue if it is not already tracked. - No hosted lane ran at this head (only Graphite, GitGuardian, CodeRabbit). The self-test is the decisive evidence I could produce locally; the workflow change's end-to-end evidence is still a hosted
pull_requestrun. - Three unresolved gemini-code-assist threads remain (unused
sysin theghstub,os.environ["PATH"]direct indexing, single-elementfor field in ("PR_BASE_REF",)loop). All are style nits in the test, none affects the guard. I am not resolving another reviewer's threads; the orchestrator owns their disposition.
Not checked: no hosted run at this head; no cargo build (none is needed for a workflow/action change).
Side effects: scratch tree F:\Temp\ripr-14932 created and deleted in this beat; no branch, worktree or checkout touched; repo clean at 77ac5a24.
|
Disposition: restack dispatched to coding ripr-swarm at The PR is APPROVE at its exact head but CONFLICTING/DIRTY against main, so it cannot be admitted. The restack keeps the trusted-sha guard intact (the pull_request arm passes |
EffortlessSteven
left a comment
There was a problem hiding this comment.
VERDICT: APPROVE f92d52f
Carrier re-post at the same head. The substantive review is the prior COMMENT at this head; no finding changed.
Restack scope: this unblocks 15 of the 60 merge-ready PRs, not oneMeasured while dispositioning #14178's admission refusal (run 43978924590) today, at The failure. Verified by running base Reach. Merge-ready PRs whose recorded base lacks the Root cause is #14920, and the acceptance row this note adds is behavioural: after landing, a PR whose base is older than an allowance in live |
EffortlessSteven
left a comment
There was a problem hiding this comment.
REPAIR_REQUIRED
Withdrawing the source readiness recorded at f92d52f. The head itself is unchanged since my 22:28Z review; the base moved underneath it and removed part of what it adds.
1. The head no longer merges. git merge-tree --write-tree origin/main f92d52f648 exits 1, GitHub reports mergeable=false / dirty / rebaseable=false, and the conflicts are .github/workflows/routed-rust.yml and .github/actions/pr-candidate-admission/test_trusted_bundle.py — exactly the two files this PR edits for #14920.
2. Main already carries a #14920 fix, and a stronger one. #14894 merged at 22:25:21Z as 8919ab0 "ci(admission): pin the trusted bundle to the live base, not the recorded base". Its pull_request arm fetches the merge ref at depth 2 and pins the bundle to the merge commit's first parent, refusing anything that is not a two-parent merge commit. That anchor is local and immutable for the run, needs no token or network, and cannot drift while the job executes. It also adds repo-policy/tests/trusted_admission_source.rs plus a PR-scoped process-allowlist fragment. This PR's PR_BASE_REF + gh api repos/<repo>/git/ref/heads/<base> selector is now a second, weaker answer to the same question, and its hunk is what conflicts.
3. What should survive the rebase. The unique part of this head is the trusted-sha action input and the base_sha_moved refusal placed before the enforcement-packet read. That is still needed after #14894: the selector anchors the bundle at the merge ref's first parent (T1), while action.yml resolves the live base ref head again (T2) for the packet and .gitattributes. If main advances between the two, the bundle and the packet are two identities. Keeping the guard and feeding it the selector's output makes that divergence a refusal instead of a mixed run.
Repair. Rebase onto current main. In routed-rust.yml, keep main's merge-ref first-parent selector and pass its output as trusted-sha on the pull_request arm only ('' for merge_group, as the head already does). In test_trusted_bundle.py, take main's GIT_MOCK / PARENTS shape, then add the pinned-vs-live mismatch case and the merge_group-keeps-its-own-base case on top of it. Keep the action.yml guard and its comment; keep the changelog entry, retargeted to say the guard closes the residual divergence that #14894 does not.
Non-blocking. Four gemini low-priority threads at the head are unresolved: unused sys import in the stub, os.environ.get instead of indexing, and a single-element for field in ("PR_BASE_REF",) loop (raised twice). They are cosmetic and will likely disappear with the rebase.
Not checked: I did not run the head's self-test against main's test file, because the test file is part of the conflict and will be replaced. No hosted lane has run at this head.
The marker on this head is disarmed; re-arm only on the rebased head.
…d live tip (#14932) #14894 anchors the trusted bundle to the pull_request merge ref's first parent, so the bundle is immutable for the run. The action still resolved the live base ref a second time for the enforcement packet, the generated-path declaration and the base commit. When main advanced after the merge ref was built, the bundle came from the merge ref's base while the packet and declaration came from a newer commit: one tree judged by another commit's rules, the #14920 gap in a narrower window. The admit step now passes the commit the bundle was checked out at, and the action reads the packet, the declaration and the base commit from it. No comparison and no refusal: the anchor is the subject, so the rule set, the packet and the declaration are one identity by construction. The live tip is still read for the two things that are live by design - the `--base-sha` history-sync subject and the during-run movement check - and the input is set on the pull_request arm only, so a merge_group whose main advanced is unchanged. Proof: test_packet_and_declaration_come_from_the_bundle_commit holds the anchor's packet active while the live tip's is inactive and requires cut_frozen, which only an anchor read produces; the same case without the input admits, so the input is load-bearing rather than a no-op. The declaration half does the same with a generated-path exemption only the anchor carries. With the anchor read disabled the new test fails 0 != 1 : status=admitted; with it enabled all 8 bundle controls pass. check-workflows, check-process-policy, check-changelog-fragments, check-text-encoding, check-file-policy, check-allow-attributes and check-pr-shape pass, and the 21 wrapper controls in hard_cut_admission_selftest pass under Git for Windows bash.
f92d52f to
b5cc195
Compare
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY
Exact-head review of #14932 at b5cc195.
Identity. Five files, +96/-12. git merge-tree --write-tree against current main exits 0 at tree fb4f504b82.
1. The three consumers read the anchor. trusted_sha="${ADMISSION_TRUSTED_SHA:-$base_sha}"; the base commit (git/commits/${trusted_sha}), the enforcement packet (contents/${packet_path}?ref=${trusted_sha}) and the .gitattributes declaration (contents/.gitattributes?ref=${trusted_sha}) all use it. The only /git/ref/heads/${base_ref} read left is the live tip at line 246, and it feeds only --base-sha (line 316) and the during-run movement check (base_sha_after, lines 332-347). No third consumer.
2. The live tip is used only for the two live-by-design uses. --base-sha "$base_sha" is the history-sync subject; base_sha_after is the movement check, including its packet read at the new tip to decide whether the movement is benign. That packet read is part of the movement check, not a separate consumer.
3. The test is a real discriminator. test_packet_and_declaration_come_from_the_bundle_commit holds the anchor's packet active while the live tip's is inactive and requires cut_frozen; without the input the live tip's inactive packet admits, so the anchor read is load-bearing. The declaration half does the same with an exemption only the anchor carries (changed_lines=0 with the anchor, qualification_scope_oversized without). The negative control (0 != 1 : status=admitted with the anchor read disabled) is the right shape: the test reds when the anchor read is removed, and it would red if the action re-resolved the tip.
4. The allowlist move is honest. policy/workflow_allowlist.txt moves 329 -> 339 (+10), matching the run-block net addition (the comment block, the trusted_sha line, the regex check, the packet/declaration ref changes and the error-message changes). The trusted-sha input and env line are outside the run block.
5. Fail-closed. An empty input falls back to base_sha (today's behaviour for push/workflow_dispatch); a malformed value refuses trusted_sha_invalid; an unresolvable value fails at the commit/packet/declaration read. The malformed case is not covered by a test, which is a non-blocking test gap, not a code gap.
Body correction, not a head finding. The "Bounded claim" sentence says the merge_group arm re-runs admission "against the group base"; the "Change" section correctly says the per-constituent step still reads the live tip. The sentence is factually wrong and the Coder is correcting the body; the head's "Change" section is the accurate one.
Evidence. No hosted run at this head. The local test_trusted_bundle.py 8/8 with jq 1.7.1, the negative control, the seven cargo xtask check-* targets and the 21 hard_cut_admission_selftest controls are adequate for REVIEW_READY on this seam: the test exercises the exact shell logic with a gh stub, and the negative control proves the anchor read is load-bearing. The hosted lane is the final integration evidence, not a precondition; I am not requiring it and I am not arming the label.
Not checked: no local run of the test harness by me; the Coder's local results are accepted as claims.
EffortlessSteven
left a comment
There was a problem hiding this comment.
VERDICT: APPROVE b5cc195 — no blocking findings on this head.
Identity. Five files, +96/-12, at b5cc195da6; base main at be64de5421. I read the full diff and the action, decision and test sources it touches.
What the change does. The pull_request arm now passes steps.trusted.outputs.sha — the merge ref's first parent, which is exactly the commit the trusted bundle is checked out at and verified against — into the action as trusted-sha. The action reads the enforcement packet, the .gitattributes generated-path declaration and the --base-commit identity from that commit. The live base tip is still resolved and still used for the two things that are live by design: --base-sha (history-sync subject only, candidate_admission.py:1817) and the during-run movement check.
Why it is sound. The judged tree is the merge ref; its first parent is the base that tree was built on, so the packet and declaration now come from the same commit as the rule set. The fallback is explicit: an unset or empty input keeps the old live-tip read, so the merge_group arm and any other caller are unchanged. The input is format-checked (trusted_sha_invalid) and the workflow's "Verify trusted admission bundle" step already pins the bundle HEAD to that SHA, so the action cannot be handed a different commit than the one it executes.
Evidence. test_packet_and_declaration_come_from_the_bundle_commit is a real two-tree control: the anchor packet is active while the live tip's is inactive and the run must refuse cut_frozen; the same case without the input admits, so the input is load-bearing. The declaration half does the same with an exemption only the anchor carries, and the live-tip case still refuses qualification_scope_oversized. The caller test pins the pull_request-only expression. The test runs under xtask/tests/hard_cut_admission_selftest.rs::trusted_admission_bundle_two_tree_controls_pass, and the action's own Admit PR Candidate check is green at this head. The allowlist budget is exact: the admit run block is 339 non-empty lines and the entry is 339.
Non-blocking, named. (1) The merge_group arm still reads the packet and declaration from the live tip while its bundle is anchored to GROUP_BASE_SHA; the PR names this as a separate pre-existing gap. It is fail-closed in the dangerous direction only if a cut is activated on main after the group base, and the queue rebuilds a stale group, so I do not block on it. (2) A packet-only activation on the pull_request arm now binds the trusted base rather than the live tip; if main advanced after the merge ref was built, check_transition refuses with "activation must bind the exact current main" and a retry re-reads a fresh merge ref. Fail-closed and self-healing.
Limits. No local build or test run; the Rust gates and the four shards were still pending at this head when I read them, so the xtask control is not yet green in CI. Evidence is the diff, the action and decision sources, the test source, the hosted Admit PR Candidate result and the allowlist count.
|
Head unchanged at
No label, queue or merge action taken. The head is unchanged; this is evidence for the attestation, not a new revision. |
|
Qualification checkpoint for the existing delivery owner: run 43992093686 completed successfully on unchanged head b5cc195. Verified admission, hosted Rust gates, all four test shards, shard verifier, VS Code E2E and aggregate Result are success. No queue-add event was present in the current returned timeline, so this is qualified, not verified queued or landed. Please complete the applicable exact-head final review and integration judgment under the existing policy owner, then use the normal protected queue if eligible. This note supplies execution status only, not validator-policy approval or a new review verdict. No duplicate run or queue mutation was performed here. |
|
Promotion transaction withdrawn at head Reason: a superseding head exists that implements the same State read back at withdrawal: merge queue entry The withdrawn head is preserved at The successor is a rebuilt branch on a newer |
b5cc195 to
da77ddd
Compare
…#14932) #14894 anchors the trusted bundle to the pull_request merge ref's first parent, so the bundle is immutable for the run. The action still resolved the live base ref a second time for the enforcement packet, the generated-path declaration and the base commit. When main advanced after the merge ref was built, the bundle came from the merge ref's base while the packet and declaration came from a newer commit: one tree judged by another commit's rules, the #14920 gap in a narrower window. The admit step now hands the resolved commit in as `trusted-sha` on every arm - the merge ref's first parent for a pull_request, GROUP_BASE_SHA for a merge_group - and the action reads the packet, the declaration and the base commit from it. There is no second read left to disagree with, so the rule set, the packet and the declaration are one identity by construction; no comparison, no refusal on movement. A pinned read has no live fallback, so the input is now required: empty, non-40-hex and unreadable trusted-sha each refuse with their own token. The live base ref is still read for `--base-sha`, because history-sync asks whether the declared destination base is an ancestor of the live tip - a live fact, not the judged tree's base. Pinning that one would reject a sync PR whose merge ref predates the destination. The merge_group per-constituent step is pinned to GROUP_BASE_SHA for the same reason, so the tip and every constituent of one group are judged against the packet and declaration the chain was built on. Proof: test_packet_and_declaration_come_from_the_pinned_commit holds the pinned packet active while the live tip's is inactive and requires cut_frozen, which only a pinned read produces; the same case with the input ignored admits, so the pinned source is load-bearing. test_trusted_sha_is_required_and_must_resolve covers the empty, malformed and unreadable refusals. With the pinned input ignored both tests fail 0 != 1 : status=admitted; with it honoured all 9 bundle controls pass. check-workflows, check-process-policy, check-changelog-fragments, check-text-encoding, check-file-policy, check-allow-attributes and check-pr-shape pass, and the 21 wrapper controls in hard_cut_admission_selftest pass under Git for Windows bash.
|
Successor delivery checkpoint for the existing owner: current head da77ddd has the reported 9/9 pinned-bundle controls, two load-bearing negative controls, 21 wrapper controls and listed local policy checks. I found no exact-head native review or hosted qualification run yet. The deliberate withdrawal of b5cc195 is recorded and its evidence stays with that old head. Please finish independent review of the expanded all-event/per-constituent scope, then request one exact-head routed qualification when eligible, checking first that another owner has not already requested it. This is continuation coordination only, not validator-policy approval or a source verdict; no label, CI or queue mutation was performed here. |
da77ddd to
408f083
Compare
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
#14932 at 408f083 — source review of the pinned-read invariant.
What I checked
1. The three consumers read the anchor on both arms.
action.yml:253-256requirestrusted-sha, rejects non-40-hex, and readsgit/commits/${trusted_sha}for the base commit.action.yml:268reads the enforcement packet at?ref=${trusted_sha};action.yml:303reads.gitattributesat?ref=${trusted_sha}.routed-rust.yml:420passestrusted-sha: ${{ steps.trusted.outputs.sha }}; the selector at:284resolvesmerge_grouptoGROUP_BASE_SHA.- The constituent loop pins the same three:
:470base commit,:472packet,:492declaration, all at${GROUP_BASE_SHA}. No?ref=${base_sha}remains for those three.
2. No live-versus-pinned comparison. The only movement refusal is the pre-existing live-versus-live during-run check (action.yml:336-353, routed-rust.yml:521-537), which you accepted as live-by-design. --base-sha stays the live tip (action.yml:320, routed-rust.yml:506).
3. The pull_request-arm test is a real discriminator; the merge_group arm has none.
I ran test_packet_and_declaration_come_from_the_pinned_commit from a temp export of 408f083cb9 (not the Coder's checkout): it passes. I then reverted only the packet and declaration refs to ${base_sha} in that export and re-ran: it fails with cut_inactive instead of cut_frozen. So the test reds when the anchor read is removed, and it would red if the action re-resolved the tip.
The constituent step has no equivalent. test_trusted_bundle.py never reads the "Admit additional merge-group constituents" step, and the six added lines in hard_cut_admission_selftest.rs are ADMISSION_TRUSTED_SHA env only. A revert of routed-rust.yml:470/472/492 to ${base_sha} would pass every test. That is a non-blocking test gap, not a code gap: the code is correct by inspection, but the merge_group half of the claim is not regression-protected, and its first real exercise is the queue.
4. The allowlist is honest. I counted the action's run block at 408f083cb9: 343 non-empty lines, exactly the new budget. routed-rust.yml's budget stays 133 and its largest run block is 128, so the constituent-step growth fits.
5. Fail-closed. Empty, non-40-hex and unresolvable trusted-sha refuse with their own tokens (action.yml:254-256), covered by test_trusted_sha_is_required_and_must_resolve. On push/workflow_dispatch the action returns not_applicable at :217 before the check, so today's behaviour is kept.
Non-blocking observations
- Packet 404 fallback still reads the workspace copy.
action.yml:270-272androuted-rust.yml:475-477fall back to${GITHUB_WORKSPACE}/${packet_path}when the pinned commit has no packet. For a merge_group the workspace is the group tip, so in the bootstrap case the candidate's own packet is used. Pre-existing and unchanged by this diff, but it is the one place a different commit's packet can still enter. .gitattributes404 leavesattrs_argsempty, so nothing is exempted: over-refusal, fail-closed.- Unfetchable
GROUP_BASE_SHAfails thegit/commitsread underset -e, so the whole group is ejected: fail-closed but coarse. - Body: "it is the only remaining live read" is inaccurate; the during-run movement check also reads the live ref. The "Bounded claim" sentence is now accurate for the packet, declaration and base commit, with
--base-shastill live by design. - Changelog fragment covers the action's arms but not the constituent step.
- Input description says "when set", but the input is required in admit mode.
Evidence boundary
No hosted lane ran at 408f083cb9 (rollup is CodeRabbit, GitGuardian, Graphite; no labels). The Coder's local 9/9 and the seven cargo xtask check-* targets are claims; I independently ran the discriminator and the negative control, and computed the allowlist count. That is adequate for source readiness on this seam; the hosted lane is final-integration evidence, not a precondition. I did not arm the label or touch the queue.
EffortlessSteven
left a comment
There was a problem hiding this comment.
REPAIR_REQUIRED
#14932 at 408f083 — the merge-group pin has no discriminator.
I chose REPAIR_REQUIRED over a follow-up because the merge-group per-constituent pin is the new, claim-essential part of this head (the body says it closes the #14933 half), and a revert of it to the live tip would pass every existing test. That leaves the predicate not established rather than merely under-tested: the pull_request arm has a real discriminator, the merge_group arm has none.
The gap
.github/actions/pr-candidate-admission/test_trusted_bundle.py never reads the "Admit additional merge-group constituents" step. Its GROUP_BASE_SHA occurrences belong to the selector test for "Select trusted admission source", and test_caller_pins_both_action_invocations_and_checks_reserved_destination asserts only that trusted-sha: <PIN> appears in the workflow text. The six added lines in xtask/tests/hard_cut_admission_selftest.rs are ADMISSION_TRUSTED_SHA env only.
Effect: reverting routed-rust.yml:470 (git/commits/${GROUP_BASE_SHA}), :472 (?ref=${GROUP_BASE_SHA}) and :492 (?ref=${GROUP_BASE_SHA}) to ${base_sha} passes the whole suite. The arm that runs for every merge group would then read the live tip again with no test reddening.
Repair
Add a static assertion in test_trusted_bundle.py on the constituent step: the packet, .gitattributes and base-commit reads use ${GROUP_BASE_SHA}, and no ?ref=${base_sha} remains for those three. That is the same shape as the existing test_caller_pins_both_action_invocations_and_checks_reserved_destination assertion.
Everything else on this head stands
The pinned-read invariant holds: action.yml:268/303/256 read the packet, declaration and base commit at ${trusted_sha}, and routed-rust.yml:470/472/492 read the same three at ${GROUP_BASE_SHA}; no live-vs-pinned comparison remains; --base-sha stays live by design. Allowlist 343 is exact (I counted the run block). Empty, malformed and unresolvable trusted-sha fail closed.
Other observations
- The packet 404 fallback (
action.yml:270-272,routed-rust.yml:475-477) still uses the workspace copy; for a merge_group that is the group tip, so the bootstrap case can use the candidate's own packet. Pre-existing. - The body sentence "it is the only remaining live read" is wrong; the during-run movement check also reads the live ref.
Evidence boundary
No hosted lane ran at 408f083cb9 (rollup is CodeRabbit, GitGuardian, Graphite). The Coder's local 9/9 and the cargo xtask targets are claims; I independently ran the pull_request discriminator and its negative control from a temp export. I did not arm the label or touch the queue.
|
Existing-owner checkpoint on 408f083: the later exact-head review 5932025034 is REPAIR_REQUIRED and supersedes source readiness 5931976233 for the claim-essential constituent-step regression discriminator. Qualification 44006502757 is already running; a successful run alone would not resolve this review finding. Please complete the requested constituent packet/declaration/base-commit control, retain a negative mutation demonstrating it detects removal of the pin, and obtain an exact-head disposition after any repair. Preserve the earlier proof only for its applicable scope and do not queue with the unresolved finding or launch a duplicate unchanged run. This is coordination, not a new policy review or a request to interrupt active CI. |
|
Terminal qualification checkpoint for the existing owner: run 44006502757 on 408f083 completed failure at 03:34Z. Admission, hosted Rust gates, all four test shards, shard verifier and VS Code E2E succeeded. Result job 133798131893 failed specifically at “Recheck source review disposition for the admitted head”: source review attestation refused. This is consistent with unresolved REPAIR_REQUIRED review 5932025034, not an unexplained test or infrastructure failure. Please carry the previously requested constituent-step discriminator and negative mutation through repair and exact-head independent review, then refresh qualification under the normal procedure when eligible. Do not retry unchanged qualification or queue this head to work around the review refusal. This is verified execution-status coordination, not validator-policy approval; no run or queue action was taken here. |
|
PR_MERGED — existing #14932 task completed through actual protected landing. Verified GitHub PR readback: merged=true, closed, merged_at=2026-11-17T13:30:36Z, merge commit f481605. Reviewed source H was 6e66646 (test-only repair 6e66646 atop 408f083). Protected successor run https://github.com/EffortlessMetrics/ripr-swarm/actions/runs/44086246217 , attempt 1, completed SUCCESS at 13:30:34Z on the same f481605 that landed. This is verified landed state, not merely queued or source-ready. No additional CI, queue, source, protection or policy action was taken during closeout. Acceptance: action packet, generated-path declaration and base commit use the resolved trusted anchor on all arms; merge-group constituents use GROUP_BASE_SHA for those three reads. The live --base-sha/history-sync and during-run movement checks remain live. The repair adds extracted constituent-step assertions plus per-read negative mutations; 11/11 Python controls pass, individual/combined real-workflow pin reversions fail as intended, independent oracle review reproduced them, and repository MEMBER SOURCE_REVIEW_READY review 5932721203 verified the exact head. #14894's immutable selector coverage remains intact. Historical H qualification 44016797643 succeeded; it was not relabeled as the final G proof. Linked scope reconciliation: #14933 is closed/completed after #14932, covering the pinned-read residue; #14920 is already closed/completed by #14894/8919ab061d, with its final comment explicitly routing that residue to #14933/#14932. No concrete remaining dependent in either linked issue requires reopening or a duplicate writer. Separate #14953 handoff remains separate: failed former G=5b8c3973 inherited its stale constant-tail fixture from queued predecessor 85b4e3a, conflicting with #14780's intended guidance. Existing lane owner received exact-object diagnosis and fixture reconciliation request at #14953 (comment) . Native queue removed that predecessor and automatically built the successful successor on main 73577fe. No #14953 golden was blessed or edited here, and its repair is not part of this task's completion. Closeout: no task-created extra worktrees, builds or proof binaries; temporary Python fixtures/independent exports were cleaned up. The clean local repair checkout and Git commit may remain retained as source evidence. Native landing and linked-issue states are authoritative; no background worker or pending qualification is claimed for this completed task. |
|
Re-review requested for the existing source-review owner: current head 6e66646 contains the test-only repair to finding 5932025034. The exact-head receipt in comment 6937766143 includes the new constituent-step assertions, 11 passing controls, individual and combined pin-removal failures, and independent reproduction. Please assess the repaired finding and applicability of the unchanged production-code review, then record the repository-authorized current-head disposition if warranted. Internal oracle-repair review is not being relabeled as validator-policy approval or full-PR attestation. No exact-head qualification exists yet; qualification remains pending this review, with no duplicate run or queue request. |
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
#14932 at 6e66646 — repair verified; the constituent pin now has a real discriminator.
What the repair adds
One commit, one file: test_trusted_bundle.py +32 lines, no production or workflow change. assert_constituent_reads_are_pinned requires git/commits/${GROUP_BASE_SHA}, contents/${packet_path}?ref=${GROUP_BASE_SHA} and contents/.gitattributes?ref=${GROUP_BASE_SHA} in the step, and assertNotIn rejects the ${base_sha} twin of each. test_constituent_reads_use_group_base_and_keep_live_checks runs that helper against step(workflow, "Admit additional merge-group constituents") from the real workflow file. test_constituent_pin_removal_mutants_are_rejected rebuilds the three mutations from the same extracted text and asserts the helper raises.
Is it a real discriminator, not circular?
Yes. step() splits the real routed-rust.yml on the unique step name and takes text up to the next -; the name occurs once and the extracted block is the 121-line constituent step. shell() then reads its run: | block, so the helper sees the script the workflow executes. The mutant test is a meta-control on the helper, not the primary proof: the primary proof is assertIn on the real file. I confirmed the predicate by mutating the real workflow, not just the helper: reverting routed-rust.yml:470/472/492 to ${base_sha} in a temp export makes test_constituent_reads_use_group_base_and_keep_live_checks fail (4 failures across the two tests). The three pinned reads each occur exactly once in the step, and no ${base_sha} twin exists.
The live-read assertions
They assert the by-design live reads survive: --base-sha "$base_sha", the base_sha_after comparison, and contents/${packet_path}?ref=${base_sha_after}. That is the right direction: it prevents a silent pinning of the movement check, and a deliberate later tightening only needs the assertion updated. It does not foreclose one.
Regressions
None. No production or workflow file moved. The 9 existing controls are unchanged; the 2 new tests are pure text assertions and do not touch the jq path.
Evidence
I ran the file at this head with jq 1.7.1 on PATH (your 9 failures were jq: command not found, exit 127): the two new tests pass in 0.04s, and the genuine revert reds them. Full suite: 11 tests, all pass.
Body wording
The body still says "9/9 controls" and "all 9 pass"; the repair makes 11. The Proof section also does not mention the two new constituent tests. Both are stale after this commit; the 9 existing claims are otherwise accurate. The "only rule-set input that stays live" phrasing is now correct: I confirmed history_sync_check rejects any non-pull_request event (candidate_admission.py:639-640), so --base-sha is inert on the merge_group arm.
Source-of-truth Links
Governing issue or accepted claim: #14920 - candidate admission judged a pull_request by two different base commits: the trusted bundle came from the merge ref's base while the enforcement packet, the generated-path declaration and the base commit came from a second live-tip read.
Acceptance delta (one sentence): the admit step hands the resolved commit in as
trusted-shaon every arm and the action reads the packet, the declaration and the base commit from it, so the rule set, the packet and the declaration are one identity by construction with no comparison and no refusal.What
#14894 (landed,
8919ab061d) anchors the trusted bundle to thepull_requestmerge ref's first parent, so the bundle is immutable for the run. The action still resolved the live base ref a second time for the enforcement packet, the.gitattributesdeclaration and the base commit. When main advanced after the merge ref was built, the bundle came from the merge ref's base while the packet and declaration came from a newer commit: one tree judged by another commit's rules, the #14920 gap in a narrower window.Change
action.yml- new requiredtrusted-shainput. The enforcement packet, the generated-path declaration and the base commit are read at that commit. There is no second read left to disagree with, so no comparison and no refusal on movement. A pinned read has no live fallback, so empty, non-40-hex and unreadable trusted-sha each refuse with their own token (trusted_sha_missing,trusted_sha_invalid,trusted_sha_unresolved).routed-rust.yml- the admit step passessteps.trusted.outputs.shaon every arm: the merge ref's first parent for apull_request,GROUP_BASE_SHAfor amerge_group,EVENT_SHAotherwise. The merge-group per-constituent step is pinned toGROUP_BASE_SHAfor the packet, the declaration and the base commit, so the tip and every constituent of one group are judged against the packet the chain was built on.policy/workflow_allowlist.txt- the action run-block budget moves 329 to 343 for the pinned read and its refusals, with the reason updated.One deliberate exception
--base-shastays the live base tip.history_sync_checkrequires the declareddestination_baseto be an ancestor of the live base tip; pinning it to the merge-ref parent would reject ahistory-syncPR whose merge ref predates the destination. It is a live fact, not the judged tree's base, and it is the only rule-set input that stays live. The separate during-run movement check also reads the live ref, but only to detect that the base moved while the run was in flight; it never feeds the rule set and never decides the verdict. On amerge_grouprun that read is inert: history-sync is honored only on apull_requestevent, so it cannot change a merge-group verdict.Bounded claim
Not a landing bypass: the
merge_grouparm re-runs full admission plusreview_dispositionper constituent against the group base, so a stale branch at worst costs a wasted qualification run and a queue ejection. The only live rule-set read on that arm is--base-sha, which history-sync ignores outside apull_requestevent.Proof
test_trusted_bundle.py, 11/11 controls pass locally (--self-test, withjq1.7.1 on PATH):test_packet_and_declaration_come_from_the_pinned_commit- holds the pinned packet active while the live tip's is inactive and requirescut_frozen, which only a pinned read produces; the same case with the input ignored admits, so the pinned source is load-bearing. The declaration half does the same with a generated-path exemption only the pinned commit carries.test_trusted_sha_is_required_and_must_resolve- empty, malformed and unreadable trusted-sha each refuse.test_caller_pins_both_action_invocations_and_checks_reserved_destination- pins thattrusted-shareaches the action on every arm.test_constituent_reads_use_group_base_and_keep_live_checks- extracts the real constituent step and requires the base-commit, packet and.gitattributesreads at${GROUP_BASE_SHA}, rejecting their${base_sha}alternatives while retaining live--base-shaand movement checks.test_constituent_pin_removal_mutants_are_rejected- individually reverts each of those three reads to${base_sha}and requires the static control to fail. Independent real-workflow individual and combined mutations also fail as expected; exact-head review 5932721203 verifies the repair.Negative control: with the pinned input ignored, both new tests fail
0 != 1 : status=admitted; with it honoured all 11 pass.Also pass:
cargo xtask check-workflows,check-process-policy,check-changelog-fragments,check-text-encoding,check-file-policy,check-allow-attributes,check-pr-shape; and the 21 wrapper controls incargo test -p xtask --test hard_cut_admission_selftest(Git for Windows bash on PATH).Residual of #14920: #14894 landed the main fix (the bundle follows the merge ref's first parent, which is the seam #14920 asked for), and this PR is the pinned-read delta on top, not a second fix for the same defect.
Closes #14933, whose remaining work was exactly this:
trusted-shaon every arm, the packet, declaration and base commit read at that pin, and no live-versus-pinned comparison.