You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pre-stop: surface a loud signal when the hook transfers nothing / exits non-zero #186
--pre-stop can "succeed" while doing nothing useful, with no signal to the user — the failure mode that cost a real 48h GPU run its output (#184): aws s3 sync ~/output … ran against the wrong (empty) dir, exited 0, and spored logged Pre-stop hook completed successfully. The instance then terminated and the ephemeral data was gone. The user only discovered it after the fact.
#63 fixes the specific root-cause (ran as root → wrong $HOME), but the broader gap remains: pre-stop gives no feedback about whether it actually flushed anything, so the next misconfiguration (wrong path, expired creds, bucket typo, timeout truncation) is equally silent.
Suggested
Make pre-stop outcomes observable instead of silently "successful":
Non-zero exit is currently logged at the same level as success and then ignored — surface it as a distinct pre_stop_failed notification (Slack/Teams/Discord/SMS), not just a log line.
Consider a lightweight "transferred nothing" heuristic: if the hook is the common aws s3 sync/cp shape, surface its summary (objects/bytes) in the completion notification, or at minimum emit the hook's stdout/stderr tail to the notifier so "synced 0 objects" is visible. (Best-effort; don't over-fit to one tool.)
Notifications already exist for pre_stop_start (pkg/agent/agent.gorunPreStop → notifier.Notify(…, "pre_stop_start", …) and pkg/sms/sms.go), so this is mostly adding the terminal-state events + wiring the formatters.
Why it matters
pre-stop is the last chance to save data off ephemeral storage before terminate. A silent partial/no-op there is unrecoverable. The hook completing should not look identical whether it saved 200 GB or 0 bytes.
Relates to #63 (root-cause fix) and #184 (the data-loss report).
Done — spawn#189 (spored emits pre_stop_failed/pre_stop_timeout with the hook's output tail) + #382 (Slack/Teams/Discord/SMS formatting) both merged. A failed/timed-out pre-stop is now a loud orange/red notification, not a silent success.
Activity
feat(spored): loud pre-stop failure/timeout notifications (#186) (#189)
scttfrdmn commentedon Jun 16, 2026
Done — spawn#189 (spored emits pre_stop_failed/pre_stop_timeout with the hook's output tail) + #382 (Slack/Teams/Discord/SMS formatting) both merged. A failed/timed-out pre-stop is now a loud orange/red notification, not a silent success.
chore(release): v0.55.0 (#191)