ci(cmux-next): regenerate web bundles for a lane branch on dispatch
Summary
Lanes can't run bun on big-red, but changing agent-pane or settings-page sources means regenerating the committed bundles (scripts/cmux-next/build-agent-pane-web.sh, build-pages-web.sh). This gives them one route, from a lane checkout with the branch pushed and the tree clean:
scripts/cmux-next/regenerate-bundles-remote.sh
git commit -m "chore(cmux-next): regenerate the agent pane and page bundles" && git push
How it works:
- The helper dispatches
cmux-next-regenerate-bundles.ymlfrom feat-cmux-next for the current branch at its pushed HEAD. It finds the run by its run-name and waits for it. - The workflow's one job runs on Linux with no secrets and a read-only checkout. It runs both scripts with bun 1.4.2 and Node 24.11.1, the toolchain
cmux-next-web-bundles.ymlchecks with. It uploads a binary patch of the bundle paths only (agent-pane/,pages/,webviews/src/**/generated/strings.json) ascmux-next-bundles-patch. - The helper refuses a patch that touches any other path, stages the patch in the checkout, and leaves the commit and push to the lane. That push runs CI as usual.
- Both the workflow and the helper refuse
mainandfeat-cmux-next. The helper also refuses a dirty tree or an unpushed HEAD.
Why the lane pushes: the first version committed from CI, but the routing App installation has no contents permission ("The permissions requested are not granted to this installation", run 37556820718). A GITHUB_TOKEN push would start no CI on the lane's new head.
Why not a mini: a ci-steps mini has bun 1.3.6, while webviews/package.json pins 1.4.2, and it has no node, which both scripts call. Linux runners also cost no Mac capacity.
The workflow is registered for dispatch on main by #18153 (merged).
Testing
- Red first: dabda1648ee adds
tests/test_cmux_next_regenerate_bundles_workflow.py(5 errors before the workflow). It now has 7 tests, including running the workflow's branch guard and the helper's refusals. - End to end: on a scratch branch (feat-cmux-next plus one line appended to
pages/history/index.html),CMUX_REGENERATE_BUNDLES_REF=ci/cmux-next-regenerate-bundles scripts/cmux-next/regenerate-bundles-remote.shtook 36 s (run 37557056179). It staged exactly the removal of that line and nothing else, so the Linux build matches the committed bundles byte for byte. The scratch branch is deleted. actionlintandshellcheckare clean.tests.test_ci_fork_runner_routinghas the same 6 failures (allcmux-next-batch.yml) as origin/feat-cmux-next.python3 scripts/verify-local.py: the same 4 failures as the base (swift-syntax, localization, localization-defaults, package-groups).
Changelog
none
🤖 Generated with Claude Code