feat(auto-update): default-priority hold notifications with manual-resume guidance #78

Merged
nimmo merged 5 commits from feature/hold-improvement-20260719-221710538 into main 2026-07-20 07:26:41 +01:00
Owner

Summary

Refines scripts/nixos-auto-update.sh so deployment holds send a default-priority ntfy status (not a warning/high that pages, and not the low tier), while still telling the user why updates are paused, since when, and that a manual just auto-update-release is required.

Closes #77

Changes

  • scripts/nixos-auto-update.sh — added notify_hold() which posts to ntfy at default priority (tag pause) when NOTIFY_NTFY_ON_FAILURE is set, and keeps the Plasma notification. The active-hold site now calls notify_hold instead of notify_status.
    • Why not notify_status: notify_status is Plasma-only and never calls ntfy_notify, so on headless hosts (vega) the hold would have been silently dropped from ntfy — a regression of the documented "every blocked run sends an ntfy hold reminder" requirement. notify_hold preserves ntfy routing at default priority.
  • Hold message states: paused reason, held-since timestamp, and just auto-update-release to resume.
  • Failure-suspend path unchanged (remains urgent/high).
  • README.md updated: holds now described as default-priority ntfy status.

Validation

  • nix flake check passes (all checks).
  • Live hold test on vega: PASSED — default-priority ntfy status delivered with correct content.
  • Regression suite extended (tests/auto-update-regressions.sh): runs the real hold path with a mocked curl and asserts a default-priority ntfy POST — both headless (NOTIFY_PLASMA=false, ntfy on) and Plasma-enabled cases, and asserts it does NOT use high priority or the failure tag. All regression tests pass.

Reviewer conditions (comment #453)

  1. Default-priority message + manual-resume guidance preserved, sent via an ntfy-capable path (notify_holdntfy_notify at default).
  2. Regression coverage added: runs hold path with ntfy enabled, asserts ntfy POST/title/priority, includes a headless configuration case.
  3. README.md updated to reflect the new default-priority hold routing/priority semantics.

Checklist

  • nix flake check green
  • Issue #77 opened
  • Live hold alert verified on vega (default priority, correct content)
  • No-op divergence confirmed expected (pre-merge state)
  • Reviewer conditions met (ntfy-capable default-priority path + regression coverage + docs)
## Summary Refines `scripts/nixos-auto-update.sh` so deployment holds send a **default-priority ntfy status** (not a `warning`/high that pages, and not the low tier), while still telling the user why updates are paused, since when, and that a manual `just auto-update-release` is required. Closes #77 ## Changes - `scripts/nixos-auto-update.sh` — added `notify_hold()` which posts to ntfy at `default` priority (tag `pause`) when `NOTIFY_NTFY_ON_FAILURE` is set, and keeps the Plasma notification. The active-hold site now calls `notify_hold` instead of `notify_status`. - **Why not `notify_status`**: `notify_status` is Plasma-only and never calls `ntfy_notify`, so on headless hosts (vega) the hold would have been silently dropped from ntfy — a regression of the documented "every blocked run sends an ntfy hold reminder" requirement. `notify_hold` preserves ntfy routing at `default` priority. - Hold message states: paused reason, held-since timestamp, and `just auto-update-release` to resume. - Failure-suspend path unchanged (remains urgent/high). - `README.md` updated: holds now described as default-priority ntfy status. ## Validation - `nix flake check` passes (all checks). - **Live hold test on vega: PASSED** — default-priority ntfy status delivered with correct content. - **Regression suite extended** (`tests/auto-update-regressions.sh`): runs the real hold path with a mocked `curl` and asserts a default-priority ntfy POST — both **headless** (`NOTIFY_PLASMA=false`, ntfy on) and **Plasma-enabled** cases, and asserts it does NOT use high priority or the failure tag. All regression tests pass. ## Reviewer conditions (comment #453) 1. ✅ Default-priority message + manual-resume guidance preserved, sent via an ntfy-capable path (`notify_hold` → `ntfy_notify` at `default`). 2. ✅ Regression coverage added: runs hold path with ntfy enabled, asserts ntfy POST/title/priority, includes a headless configuration case. 3. ✅ `README.md` updated to reflect the new default-priority hold routing/priority semantics. ## Checklist - [x] `nix flake check` green - [x] Issue #77 opened - [x] Live hold alert verified on vega (default priority, correct content) - [x] No-op divergence confirmed expected (pre-merge state) - [x] Reviewer conditions met (ntfy-capable default-priority path + regression coverage + docs)
Improve hold notifications to use status messages with default priority
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 59s
Build and Push Attic Cache / build (pull_request) Has been skipped
a58ed23581
- Changed hold notifications from notify_warning to notify_status
- Uses default priority (low) instead of warning level
- Message format is clearer: 'Auto-Update Hold Active' instead of 'NixOS Update Held'
- Includes hostname prefix: 'vega - Automatic updates are paused.'
- Additional context: 'This does not affect system functionality — only auto-update scheduling.'
- Maintains all original hold details: 'Held since: {timestamp} Created by: {user} Reason: {reason}'
- Preserves original release command: 'Release with: sudo nixos-auto-update-control release'

This addresses the requirement for clearer, non-urgent notifications when auto-updates are stopped due to holds or failed updates.

Co-authored-by: openhands <openhands@all-hands.dev>
fix(auto-update): use just auto-update-release in hold message
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 56s
Build and Push Attic Cache / build (pull_request) Has been skipped
03c1435810
Author
Owner

Blocking review: this branch changes the active-hold path from notify_warning to notify_status. notify_status only delivers Plasma notifications; unlike notify_warning, it never calls ntfy_notify. Consequently, after this change a deployment hold produces no ntfy alert on headless hosts and no remote ntfy alert on Plasma hosts. This regresses the documented requirement that every blocked run sends an ntfy hold reminder, and makes a critical operational state silent when the host is unattended.

Approval conditions:

  1. Keep the revised low-priority/default-priority message and clearer manual-resume guidance, but send it through an ntfy-capable path (or extend notify_status explicitly and safely for this event), preserving the configured ntfy routing.
  2. Add regression coverage that runs the hold path with ntfy enabled and asserts an ntfy POST/title/priority; include a headless configuration case so this cannot regress silently again.
  3. Update the notification documentation if the intended routing or priority semantics change.

The existing auto-update regression suite passes, but it does not cover active-hold notification routing, so it does not detect this regression.

Blocking review: this branch changes the active-hold path from `notify_warning` to `notify_status`. `notify_status` only delivers Plasma notifications; unlike `notify_warning`, it never calls `ntfy_notify`. Consequently, after this change a deployment hold produces no ntfy alert on headless hosts and no remote ntfy alert on Plasma hosts. This regresses the documented requirement that every blocked run sends an ntfy hold reminder, and makes a critical operational state silent when the host is unattended. Approval conditions: 1. Keep the revised low-priority/default-priority message and clearer manual-resume guidance, but send it through an ntfy-capable path (or extend `notify_status` explicitly and safely for this event), preserving the configured ntfy routing. 2. Add regression coverage that runs the hold path with ntfy enabled and asserts an ntfy POST/title/priority; include a headless configuration case so this cannot regress silently again. 3. Update the notification documentation if the intended routing or priority semantics change. The existing auto-update regression suite passes, but it does not cover active-hold notification routing, so it does not detect this regression.
fix(auto-update): route hold alerts through ntfy at low priority; add regression tests
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 56s
Build and Push Attic Cache / build (pull_request) Has been skipped
037f4bb397
The previous change switched the active-hold notification from
notify_warning to notify_status, which is Plasma-only and never calls
ntfy_notify. On headless hosts (vega) a deployment hold therefore became
silent on ntfy — a regression of the documented requirement that every
blocked run sends an ntfy hold reminder.

Add notify_hold() which posts to ntfy at low priority (tag: pause) when
NOTIFY_NTFY_ON_FAILURE is set, and keeps the Plasma notification. Replace
the hold-site call. Add regression coverage that runs the real hold path
with a mocked curl and asserts a low-priority ntfy POST for both headless
and Plasma-enabled configurations. Update README to describe the new
low-priority hold routing.
Author
Owner

Addressed all three approval conditions in commit 037f4bb:

  1. ntfy-capable low-priority path — added notify_hold() which calls ntfy_notify at low priority (tag pause) when NOTIFY_NTFY_ON_FAILURE is set, plus the Plasma notification. The active-hold site uses it instead of notify_status (which is Plasma-only and would have silently dropped ntfy on headless vega — exactly the regression you flagged; the original notify_warning did reach ntfy, so my first cut regressed that). Message and manual-resume guidance preserved.

  2. Regression coveragetests/auto-update-regressions.sh now runs the real hold path with a mocked curl and asserts a low-priority ntfy POST with the correct title/tag, for both a headless (NOTIFY_PLASMA=false, ntfy on) and a Plasma-enabled configuration, and asserts it does NOT use high priority or the failure tag. All regression tests pass.

  3. DocsREADME.md updated: holds now described as a low-priority ntfy status, not a warning.

nix flake check is green (all 153 checks). Ready for re-review.

Addressed all three approval conditions in commit `037f4bb`: 1. **ntfy-capable low-priority path** — added `notify_hold()` which calls `ntfy_notify` at `low` priority (tag `pause`) when `NOTIFY_NTFY_ON_FAILURE` is set, plus the Plasma notification. The active-hold site uses it instead of `notify_status` (which is Plasma-only and would have silently dropped ntfy on headless vega — exactly the regression you flagged; the original `notify_warning` did reach ntfy, so my first cut regressed that). Message and manual-resume guidance preserved. 2. **Regression coverage** — `tests/auto-update-regressions.sh` now runs the real hold path with a mocked `curl` and asserts a low-priority ntfy POST with the correct title/tag, for both a **headless** (`NOTIFY_PLASMA=false`, ntfy on) and a **Plasma-enabled** configuration, and asserts it does NOT use high priority or the failure tag. All regression tests pass. 3. **Docs** — `README.md` updated: holds now described as a low-priority ntfy status, not a warning. `nix flake check` is green (all 153 checks). Ready for re-review.
fix(auto-update): use default ntfy priority for hold alerts, not low
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 59s
Build and Push Attic Cache / build (pull_request) Has been skipped
a845865bcc
Per review feedback the hold alert should be default priority (not low),
distinguishing it from high-priority failures without demoting it to the
low/noisy-suppressed tier. Updates notify_hold, regression assertions,
comments, and README accordingly.
nimmo changed title from feat(auto-update): low-priority hold notifications with manual-resume guidance to feat(auto-update): default-priority hold notifications with manual-resume guidance 2026-07-20 07:09:31 +01:00
Merge branch 'main' into feature/hold-improvement-20260719-221710538
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 57s
Build and Push Attic Cache / build (pull_request) Has been skipped
e7d03ebded
nimmo merged commit f522bcffbe into main 2026-07-20 07:26:41 +01:00
nimmo deleted branch feature/hold-improvement-20260719-221710538 2026-07-20 07:26:42 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/nixos-config!78
No description provided.