Skip to content

fix(swm-macos-runner): end a runner that waits too long for a job - #311

Merged
smartwatermelon-agent[bot] merged 2 commits into
mainfrom
claude/feat-swm-idle-restart-56536f08
Nov 24, 2026
Merged

smartwatermelon-agent[bot] merged 2 commits into
mainfrom
claude/feat-swm-idle-restart-56536f08

Conversation

@smartwatermelon-agent

Copy link
Copy Markdown
Contributor

Part 2 Task 4 of the fleet runner rollout. The macOS supervisor now ends a JIT runner that has waited for a job for SWM_IDLE_MAX_S (default 3600 s, 0 disables). This is dev-env#297 for the macOS pool.

  • It uses the same DELETE as the update-pending path. A 2xx ends the VM and is not counted as a fail. A 422 (busy) or 404 keeps the VM.
  • A pending update takes precedence. Idle-max runs on the SWM_UPDATE_IDLE_CHECK_S cadence (300 s), so setting that to 0 also turns idle-max off. The runbook says so.
  • A non-numeric SWM_IDLE_MAX_S turns the limit off, and that is logged.
  • New log lines are in the runbook, section 7.

Tests: 8 new cases in test-supervisor.sh; the existing cases are unedited and pass. Shellcheck is clean.

Known, not changed here: the worst-case shutdown during an in-flight check is about 330 s, over the plist's ExitTimeOut of 300 s. The same window already exists on the update-pending path on main, so it gets its own issue.

The updater installs this on MIMOLETTE after merge. Live proof is part 2 Task 7.

Advances #297

Claude Code Bot added 2 commits November 23, 2026 19:07
A JIT runner that gets no job now ends after SWM_IDLE_MAX_S (default
3600 s, 0 disables) from its handoff, instead of only at SWM_JOB_MAX_S
(6 h). bounded_check makes the same DELETE as the update-pending path,
on the same SWM_UPDATE_IDLE_CHECK_S cadence. A 2xx ends the VM and is
not counted as a fail. A 422 (busy) or 404 keeps the VM; the refusal
is logged once per runner. A pending update takes precedence. The
runbook lists the new log lines.

Advances #297
A value such as 1h turned the idle limit off with no log line. The
supervisor now logs it at each JIT handoff. install.sh already refuses
such a value in the env file, so this covers a direct override only.

Advances #297
@smartwatermelon-agent
smartwatermelon-agent Bot merged commit e01d9d2 into main Nov 24, 2026
6 checks passed
@smartwatermelon-agent
smartwatermelon-agent Bot deleted the claude/feat-swm-idle-restart-56536f08 branch November 24, 2026 03:24
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