Repository navigation
ci(cmux-next): implicit batch queue for feat-cmux-next - #17979
Closed
azooz2003-bit wants to merge 35 commits into
Closed
azooz2003-bit wants to merge 35 commits into
azooz2003-bit wants to merge 35 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Debounced PR events dispatch one batch: stack eligible PRs on feat-cmux-next, rebuild conflicted generated files, run every cmux-next tier and a fleet production build on the stack, then land each PR with gh-merge-green or bisect a red stack to its culprit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat-cmux-next is not the default branch, so the Actions API cannot find a workflow file that exists only there by its name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ch-dispatch # Conflicts: # .github/workflows/cmux-next.yml
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub refuses the job token's push or merge of a .github/workflows change, so those PRs land by hand. Debounce dispatches only when CMUX_NEXT_BATCH_ENABLED is 1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… build (red) python3 -m unittest tests.test_next_batch: 14 failures, all in the new ServeDebounce, RemoteRegeneration, LocalController and regen workflow tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
next_batch.py serve polls open PRs, debounces like the debounce job and runs one batch at a time with the operator's gh login, so it runs without the batch App. Its pushes and merges start CI, so nothing is re-dispatched after landing; the fleet build uses the host's cmux-ci. Generators run the stack's code, so they no longer run on the controller: regen-linux (web, SDK) and regen (Swift) check out the stack with a read-only token and return a patch that the controller applies and pushes. python3 -m unittest tests.test_next_batch: 41 pass (14 failed on 552c900). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
next-batch/20261006: the regen job ran the stack's own copy of regenerate-swift-exports.sh, which the stack does not have yet (exit 127). python3 -m unittest tests.test_next_batch: 1 failure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stack checkout keeps the stack's code; only the generator script comes from the trusted ref. python3 -m unittest tests.test_next_batch: OK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…red) next-batch/20261006: the Swift regen job was refused at runner setup (a fleet build was waiting for the host) and the batch gave up. python3 -m unittest tests.test_next_batch: 3 errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
python3 -m unittest tests.test_next_batch: OK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cmux-ci build --production --backend-mode local: "production builds cannot use offline backend mode". python3 -m unittest tests.test_next_batch: 1 failure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
python3 -m unittest tests.test_next_batch: OK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A PR changing webviews/ whose only red is web formatting stays eligible. Before landing it, regen-linux runs bun run check:fix (formatter and lint autofix) on its head and the queue pushes the patch to the PR's branch; gh-merge-green waits for the rerun. python3 -m unittest tests.test_next_batch: 50 OK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Landing from the queue host is not allowed yet; owners land on the receipt. A receipt names the heavy jobs that ran, since cmux-next.yml skips them on next-batch/* until this PR is on feat-cmux-next. python3 -m unittest tests.test_next_batch: 4 failing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
python3 -m unittest tests.test_next_batch: 54 OK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
next_batch.py select: gh api graphql failed: gh: HTTP 504 (100 PRs with files and checks in one query). python3 -m unittest tests.test_next_batch: 2 failing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
python3 -m unittest tests.test_next_batch: OK; next_batch.py select: OK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
python3 -m unittest tests.test_next_batch: 1 failing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
python3 -m unittest tests.test_next_batch: OK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Batch local-20261006-153816: #17534's owner pushed while its formatting ran; the report showed a raw git push error. python3 -m unittest tests.test_next_batch: 1 error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…atch python3 -m unittest tests.test_next_batch: OK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PRs into feat-cmux-next land one at a time today, and each re-runs the full CI on every push. The coordinator also stacks open UI PRs by hand, regenerates the agent-pane bundle and builds the stack on the fleet. This PR makes that loop an implicit merge queue. Agents open PRs and the queue lands them.
.github/workflows/cmux-next-batch.ymlrunsscripts/ci/next_batch.py. docs/ci/cmux-next-batch.md has the full rules.Trigger: PR events and feat-cmux-next pushes debounce into one batch: 2 minutes of quiet, at most 10 minutes after the first event. A running batch is never cancelled; a newer dispatch waits.
Eligible: not a draft, a branch in this repo, no
hold/exploration/needs a calllabel, head newer than 5 days, and no red check outside the heavy tier (pending is fine). Only PRs by the batch authors (defaultteamleaderleo) are auto-landed; anyone else opts in withbatch-queue.Stack: up to 12 PRs in PR-number order on the feat-cmux-next head. Generated files are never resolved by hand. A conflict keeps the stack's copy, and the generator rebuilds it once:
cmux-tui/spec, which merges key by key;Any other conflict drops that PR and comments on it, once per head.
Validate once: dispatch
cmux-next.ymlonnext-batch/<run>-<n>, which runs every tier (enabled by ci(cmux-next): run every tier when dispatched on a next-batch branch #17528). In parallel, a mini submits a fleet--productionbuild of the stack. Jobs already red on feat-cmux-next don't count, and failed jobs get one rerun before any PR is blamed.Land or bisect:
gh-merge-green --squashafter a comment linking the batch.--overridenames the batch only when the PR's own heavy check is red.Report: the job summary, plus a sticky comment on the HQ issue named by
CMUX_NEXT_BATCH_STICKY.Controller logic runs on Blacksmith Linux, or for now as
next_batch.py serveon a workstation under the operator's gh login (no App yet). In serve mode, its pushes and merges start CI like anyone's, and the fleet build uses the host'scmux-ci. Generators run the stack's code, so they never run on the controller.regen-linux(web bundles, SDK, webviews formatting) andregen(Swift exports, on a mini) check out the stack with a read-only token and return a patch. The controller applies and pushes that patch.webviews/whose only red isweb / react-apps-checkorweb / Web statusstays eligible. Before landing it,regen-linuxrunsbun run check:fix(formatter and lint autofix) on its head, and the queue pushes the fix to its branch.Limits
cmux-next.yml,cmux-tui-artifacts.ymland the next batch on feat-cmux-next. The routing App has nocontentspermission, so it can't do this either.Testing
python3 -m unittest tests.test_next_batch: 50 tests. They cover the serve debounce, remote regeneration, the local fleet build, formatting before landing, eligibility, debounce timing, JSON key merge, real-git stacking (clean, generated conflict, source conflict, spec merge, clean-but-both-changed generated file), bisect over 1 to 8 PRs (at most 3 probes), sticky history, landing override and the workflow's concurrency and trust shape. They failed on 7d49a1a (no controller) and pass on 168b6a9.actionlint: clean.python3 scripts/verify-local.py --affected origin/feat-cmux-next: 8 of 9 pass; localization parity fails with 27,403 errors in catalogs this PR doesn't touch.next_batch.py stack --no-regen), 24 s:regenerate-web-bundles.shrebuilt them in 40 s.next-batch/20261006(11 requested PRs, feat-cmux-next7cf558be8de1):f16f40ea1d1b.954248bfe072. The first attempt ran the stack's copy of the generator script, which the stack doesn't have yet (fixed: the script now comes from the workflow ref). The second was refused at runner setup (fixed: one more dispatch).c8f563681211aa65c6e94453, tagnext-batch-f16f40ea. It went from submitted to green in 2 min 57 s. The submission first failed becausecmux-cirefuses--backend-mode localwith--production(fixed).Changelog
none
🤖 Generated with Claude Code
Migrated from #17535 after correcting the PR author identity. The original head commit 405bf26 is preserved.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Adds an implicit merge queue for feat-cmux-next (
docs/ci/cmux-next-batch.mdhas the full rules). PR events debounce into one batch that stacks eligible PRs, rebuilds conflicted generated files, validates the stack once across every cmux-next tier plus a fleet production build, then lands each PR withgh-merge-greenor bisects a red stack to its culprit. PRs no longer land one at a time with full CI on every push.Batch rules
hold/exploration/needs a calllabel, head newer than 5 days, no red check outside the heavy tier; batch authors (defaultteamleaderleo) auto-land, others opt in withbatch-queue..github/workflows/are never queued; they land by hand.bun run check:fixon its head and pushes the fix before landing.cmux-next.yml,cmux-tui-artifacts.yml, and the next batch after landing.Written for commit 405bf26. Summary will update on new commits.