monitoring: notify-and-drill — plain-language alert, one safe action, drill-in #84

Closed
opened 2026-07-25 04:59:04 +00:00 by ben · 1 comment
Owner

Parent

Feature spec: #18 (monitoring).

What to build

The notify and drill-in stretch of an alert's life. When an anomaly crosses a
threshold the operator is notified in the operator app and at the alert
contact, with a plain-language diagnosis and — when one is safe — a single
advised action (P5-S2: "Chat is down… members can't send messages right now"

  • "restart it — this usually fixes it, and it's safe"). When monitoring can
    diagnose the problem but has no fix it is confident is safe for, it says so and
    names no advised action (P5-S2x, DDR 0072) — never a fabricated one-click
    button (advice never veto, ADR 0015, read as: the system may withhold advice,
    not invent it). From a notification or any status item the operator can drill
    in (P5-S3) to the service detail: where it runs and its backup, a last-24h
    health strip, a curated events timeline, and its current status — with Open
    logs and Download logs reachable from every surface (the standing rule,
    ADR 0027; curated timeline in front, raw log lines behind the buttons).

This slice introduces the one new outbound port, Notifier — the only
genuinely new egress — faked in seam tests (assert what was delivered and its
severity, sending nothing). The notification and status surfaces stay
queries/projections over the standing alerts. Choosing the recommended action
proceeds the flow into a Respond (P5-S4, the next slice); choosing Open
dashboard / drill in opens the device/service detail.

Notes: the Notifier's concrete delivery channel (email via the community mail
service vs SMS via an external provider) is a human decision carried on the
alert-contact-config slice, not decided here; this slice builds and fakes the
port only.

Acceptance criteria

  • (story 7) Given an anomaly crosses a threshold with a safe fix available, When I am notified, Then P5-S2 states the problem in plain language and names one recommended, safe action.
  • (story 7) Given a notification, When delivered, Then it reaches both the operator app and the alert contact (email/phone) from founding (P1-S2).
  • (story 8) Given P5-S2, When I choose the recommended action, Then it is applied (flow proceeds as a Respond, P5-S4); When I choose Open dashboard / drill in, Then the device/service detail opens (P5-S3).
  • (story 9) Given an anomaly monitoring can diagnose but has no fix it is confident is safe for, When I am notified, Then P5-S2x delivers the diagnosis only and names no advised action.
  • (story 9) Given P5-S2x, When I respond, Then the offered path is to drill in (P5-S3) or open the dashboard — never a manufactured one-click fix (advice never veto, ADR 0015).
  • (story 10) Given a notification or a status item, When I drill in, Then P5-S3 shows the service detail: where it runs and its backup, a last-24h health strip, a curated events timeline, and its current status.
  • (story 10) Given any status surface or alert, When I need the raw logs, Then Open logs and Download logs are available (logs reachable from every surface, ADR 0027), with curated timeline/events in front and raw log lines behind the buttons.

Blocked by

  • #80 — the classifier + standing-alert projection

Task manifest

task: monitoring:notify-and-drill
implements_flow: p5-monitoring
implements_edge: S1→S2, S1→S2x, S2→S3, S2x→S3
wireframe:
  - docs/ux/wireframes/p5-monitoring/p5-s2-notify.html
  - docs/ux/wireframes/p5-monitoring/p5-s2x-notify-no-safe-action.html
  - docs/ux/wireframes/p5-monitoring/p5-s3-drill-in.html
interface: monitor orchestrator — raise → notify via the new Notifier port (plain-language diagnosis + at most one safe advised action, or diagnosis-only for no-safe-action); drill-in projection of a service's detail/timeline/logs
seam: "`monitor` control-plane orchestrator seam tests (Go) \u2014 fake Notifier (assert delivered content + severity + channel), fake HealthCheck/fleet-state driving the diagnosis, fake clock"
acceptance:
  - given: an anomaly crosses a threshold with a safe fix available
    when: the operator is notified
    then: P5-S2 states the problem in plain language and names exactly one recommended safe action, delivered to both the operator app and the alert contact
  - given: an anomaly monitoring can diagnose but has no safe fix
    when: the operator is notified
    then: P5-S2x delivers diagnosis only, names no advised action, and offers only drill-in / open dashboard (never a manufactured one-click fix)
  - given: P5-S2/P5-S2x
    when: the operator chooses the action or chooses drill-in
    then: the action proceeds to Respond (P5-S4), or the service detail opens (P5-S3)
  - given: a notification or status item
    when: the operator drills in
    then: P5-S3 shows where the service runs, its backup, a last-24h health strip, a curated timeline and current status, with Open/Download logs on every surface
depends_on: [status-surface-classifier]
out_of_scope: [applying/logging the fix and re-aggregating (respond-ladder's), the fix-didn't-hold re-raise (fix-didnt-hold's), the Notifier concrete channel (alert-contact-config's needs_human_decision), the alert contact's configuration surface (alert-contact-config's)]
needs_human_decision: []
## Parent Feature spec: #18 (monitoring). ## What to build The notify and drill-in stretch of an alert's life. When an anomaly crosses a threshold the operator is notified in the operator app *and* at the alert contact, with a plain-language diagnosis and — when one is safe — a single advised action (P5-S2: "Chat is down… members can't send messages right now" + "restart it — this usually fixes it, and it's safe"). When monitoring can diagnose the problem but has no fix it is confident is safe for, it says so and names no advised action (P5-S2x, DDR 0072) — never a fabricated one-click button (advice never veto, ADR 0015, read as: the system may withhold advice, not invent it). From a notification or any status item the operator can drill in (P5-S3) to the service detail: where it runs and its backup, a last-24h health strip, a curated events timeline, and its current status — with Open logs and Download logs reachable from every surface (the standing rule, ADR 0027; curated timeline in front, raw log lines behind the buttons). This slice introduces the one new outbound port, `Notifier` — the only genuinely new egress — faked in seam tests (assert *what* was delivered and its severity, sending nothing). The notification and status surfaces stay queries/projections over the standing alerts. Choosing the recommended action proceeds the flow into a Respond (P5-S4, the next slice); choosing Open dashboard / drill in opens the device/service detail. Notes: the `Notifier`'s concrete delivery channel (email via the community mail service vs SMS via an external provider) is a human decision carried on the alert-contact-config slice, not decided here; this slice builds and fakes the port only. ## Acceptance criteria - [ ] (story 7) Given an anomaly crosses a threshold with a safe fix available, When I am notified, Then P5-S2 states the problem in plain language and names one recommended, safe action. - [ ] (story 7) Given a notification, When delivered, Then it reaches both the operator app and the alert contact (email/phone) from founding (P1-S2). - [ ] (story 8) Given P5-S2, When I choose the recommended action, Then it is applied (flow proceeds as a Respond, P5-S4); When I choose Open dashboard / drill in, Then the device/service detail opens (P5-S3). - [ ] (story 9) Given an anomaly monitoring can diagnose but has no fix it is confident is safe for, When I am notified, Then P5-S2x delivers the diagnosis only and names no advised action. - [ ] (story 9) Given P5-S2x, When I respond, Then the offered path is to drill in (P5-S3) or open the dashboard — never a manufactured one-click fix (advice never veto, ADR 0015). - [ ] (story 10) Given a notification or a status item, When I drill in, Then P5-S3 shows the service detail: where it runs and its backup, a last-24h health strip, a curated events timeline, and its current status. - [ ] (story 10) Given any status surface or alert, When I need the raw logs, Then Open logs and Download logs are available (logs reachable from every surface, ADR 0027), with curated timeline/events in front and raw log lines behind the buttons. ## Blocked by - #80 — the classifier + standing-alert projection ## Task manifest ```yaml task: monitoring:notify-and-drill implements_flow: p5-monitoring implements_edge: S1→S2, S1→S2x, S2→S3, S2x→S3 wireframe: - docs/ux/wireframes/p5-monitoring/p5-s2-notify.html - docs/ux/wireframes/p5-monitoring/p5-s2x-notify-no-safe-action.html - docs/ux/wireframes/p5-monitoring/p5-s3-drill-in.html interface: monitor orchestrator — raise → notify via the new Notifier port (plain-language diagnosis + at most one safe advised action, or diagnosis-only for no-safe-action); drill-in projection of a service's detail/timeline/logs seam: "`monitor` control-plane orchestrator seam tests (Go) \u2014 fake Notifier (assert delivered content + severity + channel), fake HealthCheck/fleet-state driving the diagnosis, fake clock" acceptance: - given: an anomaly crosses a threshold with a safe fix available when: the operator is notified then: P5-S2 states the problem in plain language and names exactly one recommended safe action, delivered to both the operator app and the alert contact - given: an anomaly monitoring can diagnose but has no safe fix when: the operator is notified then: P5-S2x delivers diagnosis only, names no advised action, and offers only drill-in / open dashboard (never a manufactured one-click fix) - given: P5-S2/P5-S2x when: the operator chooses the action or chooses drill-in then: the action proceeds to Respond (P5-S4), or the service detail opens (P5-S3) - given: a notification or status item when: the operator drills in then: P5-S3 shows where the service runs, its backup, a last-24h health strip, a curated timeline and current status, with Open/Download logs on every surface depends_on: [status-surface-classifier] out_of_scope: [applying/logging the fix and re-aggregating (respond-ladder's), the fix-didn't-hold re-raise (fix-didnt-hold's), the Notifier concrete channel (alert-contact-config's needs_human_decision), the alert contact's configuration surface (alert-contact-config's)] needs_human_decision: [] ```
Author
Owner

Done — commit c0c847c on main.

What was built (the notify + drill-in stretch, at the monitor seam, ADR 0069):

  • Notifier outbound port (internal/monitor/notify.go) — the slice's one new egress, faked in seam tests (delivered content + severity + channel asserted, nothing sent). A NEW raise delivers to both channels — operator-app and alert-contact (P1-S2); a held alert never re-spams, Resume never re-pages, a resolve-then-re-raise notifies afresh. Concrete channel stays #85's human decision.
  • P5-S2 — a steady service-down notifies with the plain-language diagnosis + member impact and names exactly one safe advised action (restart-<svc>, kind restart-service); choosing it is the P5-S4 Respond hand-off (applying it is respond-ladder's).
  • P5-S2x (DDR 0072, ADR 0015) — a crash-looping service (≥3 raises/hour on the fake-clock window), a provisioning-gate fault (carried, provisioning's retry owns it) and a redundancy gap all deliver diagnosis only, no fabricated action; the only offered paths are drill in / open dashboard.
  • P5-S3 ServiceDetail (internal/monitor/detail.go) — projection over standing alerts + newly recorded health history: runs-on + backup with backups' own last-good, current status (down 4 min), last-24h strip (pre-observation time is unknown, never green over unwatched time), curated newest-first timeline (crash loops coalesced (3×), nightly backup ✓, yesterday: healthy only when observed), and the service/<slug> log handle — Open/Download logs on every surface (ADR 0027).
  • Dashboard: every P5-S1 status item drills in; ServiceDetailScreen built to the wireframe contract (placement, last-24-h, events, open-logs/download-logs); ServicesSurface composes both screens + a notification deep-link prop.
  • App: NotificationScreen renders P5-S2/S2x to the wireframes' element contract (diagnosis, recommended/no-safe-action, the seam's stable data-action id).

Evidence: 7 new Go seam tests (notify_test.go, detail_test.go), 7 dashboard + 4 app Vue tests; full go test ./..., dashboard 300/300, app 122/122, builds + eslint green. STATUS.md updated in the same commit.

Done — commit c0c847c on main. **What was built** (the notify + drill-in stretch, at the `monitor` seam, ADR 0069): - **`Notifier` outbound port** (`internal/monitor/notify.go`) — the slice's one new egress, faked in seam tests (delivered content + severity + channel asserted, nothing sent). A NEW raise delivers to **both** channels — `operator-app` and `alert-contact` (P1-S2); a held alert never re-spams, `Resume` never re-pages, a resolve-then-re-raise notifies afresh. Concrete channel stays #85's human decision. - **P5-S2** — a steady service-down notifies with the plain-language diagnosis + member impact and names **exactly one** safe advised action (`restart-<svc>`, kind `restart-service`); choosing it is the P5-S4 Respond hand-off (applying it is respond-ladder's). - **P5-S2x (DDR 0072, ADR 0015)** — a crash-looping service (≥3 raises/hour on the fake-clock window), a provisioning-gate fault (carried, provisioning's retry owns it) and a redundancy gap all deliver **diagnosis only**, no fabricated action; the only offered paths are drill in / open dashboard. - **P5-S3 `ServiceDetail`** (`internal/monitor/detail.go`) — projection over standing alerts + newly recorded health history: runs-on + backup with backups' own last-good, current status (`down 4 min`), last-24h strip (pre-observation time is `unknown`, never green over unwatched time), curated newest-first timeline (crash loops coalesced `(3×)`, `nightly backup ✓`, `yesterday: healthy` only when observed), and the `service/<slug>` log handle — **Open/Download logs on every surface** (ADR 0027). - **Dashboard**: every P5-S1 status item drills in; `ServiceDetailScreen` built to the wireframe contract (`placement`, `last-24-h`, `events`, `open-logs`/`download-logs`); `ServicesSurface` composes both screens + a notification deep-link prop. - **App**: `NotificationScreen` renders P5-S2/S2x to the wireframes' element contract (`diagnosis`, `recommended`/`no-safe-action`, the seam's stable `data-action` id). **Evidence**: 7 new Go seam tests (`notify_test.go`, `detail_test.go`), 7 dashboard + 4 app Vue tests; full `go test ./...`, dashboard 300/300, app 122/122, builds + eslint green. STATUS.md updated in the same commit.
ben closed this issue 2026-07-25 20:42:24 +00:00
Sign in to join this conversation.
No milestone
No project
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.

Reference
Matou/idss#84
No description provided.