Skip to content

nightly: spend no notarization on a build a newer published build is above - #33109

Merged
teamleaderleo merged 1 commit into
feat-cmux-nextfrom
lane/nightly-notary-count
Nov 3, 2026
Merged

teamleaderleo merged 1 commit into
feat-cmux-nextfrom
lane/nightly-notary-count

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Apple caps notarizations per day. On 2026-11-03 we hit the cap (429 RATE_LIMIT, "Exceeded daily limit for notarizations"), and every NEXT nightly from 03:46Z failed at a notary step for hours. About ten runs were signing side by side, and only the newest could ever publish: publication is latest-wins (nightly_version.py check). Each run spends a notarization each on the helper, app and DMG, for both feeds (#32140), so a run that is already overtaken burns up to six for nothing.

Change

  • pick-nightly-sign-runner runs right before signing and, since nightly: pick the signer on hosted Ubuntu instead of the saturated reservation #32966, on hosted Ubuntu. It gets a last step, "Leave notarization to a newer published build" (scripts/ci/nightly-steps/sign-pick-overtaken.sh).
    • The step reads the cmux NEXT feed. When the feed's highest sparkle:version is above this run's build (the run id plus a two-digit attempt), it sets overtaken=true. That is the same rule publish-nightly applies, so this build could only be called superseded there.
    • It runs only on nightly-next pushes, with continue-on-error, a 1-minute budget, and curl capped at 15 s.
  • signer-app and the Mac fallback build-sign-notarize-nightly skip on overtaken, the way they already skip on resolve's superseded.
    • Everything after them (signer-app-notary, signer-dmg-image, signer-dmg, the verify jobs, publish-nightly) then skips as it does for a superseded run, with no red and no failure issue.
    • The legacy (cmux NIGHTLY) signer already signs only the newest NEXT feed build when it is this run's, so it needs no change.
  • Only a published newer build counts, never a newer push alone. A newer run that then fails must not leave the feed with nothing; that is why ci(nightly): nightly-next runs stop skipping their own builds; no 32 vCPU pins; display visual gate opt-in #28961 turned off the ref-moved skip. An unreadable feed signs as before.
  • The picker's job timeout goes from 15 to 16 minutes, keeping room for every step budget (an existing test checks this).

Both feeds stay as they are. The stapled app inside the DMG and both notarizations are unchanged. Consolidating to one feed is #33050, for later. #33028 (merged) waits out a 429 when one still happens.

Performance

metric before after delta harness or run link
notarizations spent by a run a newer published build is above up to 6 (helper, app, DMG × 2 identities), plus the Mac fallback's retry 0 -6 per overtaken run runs 41570134320 / 41568520110 job lists; numbers per day to follow in a comment
wall time added to the feed's path 0 one feed read (< 2 s) inside the existing picker job ~0 no new job
Blacksmith minutes/day unchanged unchanged 0

Tests

tests/test_nightly_sign_runner.py gets an Overtaken class:

  • a newer published build skips;
  • an older or equal feed signs;
  • the attempt is part of the build;
  • an unreadable feed signs;
  • the signers and the fallback are wired to the output, and the step can never fail the pick.

The new tests fail without the change. tests/test_nightly_step_coverage.py, the routing and signer suites, and tests/test_ci_self_hosted_guard.sh pass.

Agent session: agent session

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Stops nightly runs that are already overtaken by a newer published build from spending notarizations, which are capped by Apple per day (hit as a 429 RATE_LIMIT on 2026-11-03, failing every nightly for hours).

  • The signing picker now reads the cmux NEXT feed and skips notarization when its highest build is above this run's, matching the rule publish-nightly applies.
  • Only a published newer build counts, never a newer push alone, so a newer run that fails still leaves the feed with something; an unreadable feed signs as before.

Written for commit e480a89. Summary will update on new commits.

View guided diff Turn on auto-fix

…above

Apple caps notarizations per day. On 2026-11-03 the cap (429 RATE_LIMIT)
failed every nightly for hours while about ten runs signed side by side, and
only the newest of them could publish. pick-nightly-sign-runner, which runs
right before signing, now reads the cmux NEXT feed: when its highest build is
above this run's (the rule publish-nightly applies, nightly_version.py),
overtaken=true and signer-app and build-sign-notarize-nightly skip, as they
do for resolve's superseded. Only a published newer build counts, never a
newer push alone (#28961); an unreadable feed signs as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-f724bb1ff9295c18fee7
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review e480a89: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr33109 -f ref=lane/nightly-notary-count -f platform=macos -f backend_mode=local

red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on e8b1b7d to compare; do not merge until green; see lane-rules

Shipped in:

@github-actions github-actions Bot added the risk:high Risk tier (docs/ci/risk-tiers.md) label Nov 3, 2026
@blacksmith-sh

blacksmith-sh Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Found 7 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmp7itrhz6z/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpq7og2uu0/summary-fail.json (live):/summary-fail.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs
build_only must be a conjunctive exclusion on the helper, signing, and publication jobs
, and must not gate the unsigned app build/
build_only must be a conjunctive exclusion on the helper, signing, and publication jobs
, and must not gate the unsigned app build
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at e480a89

Reviewer: codex gpt-6.1-sol xhigh, fast tier.

Follow-ups: 2. Each lands as an issue in this repo that links this receipt; the lane that opened the PR fixes it forward.

SHIP at e480a89
Visual verdict: no images; Leo tries the build

  1. [P2] [follow-up] sign-pick-overtaken.sh:21: Extract every version before taking the maximum. The greedy sed keeps only the last version per line. Reproduced: a one-line feed containing 4157485009901 then 4157013432001 returns overtaken=false for build 4157156797801, wasting notarizations.

  2. [P2] [follow-up] nightly.yml:4816: Propagate this gate to legacy signing when its target is this run’s build. With rings enabled and NEXT’s Nightly ahead of legacy’s Nightly, the legacy target filters out newer Dev items and can select this run’s prepared build. Reproduced that selection alongside overtaken=true; legacy signing still spends notarizations on a build NEXT will never publish.

Follow-ups:

  • Parse all feed versions and test newest-first compact XML.
  • Skip legacy signing of this run’s overtaken candidate.

@teamleaderleo teamleaderleo removed the risk:high Risk tier (docs/ci/risk-tiers.md) label Nov 3, 2026
@github-actions github-actions Bot added the risk:high Risk tier (docs/ci/risk-tiers.md) label Nov 3, 2026
@teamleaderleo
teamleaderleo merged commit 0ca0646 into feat-cmux-next Nov 3, 2026
181 of 195 checks passed
@teamleaderleo
teamleaderleo deleted the lane/nightly-notary-count branch November 3, 2026 06:41
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6.1-sol high, sweep, via the review router; full diff from merge base dfc60a4 to this head): SHIP at e480a89

No P1/P2 findings.

teamleaderleo added a commit that referenced this pull request Nov 3, 2026
…ightly (#33306)

#33109 added needs.pick-nightly-sign-runner.outputs.overtaken != 'true' to the
macOS signer's job if:, and test_nightly_universal_build.sh matches that if:
verbatim, so the release-notary guard group went red on feat-cmux-next.
The conjunct only narrows the gate; build_only stays a top-level exclusion.


Agent-Session: https://cmux.com/deeplink/agent?id=aid-d750cf10922c785efa64

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
lawrencecchen added a commit that referenced this pull request Nov 3, 2026
…acOS signer (release-notary) (#33289)

#33109 (0ca0646) added needs.pick-nightly-sign-runner.outputs.overtaken != 'true'
as one more top-level conjunct on build-sign-notarize-nightly's if. The
release-notary guard test pins that if exactly, so it failed with
'build_only must be a conjunctive exclusion ...'. The new conjunct keeps the
build_only exclusion (it only narrows the job), so the pin now names it.

Red at 0ca0646 and at tip: bash tests/test_nightly_universal_build.sh
  FAIL: build_only must be a conjunctive exclusion on the helper, signing, and
  publication jobs, and must not gate the unsigned app build
Green here: the script passes (exit 0). Green at 0ca0646^.
teamleaderleo added a commit that referenced this pull request Nov 4, 2026
… whose sign job is queued (#35752)

* ci(nightly-next): an older build hands its sign slot to a newer build whose sign job is queued

GitHub gives a free runner the oldest queued job on its label, so the newest
nightly-next tip's sign job waited about 20 minutes per slot behind older
builds that latest-wins publication replaced within minutes (2026-11-04,
runs 41866781601 to 41873130397). A new step right after the signing claim,
before any secret, reads whether a newer nightly-next push run already has its
own sign job queued, running or signed; if so this job yields (exit 1,
yielded=true) and report-nightly-failure skips it. The newest sign job never
yields, so the newest finished build always signs. Nothing is cancelled.

Narrows #33109's "only a published newer build counts": a newer push alone
still never counts; a newer run whose sign job exists does.

Tests: tests/test_nightly_sign_yield.py (9) and test_nightly_step_coverage
pass; the wiring tests fail on 4d20a29. The other nightly.yml-related test
files fail the same tests here as on base.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-90f71867d2222e9eecd0

* ci(nightly-next): sign-yield test is manual; listings read to an empty page

goal-nightly-30min's BLOCK at bf25b77: tests/test-execution.toml registered
tests/test_nightly_sign_yield.py as linux-guard, which no workflow runs, so the
registry validator failed. It is manual now with a reason (no new CI tests).
Their non-blocking note: a status-filtered run list's total_count can run ahead
of its items, so the yield read pages until an empty one, as
signing_runner.every_page does; more than MAX_PAGES pages signs as before.

Tests: test_nightly_sign_yield, test_nightly_step_coverage,
validate_test_execution_registry.py and test_ci_test_execution_registry pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-90f71867d2222e9eecd0

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was previously deployed

1 inactive deployment
ci-routing-agent — e480a89f Deployed Nov 3, 2026 by teamleaderleo via cmux-tui tree preflight #104164
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:high Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant