ci(nightly-next): a newer classic NIGHTLY build never supersedes a NEXT publication

Merged
TE
2d ago
+24-2

Nightly run https://github.com/manaflow-ai/cmux/actions/runs/41815641855 built, signed, notarized and verified NEXT build 4181564185501. Its publish-nightly then ended green with nothing published:

build 4181564185501 is above https://files-next.cmux.com/nightly-next/appcast-arm64.xml (highest 4178064067101)
build 4181564185501 is superseded by 4181616539301 in https://files.cmux.com/nightly/appcast.xml
::notice title=Superseded::build 4181564185501 is older than what the feed already serves; a newer build published first, so nothing to do

4181616539301 is a classic NIGHTLY build (0.65.2-nightly), published at 11:52Z. Build numbers come from the run id, which both tracks share. So a classic run that starts after a NEXT run and publishes first sinks that NEXT publication, which then counts as superseded. The NEXT feed stayed at 4178064067101 even though a newer verified build existed.

Fix: in publish-recheck-recovered.sh, on the nightly-next track only, the locked recheck drops the classic files.cmux.com/nightly feeds. A NEXT build is superseded only by a newer NEXT build. The classic track keeps its floor check unchanged. The NEXT build number still clears the classic floor when it is assigned (app-resolve-daemon-metadata.sh, unchanged).

Tests (tests/test_nightly_next_recovery.py):

  • New: test_a_newer_classic_nightly_never_supersedes_a_next_build, for own and recovered builds. It fails on the old script and passes with the fix.
  • Two existing subcases that encoded classic-supersedes-NEXT now put the newer build on a NEXT feed instead.
  • The whole file passes, and test_nightly_next_identity.py passes.

Follow-up, not in this PR: sign-refuse-superseded-resume.sh and the two recovery scripts also list the classic feed as a hard floor for NEXT builds. That is a likely cause of find-nightly-next-recovery's failure in the same run.

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 classic NIGHTLY builds from superseding NEXT publications on the nightly-next track. Both tracks share run-id build numbers, so a classic run that started later and published first made a newer verified NEXT build look superseded, leaving the NEXT feed stuck on an older build.

Bug Fixes

  • The recheck on nightly-next now ignores the classic feeds; a NEXT build is superseded only by a newer NEXT build.
  • Adds a test covering a newer classic build for both own and recovered builds, and updates two existing subcases that encoded classic-supersedes-NEXT.