monitoring: alert-contact-config — the community alert contact, set in monitoring #85

Closed
opened 2026-07-25 04:59:08 +00:00 by ben · 3 comments
Owner

Parent

Feature spec: #18 (monitoring).

What to build

The community alert contact (email/phone) that receives alerts alongside the
operator app, so the operator hears about outages even when not in the app.
Founding (P1-S2) captures the initial contact; when an alert is raised it is
delivered to that contact as well as the operator app. The operator can change
the contact, and it is configured in monitoring — not in Settings
(ticket #9). v1 supports exactly one community-level contact.

This is the config surface backing the S1→S2 / S1x→S2 delivery: it is where the
Notifier port's target is set and read. Founding seeds the initial contact as
runtime data, not a build edge (slice-map ruling 2026-07-25), so this slice
depends only on the classifier foundation, not on founding.

Notes: no dedicated alert-contact-config wireframe exists — the config rides
P5-S2's notify surface. If a standalone config screen is wanted, triage flags
needs-design. The Notifier's concrete delivery channel is an open human
decision (see needs_human_decision): v1 ships one concrete channel — email via
the community mail service, or SMS via an external provider — and the port is
faked in seam tests until that is wired.

Acceptance criteria

  • (story 17) Given founding captured an alert contact (P1-S2), When an alert is raised, Then it is delivered to that contact as well as the operator app.
  • (story 17) Given I want to change the alert contact, When I configure it, Then it is set in monitoring (not in Settings — ticket #9); v1 supports one community-level contact.

Blocked by

  • #80 — the classifier + Notifier delivery it configures

Task manifest

task: monitoring:alert-contact-config
implements_flow: p5-monitoring
implements_edge: (config surface backing the S1→S2 / S1x→S2 delivery)
wireframe: docs/ux/wireframes/p5-monitoring/p5-s2-notify.html (no standalone config screen — the config rides P5-S2; triage flags needs-design if a standalone screen is wanted)
interface: monitor orchestrator — read/set the single community alert contact that the Notifier port delivers to alongside the operator app
seam: "`monitor` control-plane orchestrator seam tests (Go) \u2014 fake Notifier (assert delivery reaches the configured contact and the operator app), single-contact config read/write"
acceptance:
  - given: founding captured an alert contact (P1-S2)
    when: an alert is raised
    then: it is delivered to that contact as well as the operator app
  - given: the operator wants to change the alert contact
    when: they configure it
    then: it is set in monitoring (not in Settings, ticket #9); v1 supports one community-level contact
depends_on: [status-surface-classifier]
out_of_scope: [notify content and the diagnosis/advised-action (notify-and-drill's), founding's initial capture of the contact (founding's, seeded as runtime data not a build edge), multiple/per-service contacts (v1 = one community-level contact)]
needs_human_decision:
  - Notifier delivery channel — email vs SMS for the community alert contact (v1 ships one concrete channel)
## Parent Feature spec: #18 (monitoring). ## What to build The community alert contact (email/phone) that receives alerts alongside the operator app, so the operator hears about outages even when not in the app. Founding (P1-S2) captures the initial contact; when an alert is raised it is delivered to that contact as well as the operator app. The operator can change the contact, and it is configured **in monitoring** — not in Settings (ticket #9). v1 supports exactly one community-level contact. This is the config surface backing the S1→S2 / S1x→S2 delivery: it is where the `Notifier` port's target is set and read. Founding seeds the initial contact as runtime data, not a build edge (slice-map ruling 2026-07-25), so this slice depends only on the classifier foundation, not on founding. Notes: no dedicated `alert-contact-config` wireframe exists — the config rides P5-S2's notify surface. If a standalone config screen is wanted, triage flags `needs-design`. The `Notifier`'s concrete delivery channel is an open human decision (see needs_human_decision): v1 ships one concrete channel — email via the community mail service, or SMS via an external provider — and the port is faked in seam tests until that is wired. ## Acceptance criteria - [ ] (story 17) Given founding captured an alert contact (P1-S2), When an alert is raised, Then it is delivered to that contact as well as the operator app. - [ ] (story 17) Given I want to change the alert contact, When I configure it, Then it is set in monitoring (not in Settings — ticket #9); v1 supports one community-level contact. ## Blocked by - #80 — the classifier + Notifier delivery it configures ## Task manifest ```yaml task: monitoring:alert-contact-config implements_flow: p5-monitoring implements_edge: (config surface backing the S1→S2 / S1x→S2 delivery) wireframe: docs/ux/wireframes/p5-monitoring/p5-s2-notify.html (no standalone config screen — the config rides P5-S2; triage flags needs-design if a standalone screen is wanted) interface: monitor orchestrator — read/set the single community alert contact that the Notifier port delivers to alongside the operator app seam: "`monitor` control-plane orchestrator seam tests (Go) \u2014 fake Notifier (assert delivery reaches the configured contact and the operator app), single-contact config read/write" acceptance: - given: founding captured an alert contact (P1-S2) when: an alert is raised then: it is delivered to that contact as well as the operator app - given: the operator wants to change the alert contact when: they configure it then: it is set in monitoring (not in Settings, ticket #9); v1 supports one community-level contact depends_on: [status-surface-classifier] out_of_scope: [notify content and the diagnosis/advised-action (notify-and-drill's), founding's initial capture of the contact (founding's, seeded as runtime data not a build edge), multiple/per-service contacts (v1 = one community-level contact)] needs_human_decision: - Notifier delivery channel — email vs SMS for the community alert contact (v1 ships one concrete channel) ```
Author
Owner

This was generated by AI during triage.

Triage: routed ready-for-human

Judgement call, not a spec gap: the ticket body names its own open decision — "The Notifier's concrete delivery channel is an open human decision... v1 ships one concrete channel — email via the community mail service, or SMS via an external provider." The config surface, the S1→S2/S1x→S2 delivery behavior, and the one-community-contact scope are all fully specified.

What needs deciding: email vs. SMS as the v1 Notifier delivery channel. This picks a real external dependency (a mail service vs. an SMS provider account) with cost and reliability trade-offs a low-time volunteer operator will live with — not something to infer from the spec.

Secondary, non-blocking note: the manifest also flags that no standalone alert-contact-config wireframe exists — the config currently rides P5-S2's notify surface. That's a design judgement (is a dedicated config screen wanted, or does riding P5-S2 stay the answer?) bundled into the same human review rather than raised as a separate needs-design, since it's secondary to the channel choice.

> *This was generated by AI during triage.* ## Triage: routed `ready-for-human` **Judgement call, not a spec gap:** the ticket body names its own open decision — *"The `Notifier`'s concrete delivery channel is an open human decision... v1 ships one concrete channel — email via the community mail service, or SMS via an external provider."* The config surface, the S1→S2/S1x→S2 delivery behavior, and the one-community-contact scope are all fully specified. **What needs deciding:** **email vs. SMS** as the v1 `Notifier` delivery channel. This picks a real external dependency (a mail service vs. an SMS provider account) with cost and reliability trade-offs a low-time volunteer operator will live with — not something to infer from the spec. **Secondary, non-blocking note:** the manifest also flags that no standalone `alert-contact-config` wireframe exists — the config currently rides P5-S2's notify surface. That's a design judgement (is a dedicated config screen wanted, or does riding P5-S2 stay the answer?) bundled into the same human review rather than raised as a separate `needs-design`, since it's secondary to the channel choice.
Author
Owner

Human decision: Notifier channel + config surface (resolves needs_human_decision)

Ruled by Ben, 2026-07-25. The ticket moves to ready-for-agent.

1. Notifier delivery channel — email, sent from Matou infrastructure (notify@mail.matou.nz), for now

The v1 Notifier delivers alerts to the community alert contact by email, sent from Matou-operated mail as notify@mail.matou.nz — not via the community's own self-hosted mail service. This keeps the alert channel independent of the fleet being monitored (an outage of community services can't take the alert path down with it) and avoids self-hosted deliverability problems, without adding a paid SMS provider.

"For now" is deliberate: this is a v1 interim choice. The Notifier port stays channel-agnostic — the concrete email sender is one implementation behind it, and SMS or other channels can replace/join it later without touching the config surface built here. Seam tests keep faking the port as specified.

2. Config surface — rides P5-S2, no standalone screen

The alert-contact config stays on the P5-S2 notify surface (docs/ux/wireframes/p5-monitoring/p5-s2-notify.html) as the manifest describes. No needs-design; the ticket is buildable against the existing wireframe.

## Human decision: Notifier channel + config surface (resolves `needs_human_decision`) Ruled by Ben, 2026-07-25. The ticket moves to `ready-for-agent`. ### 1. Notifier delivery channel — **email, sent from Matou infrastructure (`notify@mail.matou.nz`), for now** The v1 `Notifier` delivers alerts to the community alert contact by **email**, sent **from Matou-operated mail** as `notify@mail.matou.nz` — *not* via the community's own self-hosted mail service. This keeps the alert channel independent of the fleet being monitored (an outage of community services can't take the alert path down with it) and avoids self-hosted deliverability problems, without adding a paid SMS provider. "For now" is deliberate: this is a v1 interim choice. The `Notifier` port stays channel-agnostic — the concrete email sender is one implementation behind it, and SMS or other channels can replace/join it later without touching the config surface built here. Seam tests keep faking the port as specified. ### 2. Config surface — **rides P5-S2, no standalone screen** The alert-contact config stays on the P5-S2 notify surface (`docs/ux/wireframes/p5-monitoring/p5-s2-notify.html`) as the manifest describes. No `needs-design`; the ticket is buildable against the existing wireframe.
Author
Owner

Shipped in 6ce32b6 (on origin/main).

The community alert contact, set in monitoring. The config surface backing the S1→S2 / S1x→S2 delivery: the single community-level alert contact (email/phone) the Notifier port delivers to alongside the operator app.

Seam (internal/monitor/, ADR 0069): new Contact{Name,Email,Phone} with AlertContact() (Contact, bool) / SetAlertContact(Contact) error on the monitor orchestrator — v1 holds exactly one contact (a set replaces, never appends), and a contact with neither email nor phone is refused (ErrNoContactAddress). The alert-contact delivery is stamped with who it reaches (Notification.Contact); the operator-app channel addresses itself (nil), and both channels still deliver best-effort even when unconfigured. Founding's initial capture (P1-S2) is seeded as runtime data, not a build edge (slice-map 2026-07-25) — no founding import; depends only on #80.

UI: the config rides the resting P5-S1 monitoring surface (AlertContactCard.vue, mounted in ServicesSurface.vue) — set IN MONITORING, not in Settings (ticket #9). No standalone config screen; triage flags needs-design if one is wanted. Thin UI over the seam via alertContact()/setAlertContact() on MonitoringClient.

Acceptance: story-17 clause 1 (raise reaches the configured contact + operator app) — contact_test.go::TestAlertContact_DeliveryReachesConfiguredContactAndApp; story-17 clause 2 (set in monitoring, one contact) — TestAlertContact_ReadSetSingleContact + the component tests in dashboard/tests/unit/monitoringAlertContact.test.ts.

needs_human_decision — DEFERRED, not resolved: the concrete delivery channel (email via the community mail service vs SMS via an external provider) stays open. The Contact holds both email and phone; the Notifier port is faked at the seam until a concrete adapter is wired, so building the config surface did not require the choice (mirrors #98's Tier-2 channel). The decision re-surfaces when a real Notifier is implemented.

Evidence: 3 seam tests + 6 component tests; full Go suite + dashboard (395) green; gofmt/vet/eslint/vue-tsc clean.

Shipped in `6ce32b6` (on `origin/main`). **The community alert contact, set in monitoring.** The config surface backing the S1→S2 / S1x→S2 delivery: the single community-level alert contact (email/phone) the `Notifier` port delivers to alongside the operator app. **Seam** (`internal/monitor/`, ADR 0069): new `Contact{Name,Email,Phone}` with `AlertContact() (Contact, bool)` / `SetAlertContact(Contact) error` on the `monitor` orchestrator — v1 holds exactly one contact (a set **replaces, never appends**), and a contact with neither email nor phone is refused (`ErrNoContactAddress`). The alert-contact delivery is stamped with who it reaches (`Notification.Contact`); the operator-app channel addresses itself (nil), and both channels still deliver best-effort even when unconfigured. Founding's initial capture (P1-S2) is seeded as runtime data, not a build edge (slice-map 2026-07-25) — no founding import; depends only on #80. **UI**: the config rides the resting P5-S1 monitoring surface (`AlertContactCard.vue`, mounted in `ServicesSurface.vue`) — set IN MONITORING, not in Settings (ticket #9). No standalone config screen; triage flags `needs-design` if one is wanted. Thin UI over the seam via `alertContact()`/`setAlertContact()` on `MonitoringClient`. **Acceptance**: story-17 clause 1 (raise reaches the configured contact + operator app) — `contact_test.go::TestAlertContact_DeliveryReachesConfiguredContactAndApp`; story-17 clause 2 (set in monitoring, one contact) — `TestAlertContact_ReadSetSingleContact` + the component tests in `dashboard/tests/unit/monitoringAlertContact.test.ts`. **needs_human_decision — DEFERRED, not resolved**: the concrete delivery channel (email via the community mail service vs SMS via an external provider) stays open. The `Contact` holds both email and phone; the `Notifier` port is faked at the seam until a concrete adapter is wired, so building the config surface did not require the choice (mirrors #98's Tier-2 channel). The decision re-surfaces when a real Notifier is implemented. Evidence: 3 seam tests + 6 component tests; full Go suite + dashboard (395) green; gofmt/vet/eslint/vue-tsc clean.
ben closed this issue 2026-07-26 03:14:17 +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#85
No description provided.