Skip to content

feat(nos-runner-watchdog): re-run a macOS job a restart stopped - #310

Merged
smartwatermelon-agent[bot] merged 2 commits into
mainfrom
claude/feat-watchdog-lost-runner-56536f08
Nov 24, 2026
Merged

smartwatermelon-agent[bot] merged 2 commits into
mainfrom
claude/feat-watchdog-lost-runner-56536f08

Conversation

@smartwatermelon-agent

Copy link
Copy Markdown
Contributor

Part 2 Task 3 of the fleet runner rollout. On the macOS pool only, the watchdog finds a job that a runner restart stopped and re-runs it once.

  • A run is re-run only when it is attempt 1, not from a fork, not from Dependabot, and has a failed mimolette-macos job with no failed step. A real test failure, a fork-guard denial and a user cancel are never re-run.
  • lostChecked is written before the re-run POST, so a crash cannot re-run a run twice. Runs already in the down sweep's pending list are skipped.
  • A saved repo cursor makes the phase list every repo in turn, even when a busy tick can afford only one.
  • NOS is unchanged: it makes no status=failure call. Tests: 136/136, worst measured tick is 40 subrequests (the cap).

The positive fixture is a hypothesis. No real runner-lost job exists yet: the cancelled dotfiles runs on the macOS runner were cancelled by the agent App, not by a restart. The restart drill in Andrew's batch (step F) is the first proof; if it fails, Task 7 fixes the predicate.

The plan's fixture (b), dotfiles run 44443375980, is a fork-guard denial, not a test failure. The real-failure fixture comes from mac-server-setup run 44651519680, which ran on macos-latest.

Merging this deploys nothing.

Advances #252

Claude Code Bot added 2 commits November 23, 2026 18:41
On the macOS pool only (rerunLost), each tick lists failed runs of
the last 6 hours, one repo after another. A first attempt from the
same repo, not from Dependabot, whose mimolette-macos job failed with
no failed step, gets one rerun-failed-jobs call. The run goes into
swm-macos:lostChecked before the POST, so it is re-run at most once.
Every probed run is marked, and entries older than 6 hours are
pruned. The NOS tick is unchanged and makes no failed-runs call.

The fork-guard denial, the real test failure and the cancelled run
fixtures are captured from the GitHub API. The positive fixture is a
hypothesis: no real runner-lost job exists yet, and the batch restart
drill (step F) is the first proof.

Advances #252
The lost-runner phase started each tick at (tick * 4) mod n. On busy
ticks that list only one repo, the start falls on even indexes only
when n is even, so odd repos were never listed.

The phase now stores a cursor: the index after the last repo it
listed. The next tick starts there, mod n, so every repo is listed in
turn however few a tick can afford, and a changed repo count is safe.
The cursor is kept in the lostChecked value under "_cursor", not in a
key of its own: the phase already reads that key, and its last put
is already in the budget, so this adds no KV get and no new put
reservation.

Advances #252
@smartwatermelon-agent
smartwatermelon-agent Bot merged commit aaf8d98 into main Nov 24, 2026
6 checks passed
@smartwatermelon-agent
smartwatermelon-agent Bot deleted the claude/feat-watchdog-lost-runner-56536f08 branch November 24, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants