feat: ntfy notifications for imported, needs-decision, broken #96

Merged
naps62-yolo merged 1 commits from issue/41-ntfy into main 2026-08-23 02:04:37 +01:00
Owner

Closes #41.

Wires exactly the three DESIGN.md §9.5 events through a new Notifier (crates/arr-daemon/src/notify.rs):

  • Imported → a title's owners (crates/arr-daemon/src/import.rs), fired right after a movie or TV import settles. One notification per grab, not per episode. Not sent on hard/soft-fail, since only import is good news.
  • Needs a decision → the operator alone (crates/arr-daemon/src/attention.rs), for a movie entering the no-PT-source queue or hard-failing twice on different releases — the same two conditions GET /api/queues/attention already reports. Edge-triggered in-memory: notifies once on entry, forgets a movie once it leaves both queues so a future re-entry notifies again.
  • Broken → the operator alone (crates/arr-daemon/src/broken.rs), for Prowlarr/Transmission/TMDB unreachable, plus a disk-full hardlink/copy failure surfaced directly from the import pipeline (io::ErrorKind::StorageFull). Also edge-triggered: notifies once when an upstream goes down, stays silent on recovery (no fourth event type).

A new ARR_NTFY_OPERATOR_TOPIC bootstrap setting holds the operator's topic; without it, the needs-a-decision and broken lanes are skipped (logged once at startup) since there's nowhere to send them.

just ci passes locally.

Closes #41. Wires exactly the three DESIGN.md §9.5 events through a new `Notifier` (`crates/arr-daemon/src/notify.rs`): - **Imported** → a title's owners (`crates/arr-daemon/src/import.rs`), fired right after a movie or TV import settles. One notification per grab, not per episode. Not sent on hard/soft-fail, since only import is good news. - **Needs a decision** → the operator alone (`crates/arr-daemon/src/attention.rs`), for a movie entering the no-PT-source queue or hard-failing twice on different releases — the same two conditions `GET /api/queues/attention` already reports. Edge-triggered in-memory: notifies once on entry, forgets a movie once it leaves both queues so a future re-entry notifies again. - **Broken** → the operator alone (`crates/arr-daemon/src/broken.rs`), for Prowlarr/Transmission/TMDB unreachable, plus a disk-full hardlink/copy failure surfaced directly from the import pipeline (`io::ErrorKind::StorageFull`). Also edge-triggered: notifies once when an upstream goes down, stays silent on recovery (no fourth event type). A new `ARR_NTFY_OPERATOR_TOPIC` bootstrap setting holds the operator's topic; without it, the needs-a-decision and broken lanes are skipped (logged once at startup) since there's nowhere to send them. `just ci` passes locally.
naps62-yolo added 1 commit 2026-08-23 01:58:41 +01:00
feat: ntfy notifications for imported, needs-decision, broken (#41)
ci / web (pull_request) Successful in 25s
e2e / e2e (pull_request) Successful in 53s
ci / rust (pull_request) Successful in 2m29s
0df151872c
Exactly the three events DESIGN.md §9.5 names, wired through a new
Notifier: imported goes to a title's owners, needs-a-decision and
broken go to the operator alone. Both operator events are
edge-triggered in-memory so a standing condition notifies once, not
every tick.
naps62-yolo merged commit ad0eb0d9d3 into main 2026-08-23 02:04:37 +01:00
naps62-yolo deleted branch issue/41-ntfy 2026-08-23 02:04:37 +01:00
Sign in to join this conversation.