Repository navigation
fix(nos-runner): never restart a slot while another slot is down - #306
Merged
smartwatermelon-agent[bot] merged 2 commits intoNov 24, 2026
Merged
Conversation
added 2 commits
November 23, 2026 16:18
The idle restart took one slot per pass, but a replacement can need several passes to start. A second stale slot was then restarted while the first had no VM, so both were offline and the watchdog saw a miss. restart_stale_slots now restarts slot N only when every other slot has a VM, a registered runner and no dropped marker. Advances #297
A restart held back because another slot is down was silent. Log it once per idle runner, tracked in deferred-N, and clear the marker on restart. Also guard the refresh_ls test against an empty stop line. Advances #297
smartwatermelon-agent
Bot
requested a review
from twistedmelonman
as a code owner
November 24, 2026 00:30
smartwatermelon-agent
Bot
deleted the
claude/fix-nos-idle-restart-both-56536f08
branch
November 24, 2026 00:35
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The idle restart from #303 restarted one slot per pass, but a restarted slot takes more than one pass to come back (its old runner must be deregistered first). On the first live run, slot 2 was stopped while slot 1 had no VM, so both slots were down at once:
The watchdog counts zero online runners as a miss. Both new VMs started 33 s apart, so this would repeat every idle hour.
restart_stale_slotsnow restarts a slot only if every other slot has a VM and a registered runner (name=andid=set, nodropped-Nmarker). With one slot there is no other slot to wait for, so the old behaviour stays.deferred-Nholds the runner id), not on every pass.idle_restart_waits_for_other_slotandidle_restart_deferral_logged_once.idle_restart_one_slot_per_passnow runs the extra passes slot 1 needs to come back.idle_restart_refreshes_vm_listchecks thatcontainer lsruns again after the stop, because its old setup (the other slot empty) can no longer restart. A mutant with the refresh removed fails it.run-tests.sh: 556 pass, 0 fail. shellcheck -S info is clean.Known trade-off: if the other slot stays down without counting failures (for example, GitHub keeps returning 5xx for a JIT config), an idle runner is not restarted. The log says why.
Advances #297