Repository navigation
feat(id-gate): run and bisect ready PR batches - #12474
Conversation
Use GitHub merge commits rather than cherry-picks so accepted PR commits retain their ancestry and GitHub marks each PR merged. A green candidate is applied in PR order; red subsets are tested from fresh origin/main worktrees, logged, and only green PRs are merged. Interaction-only failures conservatively leave the batch open.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 47 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56799f4040
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if root_red and not red: | ||
| red = list(prs) | ||
| green = [pr for pr in prs if pr not in set(red)] |
There was a problem hiding this comment.
Revalidate the surviving PR combination before merging
When a batch contains both an independently failing PR and an interaction-only failure, this fallback still merges a failing combination. For example, with [1,2,3,4], suppose builds fail whenever PR 1 is present or PRs 3 and 4 occur together. Bisection identifies only PR 1 as a singleton culprit, so red is nonempty and the driver merges [2,3,4], even though it explicitly observed [3,4] failing. Retain interaction-failing subtrees or evaluate the complete surviving combination before merging any survivors.
Useful? React with 👍 / 👎.
| # `gh pr merge --merge` creates the durable merge commit and marks each | ||
| # source PR merged; each accepted PR is applied in the same order tested. | ||
| for pr in green: | ||
| gh(["pr", "merge", str(pr), "--merge"], cwd=repo) |
There was a problem hiding this comment.
Pin each merge to the exact PR head that passed testing
If an author pushes to a PR while the batch build runs, this command merges the new, untested head rather than the commit assembled in the candidate worktree. The earlier headRefOid is neither checked against the fetched commit nor retained for merging. Locally inspected gh pr merge --help documents --match-head-commit SHA as “Commit SHA that the pull request head must match to allow merge”; capture the exact fetched/tested OID and require that match when merging.
Useful? React with 👍 / 👎.
Summary
gate.py runto assemble ordered PR heads on a freshorigin/mainworktree and run the planner's workspace check plus affected-crate tests throughfleet shell --build.--mergecommits to preserve PR ancestry and have GitHub mark accepted PRs as merged; interaction-only failures conservatively leave the entire batch open.Evidence
RunBatchTestsfailed becauserun_batchdid not exist.python3 -m unittest scripts.id.test_gate -v— 17 tests passed.python3 -m py_compile scripts/id/gate.py scripts/id/test_gate.py,git diff --check.56799f4040.nixos-rebuildwas active (PID 291703/291705) with/tmp/rebuild3.logprogressing, so the required build-slot run would contend with it. No live batch was attempted.Merge Danger
gh pr merge --mergefor green PRs; run only from the intended laptop/repository withID_GATE_OFF=1available as the kill switch.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.