ci(cmux-next): DEV signer reads the source run with the glaeda-route App token; publish waits for the API budget
Problem. The DEV publisher (cmux-next-dev-daily.yml, which runs from main) spends the shared GITHUB_TOKEN installation budget (5000/h). On 2026-10-26 that budget ran out every hour within about 30 minutes of the reset. The publisher failed on it:
Sign cmux NEXT DEV→ "Resolve the source run": 40258137182, 40293667155, 40298877772 (gh: API rate limit exceeded for installation (HTTP 403)).Publish cmux NEXT DEV→ the release asset upload: 40243784267.
A failed publisher waits for the next dispatcher tick, which runs on the same spent budget, so nothing publishes until the reset. This is the publisher half of the fix. The handoff half is cmux#25458 (feat-cmux-next), where the compile→publisher dispatch failed the same way. The Codex review of #25458 pointed out that the publisher still reads with GITHUB_TOKEN.
Change.
- sign: a
manaflow-glaeda-routeApp token (vars.GLAEDA_ROUTE_APP_ID/secrets.GLAEDA_ROUTE_APP_KEY, the same App this workflow'srunnerjob already mints) is minted read-only, withactions: readandcontents: read. It is used for the four source-run steps: run lookup, jobs, artifact download, and the tip-floor compare. The App has its own budget. If no App is configured or the mint fails, the steps use GITHUB_TOKEN as before. - publish: the release writes need
contents: write, and in this job only GITHUB_TOKEN has that. Before the publish step there is one bounded wait, not a poll: if fewer than 30 core calls are left, the job waits for the reset, at most an hour. This is the same approach asgh_budget_wait.sh --reservein cmux#25434, which main doesn't carry yet. The job's timeout goes from 15 to 75 minutes.
Trust. No new secret, no permissions: change, no environment change, no pull_request_target. The App key is already used by this workflow, and the new token is read-only.
Overlap. cmux#25466 (re-land Linux signing) and cmux#25398 (tip/publish groups) both touch this file, but neither changes the tokens. This PR only touches token lines, one new step at the top of sign, and one new step plus the timeout in publish. Whichever lands second gets a small rebase.
Risk. Low. A failed mint falls back to today's behaviour. Run from main.
Test. tests/test_cmux_next_dev_daily_dispatch.py now checks three things: the signer reads with the read-only App token, no signer step uses bare GITHUB_TOKEN, and publish has the budget wait.
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.
Summary by CodeRabbit
- Chores
- Scheduled development builds can continue source-run checks when app-token creation is unavailable by falling back to the existing workflow token.
- Publishing now allows more time to complete and pauses briefly when the API budget is low, subject to a one-hour maximum wait.