Skip to content

tart_health_agent: collect the worker_exit_69 semaphore - #71

Merged
rcurranmoz merged 1 commit into
mainfrom
collect-worker-exit-69
Aug 17, 2026
Merged

tart_health_agent: collect the worker_exit_69 semaphore#71
rcurranmoz merged 1 commit into
mainfrom
collect-worker-exit-69

Conversation

@rcurranmoz

Copy link
Copy Markdown
Collaborator

Companion to the hangar PR that replaces the guest-vs-tart-run uptime ratio as the crash-loop signal.

worker-runner.sh writes /opt/worker/worker_exit_69 the first time generic-worker exits 69 (the
"cannot free enough disk" path) and deletes it on any other exit, logging "Worker recovered from
previous exit code 69"
. So:

  • present → the last worker exit was the panic path
  • age → how long that has been true

That is the crash loop directly, with no heuristic. worker-runner.sh itself uses find -mmin +15
on the same file to mean "problem repeated for 15m", so hangar reuses that boundary.

Emitted only when the file exists, so an absent semaphore arrives as None rather than 0
0 would otherwise read as "just started looping".

Verified end to end

--dry-run against macmini-m4-236 from a staged copy (deployed tree untouched, confirmed 0 modified
files afterwards):

slot worker worker_exit_69_age_s
1 mac-c51932 None healthy, no semaphore
2 mac-962a94 2566 semaphore backdated 42m → crit

The test semaphore was removed afterwards and its absence confirmed.

🤖 Generated with Claude Code

Companion to the hangar change that replaces the guest-vs-tart-run uptime ratio as the
crash-loop signal. worker-runner.sh writes /opt/worker/worker_exit_69 the first time
generic-worker exits 69 (the "cannot free enough disk" path) and deletes it on any other
exit, logging "Worker recovered from previous exit code 69". So its presence means the
last worker exit was the panic path and its age means how long that has been true —
which is exactly the crash loop, with no heuristic involved.

Emitted only when the file exists, so an absent semaphore arrives as None rather than 0;
0 would otherwise read as "just started looping".

Verified end to end against macmini-m4-236 with --dry-run:
  slot 1 mac-c51932  worker_exit_69_age_s = None   (healthy, no semaphore)
  slot 2 mac-962a94  worker_exit_69_age_s = 2566   (semaphore backdated 42m)
and the test semaphore was removed afterwards.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@rcurranmoz
rcurranmoz requested a review from a team as a code owner August 17, 2026 17:35
@rcurranmoz
rcurranmoz merged commit 51d0653 into main Aug 17, 2026
3 checks passed
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.

1 participant