Skip to content

ci(merge_group): validate all constituent PRs in multi-PR batches (#8082) - #14671

Merged
effortlessg41[bot] merged 18 commits into
mainfrom
hill/ci-merge-group-batch
Nov 16, 2026
Merged

effortlessg41[bot] merged 18 commits into
mainfrom
hill/ci-merge-group-batch

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Extend .github/workflows/routed-rust.yml merge_group routing, admission, and result evaluation to validate every constituent PR in a multi-PR merge-queue batch (single-parent linear chain of unique (#N) squash commits, same-repo check, live refs/pull/<N>/head + git merge-tree --write-tree binding, candidate_admission.py, review_disposition.py, unresolved threads, and mergeQueueEntry.id).
  • Update tools/repo-policy/src/lib.rs, tools/repo-policy/src/workflow_tests.rs, docs/MERGE_FLOW.md, and docs/CI.md.
  • Stacked on hill/ci-efficiency (ci: harden merge_group admission and disable incremental with sccache #14656).

Source-of-truth Links

Governing issue or accepted claim: #8082
Acceptance delta (one sentence): Validate all constituent PRs in a multi-PR merge_group batch across routing, admission, and result checks in routed-rust.yml.
Candidate branch: hill/ci-merge-group-batch (78747b5cf44e53a818bbab0207ba8e1afae32da0)
Stack parent or prerequisite PR: #14656 (hill/ci-efficiency)

Production & Evidence Delta

  • Production delta: none (.github/workflows/routed-rust.yml, tools/repo-policy/, docs/MERGE_FLOW.md, docs/CI.md).
  • Evidence delta: tools/repo-policy/src/workflow_tests.rs updated (78 passed).

Acceptance Matrix

Criterion Status
cargo policy check-workflows Passed (exit 0)
cargo test -p repo-policy --lib 78 passed, 0 failed (exit 0)
actionlint (author-run) Passed (exit 0)
Hosted CI & exact-head review Pending

Proof Actually Run

  • cargo policy check-workflows: passed (exit 0)
  • cargo test -p repo-policy --lib: 78 passed; 0 failed; 0 ignored (exit 0)

Limitations / Non-claims

  • Stacked on #14656; check-doc-index, markdown-links, and live merge_group run not yet executed.

Rollback Boundary

  • Revert commit 78747b5cf44e53a818bbab0207ba8e1afae32da0.

Source Review of Record

Source review: SOURCE_REVIEW_READY e5004c9

Delta review by the RIPR Reviewer at this head, 2026-11-15T20:08Z: APPROVE e5004c9, covering the merge of main 0ab323d into 48913a6 only. The one hand-resolved conflict extends max-changed-lines 3700 to the additional-constituent path, which is correct because #14735 states the cap per candidate, not per tip; leaving it at 3000 would make admissibility depend on queue position. All three CodeRabbit fixes survived the merge and the three pinned snippets match the merged workflow. Hosted qualification on this head is not established. The 8b8d44c packet stands for everything else; this is not a full re-review. Carried here by the operational root, because the reviewer role makes no GitHub writes in this campaign.

Recorded follow-ups (non-blocking)

  • The prefix pin no longer covers the truncation guard at routed-rust.yml:335, and the base-movement check at :500-518 has no contract row at all. Suggested anchors: [ "$count" = "$expected" ] || and [ "$base_sha_after" != "$base_sha" ].
  • No fixture supplies two or more constituents, so the constituent loop, the .[-1] tip rule and the per-constituent --docs-only path have zero coverage.
  • The contract table is duplicated in three files (lib.rs:1344, workflow_tests.rs:1284, xtask/src/tests.rs:9854), so one workflow edit needs three test edits.

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 20 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 146 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: d8741974-d44e-4e18-ac6b-f481ad55199a
Commits

Reviewing files that changed from the base of the PR and between 0a227e3 and e5004c9.

Files selected for processing: 10

  • .github/actions/pr-candidate-admission/test_history_sync_scope.py
  • .github/workflows/routed-rust.yml
  • changelog.d/14671-merge-group-constituent-admission.md
  • docs/CI.md
  • docs/MERGE_FLOW.md
  • tools/repo-policy/src/lib.rs
  • tools/repo-policy/src/workflow_tests.rs
  • xtask/src/tests.rs
  • xtask/tests/routed_dispatch_result.rs
  • xtask/tests/routed_queue_resolution.rs

Summary by CodeRabbit

  • New Features
    • Merge queues can now evaluate groups containing multiple pull requests, checking each one’s eligibility before selecting a runner.
    • Documentation-only status and other admission checks are evaluated for each pull request in the group.
    • Groups with incomplete or invalid pull request history are kept untrusted and aren’t sent to self-hosted runners.
  • Documentation
    • Updated merge-queue guidance to describe multi-pull-request group admission.

Walkthrough

The routed Rust workflow now validates and admits every constituent PR in a merge group. It checks the queue’s commit chain, live PR heads, changed paths, candidate status, review disposition, unresolved threads, and final eligibility.

Changes

Merge-group constituent admission

Layer / File(s) Summary
Resolve and bind queue constituents
.github/workflows/routed-rust.yml, tools/repo-policy/src/lib.rs, tools/repo-policy/src/workflow_tests.rs, xtask/src/tests.rs, xtask/tests/routed_queue_resolution.rs, docs/CI.md, docs/MERGE_FLOW.md, changelog.d/14671-merge-group-constituent-admission.md
The workflow validates a linear, single-parent commit chain and binds each constituent commit to its live PR head and queue entry. It classifies each constituent’s changed paths and checks repository identity. Policy tests, queue-resolution tests, and documentation cover these requirements.
Admit each constituent
.github/workflows/routed-rust.yml, .github/actions/pr-candidate-admission/test_history_sync_scope.py, xtask/tests/routed_dispatch_result.rs
The workflow uses the tip’s docs-only classification with fallbacks and independently performs candidate and hard-cut admission for non-tip constituents. The result test supplies the constituent list.
Check reviews and final eligibility
.github/workflows/routed-rust.yml, xtask/tests/routed_dispatch_result.rs
Request-time and final checks validate each constituent’s review disposition, unresolved threads, live PR state, and queue entry. The PR reader now accepts a target PR and expected head.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant MergeQueue
  participant RunnerSelection
  participant GitHubAPI
  participant CandidateAdmission
  participant ReviewRecheck
  MergeQueue->>RunnerSelection: Provide merge-group base and head SHAs
  RunnerSelection->>GitHubAPI: Look up constituent PR repositories
  GitHubAPI-->>RunnerSelection: Return repository identities
  CandidateAdmission->>GitHubAPI: Read each PR, changed files, and queue entry
  GitHubAPI-->>CandidateAdmission: Return constituent admission data
  CandidateAdmission->>ReviewRecheck: Pass admitted constituent list
  ReviewRecheck->>GitHubAPI: Read review decisions and threads for each PR
  GitHubAPI-->>ReviewRecheck: Return review and thread state
Loading

Possibly related issues

Merge Risk: Moderate · previous review 0a227

The merge-queue admission change can admit an oversized batch member through a truncated file list. It can also admit an additional batch member against a freeze that is no longer current. Both cases are narrow, but the checks should be fixed before relying on multi-PR batches.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description follows the repository template in part. It has a Summary, Source-of-truth Links with governing issue and acceptance delta, a Candidate Relationships note naming the stack parent (#146… Add the missing template sections: tick the Swarm / Source Boundary category, complete Scope Classification (production delta, evidence delta, single acceptance criterion, non-goals), mark Support-tier and Policy Impact (CI lane applies), a…
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title names the main change: merge-group CI validation of every constituent PR in multi-PR batches, which matches the routed-rust.yml, repo-policy, and docs changes described in the summaries and …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: merge-group CI validation of every constituent PR in multi-PR batches, which matches the routed-rust.yml, repo-policy, and docs changes described in the summaries and objectives. The title includes a PR number suffix and is 73 characters, which is acceptable. It is specific enough for a teammate scanning history.

Full details: Description check

Explanation

The description follows the repository template in part. It has a Summary, Source-of-truth Links with governing issue and acceptance delta, a Candidate Relationships note naming the stack parent (#14656), a Production and Evidence Delta, an Acceptance Matrix, Proof, Limitations, and Rollback. It omits or leaves blank several required template sections: the Swarm / Source Boundary checkboxes are not ticked, Scope Classification (one production behavior, single acceptance criterion, non-goals) is absent, Support-tier Impact and Policy Impact are not marked, Claim Boundary is missing, Spec-Test-Code Traceability is missing, Static Language Check is missing, CI Economics is missing although the PR changes workflows and the template requires it, and the Engineering and Gates checklists are not filled in. The description is mostly relevant but is missing several required sections, so it does not fully meet the template.

Resolution

Add the missing template sections: tick the Swarm / Source Boundary category, complete Scope Classification (production delta, evidence delta, single acceptance criterion, non-goals), mark Support-tier and Policy Impact (CI lane applies), add Claim Boundary, Spec-Test-Code Traceability, and Static Language Check, and complete the CI Economics section because the PR changes .github/workflows/routed-rust.yml. Also fill in the Engineering Check and Gates items that were run, or state which were not run. Keep the Proof section and list the commands run.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the queued commits in a row,
Each PR’s own changed paths help docs status show.
The heads and queue entries match their place,
Review threads get checked for every case.
The runner waits while checks complete,
Then hops along the verified beat.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Exact-Head Review Record

  • headRefOid: 78747b5cf44e53a818bbab0207ba8e1afae32da0
  • baseRefName: hill/ci-efficiency (stacked on ci: harden merge_group admission and disable incremental with sccache #14656)
  • source_disposition: SOURCE_REVIEW_READY
  • disposition: REVIEW_INCOMPLETE (Draft PR; hosted PR CI qualification pending)
  • Checked files: .github/workflows/routed-rust.yml, docs/CI.md, docs/MERGE_FLOW.md, tools/repo-policy/src/lib.rs, tools/repo-policy/src/workflow_tests.rs
  • Verified local proof: cargo policy check-workflows (�xit 0); cargo test -p repo-policy --lib (78 passed; 0 failed; 0 ignored, �xit 0).
  • Review threads / comments: 0 unresolved review threads; 0 blocking review findings.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SOURCE_REVIEW_READY

Source, oracle, and contract review complete on exact head 78747b5. See Conversation comment for full inspection record.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review November 14, 2026 06:36
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 7 potential issues.

Devin Review

Comment thread .github/workflows/routed-rust.yml Resolved
Comment thread .github/workflows/routed-rust.yml Resolved
Comment thread .github/workflows/routed-rust.yml Resolved
Comment thread tools/repo-policy/src/workflow_tests.rs Resolved
Comment thread .github/workflows/routed-rust.yml Resolved
Comment thread .github/workflows/routed-rust.yml Resolved
Comment thread .github/workflows/routed-rust.yml Resolved

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SOURCE_REVIEW_READY
VERDICT: APPROVE 78747b5
Exact-head completion of my source/oracle/contract review at this head (review 5902331414). cargo policy check-workflows exit 0 and cargo test -p repo-policy --lib 78 passed. No blocking findings. The head is stacked on hill/ci-efficiency (#14656), so the hosted Rust gates do not run on this head; that qualification is still outstanding until rebase/native admission.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SOURCE_REVIEW_READY

VERDICT: BLOCK 78747b5 — three blocking defects in the new merge-group path: the constituent capture is cleared before it is read, the inline constituent admission zeroes every generated-file discount, and the base freeze packet falls back to the candidate checkout on any read failure. This supersedes my APPROVE on this same head (review 5903276711), which completed after the devin findings below were filed and did not examine them.

Head pinned and unchanged during this read: 78747b5, tree f000d7cd74b59852449f5c3b71995a2eca660d18. Static review only; no checkout, no workflow run.

Blocking

B1 — routed-rust.yml:108-109: BASH_REMATCH is cleared by the two SHA-format tests, so ref_pr is always empty.
Every [[ … =~ … ]] resets BASH_REMATCH. The next two tests (GROUP_BASE_SHA, GROUP_HEAD_SHA) succeed with no capture groups, so BASH_REMATCH[1] is unset when ref_pr="${BASH_REMATCH[1]}" runs. Reproduced under bash with a real queue ref:

GROUP_HEAD_REF=refs/heads/gh-readonly-queue/main/pr-14671-78747b5…
GROUP_BASE_SHA=<40 hex>  GROUP_HEAD_SHA=<40 hex>
→ ref_pr=<>

Consequences at this head: the jq filter's $prs[-1] == $ref_pr guard (:118) never matches, constituent_prs is empty, HEAD_REPO becomes unresolved (:131), and :137 skips the runner query with reason=fork_or_untrusted_pr. Every merge_group therefore routes to GitHub-hosted and the PR's advertised gate — "every constituent PR in base..head must belong to the base repository before self-hosted runners can be selected" — never executes. Nothing turns red, so the fallback hides it. The base at 3f3243cc was safe here because its capture test was the last evaluation before the read (routed-rust.yml:104-105); this PR made it unsafe by prepending the format checks.

B2 — routed-rust.yml:394-399,453: constituent admission runs without ADMISSION_REPOSITORY / ADMISSION_PR_NUMBER, so generated-file discounts are always discarded.
The step invokes candidate_admission.py directly with only GH_TOKEN, REPOSITORY, TIP_PR, CONSTITUENTS, DOCS_ONLY. The CLI reads the repository only from ADMISSION_REPOSITORY (candidate_admission.py:1775); with it empty, head_unmoved() returns False because number.isdigit() rejects the empty PR number (:1698), and :1785-1788 then sets generated_files = generated_lines = 0. A constituent that fits the ordinary 160 files / 3000 lines only because its generated files are declared in the live base's .gitattributes is refused in the batch although it qualifies alone. The composite action sets both variables (action.yml:95-99), so the two paths disagree. release_cut_admission.py does not read them.
Fix: export ADMISSION_REPOSITORY="$REPOSITORY" and ADMISSION_PR_NUMBER="$c_pr" for the candidate_admission.py call.

B3 — routed-rust.yml:435-439,449-451: the freeze packet and generated-path evidence fail open to the candidate tree.
action.yml states the contract: "The enforcement packet comes from the exact live base commit, never the candidate checkout"; it copies the local packet only on a verified HTTP 404 and refuses any other read failure. The inline step instead copies ${GITHUB_WORKSPACE}/${packet_path} — the merge-group checkout, which all constituents can edit — on any failure, and silently omits --generated-attributes on any .gitattributes failure. After a transient base read failure a non-tip constituent is evaluated against a candidate-supplied freeze packet and without the base's generated declarations. The predicate "freeze evidence is read from the live base, and an unreadable base refuses" is violated.
Fix: mirror action.yml (404 → local template, otherwise refuse), and refuse non-404 .gitattributes failures.

Non-blocking

  • xtask/src/tests.rs:9803-9850: three mutation needles are stale at this head — [ "$parents" = "1" ] && [ "$parent" = "$GROUP_BASE_SHA" ]…, [ "$fetched" = "$head" ], and the ${GROUP_HEAD_SHA}^{tree} merged-tree pin. The workflow now binds c_pr/c_head/c_sha (routed-rust.yml:355-376), so assert_ne! fires and the retained xtask test fails whenever it runs. tools/repo-policy/src/workflow_tests.rs was updated in this PR; the duplicate was not.
  • routed-rust.yml:453-464,465-473: under set -euo pipefail, a nonzero exit from either admission script aborts the step before the ::error::constituent PR … refused annotation, and the EXIT trap deletes $result. Capture the exit code first, as action.yml does with rc_candidate.
  • The PR body's Source review: REVIEW_READY 78747b5c… line is self-attested; the 7 devin threads at this head include B1-B3 and remain unresolved.

Limits

No build, no workflow execution, no checkout. B1 was reproduced by running the exact conditional under bash; B2/B3 were read from the scripts at this head. I did not run the repo-policy or xtask suites. The three non-blocking items are reported from source only.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Disposition: repair dispatched at 78747b5c.

The earlier APPROVE on this head is superseded by review 5906627517, which completed after devin filed seven findings and did not examine them. Three blockers, all in .github/workflows/routed-rust.yml:

  1. BASH_REMATCH is cleared before it is read (:108-109). The two following SHA-format tests overwrite the capture, so ref_pr is always empty; the jq constituent guard never matches, HEAD_REPO becomes unresolved (:131), and :137 sends every merge_group to GitHub-hosted with reason=fork_or_untrusted_pr. The PR's constituent validation and self-hosted route never run. The base 3f3243cc was safe only because its capture test was last.
  2. The inline constituent admission omits ADMISSION_REPOSITORY/ADMISSION_PR_NUMBER (:394-399,453). The CLI reads the repo only from that env (candidate_admission.py:1775), so head_unmoved() returns False (:1698) and :1785-1788 zeroes generated_files/generated_lines. A constituent that qualifies alone via declared generated files is refused in a batch.
  3. The base freeze packet falls back to the merge-group checkout on any read failure (:435-439,449-451), and .gitattributes failures are silently ignored. action.yml's contract refuses any non-404 packet failure and never uses the candidate checkout, so this re-opens the fail-open the action closes.

Seven devin threads are open at this head; the repair sweeps them.

No merge-ready label and no queue action until the repair lands and a fresh review exists at the new head.

Base automatically changed from hill/ci-efficiency to main November 14, 2026 22:29
@EffortlessSteven

Copy link
Copy Markdown
Member Author

Published bounded repair c80904cc07e9a97eb07bfca519cd52b5b804ae6d.

  • routed-rust.yml:108 preserves ref_pr before SHA checks.
  • :435-442 and :454-459 permit the local packet only on verified 404 and refuse other base-read failures.
  • :461 binds inline admission to the current repository and constituent PR.
  • :460-486 preserves both refusal annotations and their JSON reason/detail.
  • xtask/src/tests.rs uses live mutation needles; the required Internal / CI fragment is added.

Proof:

  • cargo test -p repo-policy --lib: 78 passed.
  • cargo test -p xtask routed_rust_ready_event_matrix_withholds_draft_and_label_context: 1 passed.
  • cargo xtask check-changelog-fragments: pass.
  • git diff --check: clean; changed Rust files also passed focused rustfmt.
  • Controlled harness: real queue ref yields ref_pr=14671; packet/attribute HTTP 500 refuses, HTTP 404 admits the inactive template/zero attributes; generated admission is oversized without PR context and admitted with it (changed_lines=0); both refusal annotations survive.

Resolved PRRT_kwDOSiSx0c63aGTo, ...aGUD, ...aGXi, ...aGVg, ...aGV_, and ...aGW2 with source-linked replies.

PRRT_kwDOSiSx0c63aGUx remains open: the mixed docs-only finding is real and requires per-PR classification, not the group-wide DOCS_ONLY value. This bounded patch does not implement that separate behavior change.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Disposition: conflict resolution dispatched at c80904cc.

The repair is published — queue-ref capture, per-constituent admission context, 404-only base evidence, retained refusal diagnostics, updated stale needles, and the CI changelog — but the head is CONFLICTING/DIRTY against main, so a review would be stale on resolution.

Repair: merge current main into the branch and resolve the conflict in .github/workflows/routed-rust.yml, keeping both sides: this PR's queue-ref capture, per-constituent admission context and 404-only base evidence, and main's current routed-rust content. The six resolved Devin threads stay resolved.

One thread is still open and real: PRRT_kwDOSiSx0c63aGUx (.github/workflows/routed-rust.yml:411, mixed docs-only classification). The coder says it is real and was not fixed. The repair must decide it — fix the classification, or record why it is out of scope and resolve the thread with that reason. It is not left open without a disposition.

No merge-ready label and no queue action until the conflict is resolved and a fresh review exists at the new head.

# Conflicts:
#	.github/workflows/routed-rust.yml
@EffortlessSteven

EffortlessSteven commented Nov 15, 2026 •

Copy link
Copy Markdown
Member Author

Published conflict repair and final Devin disposition at 5c4ce6edc062550a5c2b3cd115014bc729797581.

  • Merged origin/main 799ba7c6e7ba91b52a7b650901328a21474f38d0; the PR is now MERGEABLE. Queue-ref capture, per-constituent admission context, 404-only base evidence and main's current routed-rust content are preserved.
  • Fixed PRRT_kwDOSiSx0c63aGUx: every constituent, including the tip, now receives docs-only admission from its own changed paths. Rename sources and release surfaces fail closed; group-wide docs detection still selects the combined-tree qualification lane.
  • Added matching repo-policy and xtask mutation pins and updated the CI changelog.

Proof:

  • cargo test -p repo-policy --lib: 78 passed.
  • cargo test -p xtask routed_rust_ready_event_matrix_withholds_draft_and_label_context: 1 passed.
  • Exact classifier extracted from the workflow: docs-only=true; code=false; code-to-docs rename=false; release surface=false; docs-to-docs rename=true.
  • cargo xtask check-changelog-fragments: pass; git diff --check: clean; combined-tree git merge-tree --write-tree origin/main HEAD: clean.
  • Full-tree and whole-file rustfmt checks report inherited formatting drift outside this repair's edited sections; no unrelated formatting was rewritten.

All seven Devin threads now have a repair disposition. A fresh exact-head review and hosted qualification remain required.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SOURCE_REVIEW_READY — head 5c4ce6e

Stage: source review, head 5c4ce6ed (7 files, 5 commits). Green.

This is per-constituent admission for a batched merge group (#8082). I read the whole workflow delta and added four checks the PR's own proof does not carry at this head.

1. The bash parses. I extracted all 19 run: blocks from routed-rust.yml at this head and ran bash -n on each: 0 syntax errors. The new classify_constituent_docs, the constituent loop, the additional-constituents step and the check_pr_eligibility refactor are all inside that set.

2. The workflow is valid YAML. Parsed with a YAML 1.2 parser: 12 jobs, and the admission job has 12 steps including Admit additional merge-group constituents. The new step's indentation matches its siblings.

3. The policy contract holds at this head. routed_rust_ready_event_contract_violations is a list of workflow.contains(snippet) pairs. I extracted all 26 pairs from tools/repo-policy/src/lib.rs at this head and checked each against the workflow: 26/26 present. I also checked the function's other three predicates: merge_group.types is exactly [checks_requested], pull_request.types parses, and the queue-entry snippet GROUP_HEAD_REF: ${{ github.event.merge_group.head_ref }} is present.

4. The CLI flags exist. The additional-constituents step calls candidate_admission.py with --generated-attributes, --open-prs, --comments, --base-sha, --pr-files and --docs-only, and release_cut_admission.py with --packet, --base-commit, --cut-commit and --proposed-packet. Every one is declared in the script at this head, so the step cannot die on an unknown argument.

On the binding. The chain check requires each queued commit to be single-parent on the previous one, to end its subject with (#N), to be unique, and to have a tree equal to git merge-tree --write-tree <previous> <live head>. The tip must be the ref's PR and the chain must end at GROUP_HEAD_SHA. A fetch error, a merge conflict, a moved PR ref or a missing queue entry exits 1. The docs-only scope for the run still comes from the group-wide detect-docs-only, so a batch with one code constituent cannot be routed as docs-only; the per-constituent flag only feeds that constituent's own admission.

Non-blocking observations.

  • The PR body names 78747b5c as the candidate branch and as the rollback commit, and its proof was run at that head. The body's own convention makes the GitHub head authoritative, so this is not a false claim, but the rollback boundary should name 5c4ce6ed.
  • check_pr_threads calls warn, which exits 0, on the first constituent read error, so a batch stops pre-checking the remaining constituents. The final eligibility recheck still covers every constituent, so this is advisory-only.
  • The contract test pins exact substrings, so it cannot detect a logic inversion inside a pinned line. The behavioural evidence is the workflow itself.

Not checked: no hosted merge_group run exists at this head (the workflow runs only on merge_group or the merge-ready label, and neither fired), so the runtime behaviour of the new steps is not established; no cargo test -p repo-policy --lib run on this host.

Wrote: this body file, the extracted workflow and scripts, and a yaml npm package under %TEMP%\opencode; git fetch updated remote-tracking refs only. No checkout, branch, worktree, label or thread touched.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Head moved from c80904cc to 5c4ce6ed after the conflict resolution, so the last review (a SOURCE_REVIEW_READY at 05:33Z) is a carrier, not a verdict.

The coder's claim: merged origin/main 799ba7c6, preserving both router/admission sides; fixed the remaining mixed docs-only finding — every constituent including tip now uses its own changed-path docs classification, renames/release surfaces fail closed, group classification still selects combined-tree scope; all seven Devin threads resolved.

Proof offered: repo-policy 78/78; focused xtask 1/1; exact classifier docs/code/rename/release controls pass; changelog gate pass; diff-check and merge-tree clean.

Review dispatched at the exact head, scoped to whether the conflict resolution kept both sides, whether the mixed docs-only fix is correct, and whether the three original blockers (BASH_REMATCH capture, ADMISSION_REPOSITORY/PR_NUMBER, 404-only base evidence) are still fixed after the merge.

No queue action until the review and a routed run exist at 5c4ce6ed.

The eligibility recheck now validates the admitted constituents and checks each one, so the routed-dispatch fixtures must supply a valid single-entry CONSTITUENTS array instead of the placeholder value. The history-sync scope self-test must assert the new per-constituent docs-only fallback.
The entry step now reads each constituent's changed paths and the PR read helper takes explicit arguments. Extend the queue-resolution gh stub with the paginated files call and a MOCK_FILES fixture, and pass the target PR/head into the retry helper. Update the batch refusal needles to the new entry-step messages.
The entry step now refuses a two-parent queued commit with 'is not a single-parent commit directly on <parent>'. Update the history-sync two-parent test to that message; it still names the expected parent.
…uire complete file lists

The additional-constituent step accepted the Python decisions without re-reading the live base, so a freeze that activated during evaluation could be missed. Apply the wrapper's movement check: accept only when both the evaluated and the moved base carry an inactive packet. Also refuse docs-only classification when the returned file list is shorter than the PR's changed_files, so an incomplete list cannot skip the size refusals.
…ument list

The three workflow-contract snippets pinned the full classify_constituent_docs call, so adding the changed_files argument broke check-workflows. Pin the signature-independent prefix instead; the label text is unchanged.
…s count

The truncation guard compares the paginated file count with the REST payload's changed_files. The mock omitted that field, so jq printed null and the guard refused before the binding checks. The mock file list has one entry, so set changed_files to 1.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: APPROVE 48913a6 — no blocking findings on this head.

Reviewed the delta from my 0a227e3d approval. 0729a3acfa added the constituent changed-path completeness gate and the post-admission base-movement recheck; 48913a630d repairs the queue-resolution fixture (changed_files: 1) and pins the policy contract by prefix. The Rust test shards pass at this head.

  • Three original blockers remain fixed: BASH_REMATCH is captured immediately after each match; ADMISSION_REPOSITORY/ADMISSION_PR_NUMBER are exported per inline constituent; the hard-cut packet falls back to the local template only on a verified HTTP 404, and the .gitattributes read fails on any non-404.
  • Mixed docs-only fix remains correct: per-constituent changed-path classification, renames and release surfaces fail closed, and the group scope still uses the combined-tree detect-docs-only.
  • New completeness gate: classify_constituent_docs now requires the paginated files count to equal the PR's .changed_files, so a truncated file list cannot be classified docs-only. The fixture now supplies the count and the shards pass.
  • New base-movement recheck: after admission the step re-reads the base ref and refuses movement unless both the evaluated and newly observed packets are inactive. This is a faithful port of the landed pr-candidate-admission/action.yml logic, including the packet_from_base and 404 handling.

Residual, non-blocking: the base-movement branch has no workflow-level test of its own; its evidence is the textual match to the action's landed logic. Ripr Rust Small on GitHub Hosted / Rust gates is still pending at this head, so the head is not yet queue-eligible on that gate.

Static review only: no build, no checkout, no merge, no thread changes. Head pinned at 48913a630d.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Head moved from 0a227e3d to 48913a63 after the APPROVE, so that verdict is stale.

The delta is one commit: 48913a63 "test(merge-group): give the queue-resolution PR mock its changed_file…" — a test-only fixture pin. The two commits before it are 0729a3ac (recheck the base after constituent admission) and e89e0afc (pin the constituent-docs call by prefix, not arg).

The green run 43703705056 is on 48913a63 — Admit PR Candidate, Ripr Rust Small Result and the Rust gates all pass.

Review dispatched at the exact head, scoped to whether the delta is test-only and does not change the workflow or repo-policy source approved at 0a227e3d.

No queue action until the review exists at 48913a63.

@effortlessg41
effortlessg41 Bot added this pull request to the merge queue Nov 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 15, 2026
…atch

# Conflicts:
#	.github/workflows/routed-rust.yml
@github-actions

Copy link
Copy Markdown
Contributor

merge-ready is set, but this PR conflicts with main (head 48913a63), so GitHub creates no test-merge ref and no qualification run can start. 1. Merge main into the branch and resolve the conflicts. 2. Remove and re-apply merge-ready to request admission and qualification only. 3. After qualification is green, enqueue the PR through the native queue route; re-applying the label does not enqueue it.

@effortlessg41
effortlessg41 Bot added this pull request to the merge queue Nov 15, 2026

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SOURCE_REVIEW_READY

Source review at head e5004c90a5ab7a951b4879271df1be6c23b99fe3 (base main), superseding nothing: my previous approval was at 48913a630d, and this head is that commit plus a merge of origin/main. Green.

What this head is. e5004c90a5 is a two-parent merge (48913a630d + 0ab323d565, the then-tip of main). 260 files appear between my approved head and this one, but that is main's own history arriving, not candidate work. The revisions check: git merge-tree --write-tree 48913a630d 0ab323d565 reports CONFLICT (content) in .github/workflows/routed-rust.yml, so the merge was hand-resolved. That resolution is the only new subject in this head, and it is what I reviewed.

1. The resolution is a clean union. The candidate's patch against the merge base (799ba7c6e7) and the head's patch against 0ab323d565 are the same 574-line patch, differing only in the cap context line (3000 vs 3700), blob hashes and hunk offsets. Diffing the two patches shows no other delta. The merged file's candidate delta is exactly +316/-117, the PR's own recorded stat for that file. No candidate hunk was dropped and no main hunk was lost.

2. Main's cap raise survived in all three sites. #14735 bumped the per-candidate changed-line cap to 3700. The merged file wires max-changed-lines: '3700' at both with: inputs (:315, :408) and --max-changed-lines 3700 in the new constituent loop (:485); grep 3000 on the merged file returns nothing. A stale 3000 in any one of those would have re-created exactly the split main's self-test exists to catch.

3. Main's own cap self-test passes on the merged file. I extracted candidate_admission.py at this head and ran its --self-test --workflow against the merged routed-rust.yml with --max-changed-lines 3700 --max-changed-files 160: all controls passed, exit 0. Run with the script default (3000) it fails with "the self-test certifies 3000 but the workflow wires 3700", which is the discriminator, so the pass is not vacuous. release_cut_admission.py --self-test and review_disposition.py --self-test also exit 0 at this head.

4. The constituent call sites still match main's modified scripts. main changed candidate_admission.py and review_disposition.py (+266 lines in the disposition script) inside this merge window, so I re-checked every flag the constituent loop passes instead of assuming the earlier review still applied. --current, --open-prs, --expected-head, --max-changed-files, --max-changed-lines, --pr-files, --base-sha, --comments, --generated-attributes, --docs-only all exist in the merged parser, and review_disposition.py still takes --repository/--pr/--head as invoked at :580 and :583. No argument rename landed under the candidate.

Carried, unchanged by the merge: ADMISSION_REPOSITORY/ADMISSION_PR_NUMBER are exported per inline constituent (:480); BASH_REMATCH is read immediately after each match; the hard-cut packet falls back to the local template only on a verified HTTP 404 (:456) and the .gitattributes read fails on anything else (:475); the post-admission base-movement recheck refuses unless both the evaluated and newly observed base carry an inactive packet (:502-517).

Runtime evidence at this head, its exact subject: the hosted lane ran on e5004c90a5, not on my earlier heads — Ripr Rust Small on GitHub Hosted / Rust gates SUCCESS 20:58Z, test shards 1-4 SUCCESS 20:28-20:29Z, Ripr Rust Small Result SUCCESS 20:58Z, Admit PR Candidate and Route Ripr Rust Small SUCCESS. GitHub scheduling those runs also proves the hand-merged workflow parses as valid YAML at this head.

Limits, stated rather than papered over. The merge_group constituent path itself has not executed: those steps are gated on event_name == 'merge_group', so the route/admission and test runs above are the pull_request path. Its bash is therefore still statically reviewed only — bash -n is unavailable on this Windows box, and the merges touched no bash lines, but I did not execute it. main has since moved 13 commits past 0ab323d565; those are unrelated to the touched surfaces, and I am not asking for a restack.

Stage: source review at e5004c90a5 is green. Integration/merge-group qualification stays with the queue and is untouched by this pass.

Merged via the queue into main with commit 39d2ce8 Nov 16, 2026
21 checks passed
@effortlessg41
effortlessg41 Bot deleted the hill/ci-merge-group-batch branch November 16, 2026 04:58
@EffortlessSteven

Copy link
Copy Markdown
Member Author

#14671 moved again: another merge-only delta

The head is now e5004c90, a merge of origin/main. The APPROVE at 48913a63 (review 5910395848) is stale by that merge-only commit.

The review already covered the full five-commit delta from 0a227e3d: 0729a3ac adds the per-constituent changed-path completeness gate and the post-admission base-movement recheck, e89e0afc changes the repo-policy pins, and 3d13cfc8 / f987063c / 48913a63 are test-only. The three original blockers remain fixed, the mixed docs-only fix is correct, and the base-movement branch is a faithful port of the landed action.yml logic. Zero unresolved threads.

What remains: a verdict at e5004c90. It is merge-only, so the review should confirm that and approve.

Admission is held until it settles. This PR has moved five times, and the last two moves were main merges. A review bound to a merge head will keep going stale while main moves, so I am not enqueuing on the old verdict.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SOURCE_REVIEW_READY
VERDICT: APPROVE e5004c9

No blocking findings on this head. The delta from 48913a63 is merge-only: the merge brings origin/main forward, and the PR's own diff is byte-identical at both heads — ten files, 427 insertions / 150 deletions (routed-rust.yml, the repo-policy contract and its mirrors, the two xtask fixtures, the history-sync test, the changelog fragment, docs/CI.md and docs/MERGE_FLOW.md).

The three blockers remain fixed: ref_pr/ref_sha are captured immediately after the /pr-N-sha match (routed-rust.yml:353), each inline constituent admission exports ADMISSION_REPOSITORY/ADMISSION_PR_NUMBER (:480), and the hard-cut packet and .gitattributes reads fall back only on a verified HTTP 404 (:456, :475).

The mixed docs-only fix remains correct: classify_constituent_docs is still fed the constituent's own changed paths and its changed_files count (:376), the tip uses tip_docs_only (:390, :406), and the group scope still uses the combined-tree detect-docs-only. The base-movement recheck is still the faithful port (:515).

Zero unresolved review threads at this head.

This PR has now moved repeatedly, and its last two moves were main merges that do not change the PR's own diff. A verdict bound to a merge head will keep going stale as main advances; it is worth holding admission until the head settles, or treating an unchanged own-diff merge head as carrying the current verdict. I reviewed statically only; I did not run a build or test.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SOURCE_REVIEW_READY
VERDICT: APPROVE e5004c9

No blocking findings on this head. The delta from 48913a63 is merge-only: the merge brings origin/main forward, and the PR's own diff is byte-identical at both heads — ten files, 427 insertions / 150 deletions (routed-rust.yml, the repo-policy contract and its mirrors, the two xtask fixtures, the history-sync test, the changelog fragment, docs/CI.md and docs/MERGE_FLOW.md).

The three original findings are still repaired:

  • ref_pr/ref_sha are captured immediately after the /pr-N-sha match (routed-rust.yml:353).
  • Each inline constituent admission exports ADMISSION_REPOSITORY/ADMISSION_PR_NUMBER (:480).
  • The hard-cut packet and .gitattributes reads fall back only on a verified HTTP 404 (:456, :475).

The mixed docs-only fix is still correct: classify_constituent_docs is fed the constituent's own changed paths and its changed_files count (:376), the tip uses tip_docs_only (:390, :406), and the group scope uses the combined-tree detect-docs-only. The base-movement recheck is still the faithful port (:515).

Zero unresolved review threads at this head. Static review only; no build or test run on this host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant