Skip to content

feat(runner-updaters): alert after an hour of failed updates - #292

Merged
smartwatermelon-agent[bot] merged 1 commit into
mainfrom
claude/feat-updater-failure-alerts-0ff2a5bc
Nov 18, 2026
Merged

smartwatermelon-agent[bot] merged 1 commit into
mainfrom
claude/feat-updater-failure-alerts-0ff2a5bc

Conversation

@smartwatermelon-agent

Copy link
Copy Markdown
Contributor

Why

On 2026-11-18 every pass of both MIMOLETTE updaters failed for about two hours and nobody was alerted. A failed update was only a log line, and neither updater plist carried NTFY_TOPIC.

What

  • Both updaters count consecutive failed passes in update-fails. A failed pass is a failed git fetch or merge, an unreadable revision, or a failed install.sh. A good pass (up to date, or installed) resets the count. A swm pass that only waits for a running job changes nothing.
  • At 6 failures (NOS_UPDATE_ALERT_AFTER / SWM_UPDATE_ALERT_AFTER) one ntfy alert goes out and update-alerted is written, so later failures stay quiet. The first good pass after that sends one recovery alert and clears both files.
  • A failed ntfy delivery writes no marker, so the next pass retries. An unset topic logs a warning and the updater still exits 0.
  • Both installers render NTFY_TOPIC into the updater plist (swm: the topic only, not the supervisor knobs).
  • Runbooks updated. The updater cannot reload its own plist, so one hand run of install.sh on MIMOLETTE turns the alert on.

Tests

scripts/nos-runner/tests/run-tests.sh and scripts/swm-macos-runner/tests/run-tests.sh pass. New cases cover the 5/6/7 failure sequence, recovery, no alert without a prior one, job-waiting, install failure, unreadable revision, thresholds, no topic, failed delivery, and the plist topic.

Advances #252

On 2026-11-18 every pass of both MIMOLETTE updaters failed for about two
hours and nobody was told: a failed update was only a log line, and neither
updater plist carried NTFY_TOPIC.

Each updater now counts consecutive failed passes (git fetch or merge
failed, revision unreadable, install.sh failed) in update-fails. At 6
(NOS_UPDATE_ALERT_AFTER / SWM_UPDATE_ALERT_AFTER) it sends one ntfy alert
and writes update-alerted so later failures stay quiet. The first good
pass after an alert sends one recovery alert and clears both files. A swm
pass that only waits for a running job changes nothing. An unset topic
logs a warning; a failed delivery is retried on a later pass.

Both installers now render NTFY_TOPIC into the updater plist (swm: the
topic only, not the supervisor knobs). The updater cannot reload its own
plist, so one hand run of install.sh is needed. Runbooks and tests updated.

Advances #252
@smartwatermelon-agent
smartwatermelon-agent Bot merged commit 2894675 into main Nov 18, 2026
6 checks passed
@smartwatermelon-agent
smartwatermelon-agent Bot deleted the claude/feat-updater-failure-alerts-0ff2a5bc branch November 18, 2026 23:39
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