ci(cmux-next): DEV handoff dispatches with the glaeda-route App token; GITHUB_TOKEN fallback waits through a rate limit
Problem. cmux#24959 hands a finished DEV Release compile straight to the publisher (request-cmux-next-dev-publish in cmux-next.yml). On 2026-10-26 that handoff failed on every source run: 40280000359, 40298830622 and 40306882038. Each one hit gh: API rate limit exceeded for installation (HTTP 403) in the receipt read, before the dispatch step even ran. The shared GITHUB_TOKEN budget (5000/h) resets around :05 past the hour and runs out within about 30 minutes. The five-minute dispatcher uses that same budget, so it only picked these runs up after the reset: the publisher started 5.7, 40.4 and 40.5 minutes after the compile finished.
Change (only the handoff job):
- The job mints a
manaflow-glaeda-routeApp token (vars.GLAEDA_ROUTE_APP_ID/secrets.GLAEDA_ROUTE_APP_KEY, which this workflow already mints for runner placement) withpermission-actions: write. The App's installation already hasactions: writeon this repo, and the token has its own budget. The receipt read and the dispatch use this token. - If the mint or the App dispatch fails, the job dispatches with GITHUB_TOKEN through
scripts/ci/gh_budget_wait.sh(cmux#25434): one bounded wait for the reset, at most an hour, and each wait is logged. The job's timeout goes from 5 to 70 minutes to leave room for that wait. The script comes from a sparse checkout ofgithub.sha. Until #25434 lands on feat-cmux-next the file isn't there, and the fallback is a plainghcall, which is today's behaviour. - The receipt step and its upload are now
continue-on-error. A refused read can no longer stop the dispatch.
Trust. No new secret. No change to workflow or job permissions:, environments, or pull_request_target. The App and its key are the ones this workflow already uses. The new token only asks for actions: write on this repo, which the App's installation already grants. A publisher run started by the App token looks the same to the publisher: it checks github.ref == main and the source run by id, not the actor. No workflow listens for workflow_run of "cmux NEXT DEV daily" on main, so the App token, unlike GITHUB_TOKEN, triggers nothing new.
Risk. Low. The job runs only on dev_daily dispatches of feat-cmux-next. The dispatcher's cron backstop stays as it is.
Test. tests/test_cmux_next_dev_daily_dispatch.py now checks four things: the App token mint, App-first dispatch, the waiting GITHUB_TOKEN fallback, and a non-fatal receipt step.
Measure. After merge, the next DEV publishes should show compile done ā sign start under 2 minutes, and no rate-limit failure in the handoff.
Agent session: agent session
š¤ Generated with Claude Code
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.