ci(nightly-next): loud 3h stall alarm, tick refusal tally, and a daemon-pool invariant

Merged
TE
17d ago
+146-15

Summary

nightly-next has been stuck at ff8d849 since 01:44Z on 2026-10-21, and every run involved stayed green:

  • No promotion was requested after 02:59Z. Every nightly-next tick (e.g. run 39550209508) walked the 120 newest feat-cmux-next commits and refused all of them. 87 had a published cmux-tui tree whose macOS daemon tests never passed (no daemon-tests.json), and 33 had no published tree. The feat-cmux-next daemon-test jobs sit queued on glaeda-side-std-xcode-26.6 (165 queued, 43 of 44 online runners busy at 05:50Z). The oldest still-queued job dates from 04:07Z. The pool fix is separate (huge-blue/release-rings owns it).
  • The 03:13 to 05:33 nightly.yml runs on nightly-next are only continuation ticks (CONTINUE_ONLY, "already published"). They are not promotions.
  • The feed watch opened #23013 only at 4h, and the issue said just "Nothing was promoted".

This PR makes that stall loud and gives its reason:

  • nightly-next-feed-watch: the default limit drops from 4h to 3h, and a stale check now exits 1, so the scheduled run is red every 30 minutes until the feed catches up. The issue still opens as before. A GitHub API error still only warns.
  • nightly-next-tick: when it requests nothing, it adds a nightly-next tick warning annotation with a tally of the refusal reasons (for example 120 refused: 87x the daemon tests have not passed for tree <sha> yet …; 33x the nightly cannot resolve a published cmux-tui tree for it yet). It also does this when the walk reaches the already-promoted commit, a path that used to exit 0 silently.
  • The feed watch reads that annotation from the latest tick run (three API calls, only during a promotion stall) and adds it to the stale reason, so the issue and the red run both say why.

This PR is against main because schedule and workflow_run workflows run only from the default branch. #22669 also edits nightly-next-tick.yml, but only the step if: lines, so the two should merge cleanly.

Testing

Observed

  • Ran the tick's tally pipeline on the real log of tick run 39550209508. It printed the warning quoted above.
  • actionlint passes on both workflows.

Not run

  • tests/test_nightly_next_feed_watch.py (new cases: tick refusal quoting, annotation lookup, exit 1 when stale and 0 when current, the 3h default) was not run locally because the cosmic-gray hook keeps tests off Leo's Mac. It runs in this PR's CI.

Changelog

none

Agent session: cosmic-gray

🤖 Generated with Claude Code


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


Summary by cubic

Makes the nightly-next stall alarm fail loudly and name the cause, instead of staying green with a vague "Nothing was promoted" issue.

  • The feed watch's stale limit drops from 4h to 3h, and a stale check now exits 1 so the scheduled run turns red.
  • When the tick requests nothing, it annotates a tally of refusal reasons, including when the walk reaches the already-promoted commit (a path that used to exit 0 silently). The feed watch reads that tally from the latest successful tick run and quotes it in the issue body and failing annotation, never in issue comments.
  • The repo variable check now fails when CI_NEXT_DAEMON_POOL equals CI_SIDE_LANE_RUNNER — the root cause of the stall, where daemon tests queued behind pull request side lanes.
  • The new feed-watch tests now run in the release-notary guard job.

Summary by CodeRabbit

  • Bug Fixes

    • Stale nightly feed checks now fail when updates lag by more than three hours, rather than only issuing a warning.
    • Stale issue handling retains a single issue to reduce duplicate reporting.
  • Improvements

    • Promotion stalls now include clearer refusal counts, commit details, and relevant workflow information.
    • Nightly promotion checks scan additional commits and stop promptly when promotion is requested or already completed.
    • Warnings are more specific when no promotion can proceed.
    • CI validation now detects when daemon tests share the pull-request runner, helping prevent queueing delays.