monitoring: dashboard alert-contact editor (retire notYetServed(setAlertContact)) #387
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#387
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up filed on closing #369 (ADR 0153 §4).
#369 made founding the FIRST production caller of
SetAlertContact(seeded from the S2 operator contact at boot,control-plane/cmd/control-plane/whole_composition.go). The operator still cannot CHANGE it from the dashboard:dashboard/src/lib/api/monitoringClient.ts:117returnsnotYetServed('setAlertContact').Scope: wire the dashboard
setAlertContacteditor to a real control-plane API overOrchestrator.SetAlertContact(P5 monitoring, not Settings — ticket #9), so the operator can edit the contact founding seeded.SetAlertContactalready replaces (v1 holds one contact) and clears the stale delivery-failure mark (#288).Triage
Category: enhancement · State: ready-for-agent
Redundancy check: searched
internal/controlapifor an alert-contact route (none exists — onlyGET /api/v1/monitor/alert-count), and the dashboard'sHttpMonitoringClientfor a realalertContact()/setAlertContact()(both are stubs: the read always resolvesnull, the write rejects vianotYetServed). Not already implemented.Prior rejection check: no
.out-of-scope/entries exist in this repo yet.Design contract: present —
docs/ux/flows/p5-monitoring.mermaidanddocs/ux/wireframes/p5-monitoring/p5-s2-notify.htmlcover the alert-contact surface; noneeds-designgate applies.Verification: confirmed by reading the code, not by reproducing a runtime bug (this is an enhancement, not a bug report). The orchestrator already has both halves of the domain logic — a
Contact-returning read and a validating write — fully implemented and documented; only the transport (HTTP route + generated client + dashboard client method) is missing. The dashboard already has a consuming UI component that calls both the read and the write method on the client interface — so both directions need wiring, not just the write path the issue body names, or the component will load with a client that always reports "no contact configured" even after a successful save.Agent Brief
Category: enhancement
Summary: Wire the dashboard's alert-contact editor to the control plane's real alert-contact read/write, retiring both monitoring-client stubs.
Current behavior:
The monitoring orchestrator holds the single community-level alert contact and already exposes a read accessor (returns the contact plus whether one is configured) and a write mutator (validates the contact is reachable, replaces the standing contact, and clears any stale delivery-failure mark). Neither is reachable from the dashboard: the control-plane HTTP API has no alert-contact route (only a raised-alert count route exists), and the dashboard's live monitoring client's read method always resolves to "no contact configured" while its write method rejects outright. The dashboard already ships a card component that calls both the read and the write client methods, so today it always renders as unconfigured and cannot save.
Desired behavior:
The dashboard's alert-contact card reads the real, currently-configured community alert contact on load (or "none configured" when genuinely none is set — that's still a truthful state, not necessarily an error), and saving a new contact from the card persists it through the control plane to the orchestrator, following the same transport pattern already established for the read-only status and alert-count surfaces (spec-first: the OpenAPI spec is the contract, the generated client is the transport, the monitoring client maps wire snake_case to the view's camelCase). A write with neither email nor phone is refused with a clear error surfaced to the operator, and the standing contact is left unchanged. A successful write clears any stale delivery-failure mark on the card.
Key interfaces:
Contacttype (or null when unconfigured) instead of always resolving null; its write method should call through instead of rejecting.Acceptance criteria:
Out of scope:
serviceDetail,respond,apply,acknowledge,tunePattern,escalate) — separate migration tickets.Landed in
699d733onorigin/main.The dashboard alert-contact editor is now wired to the control plane over HTTP; both monitoring-client stubs retire.
What shipped
GET/POST /monitor/alert-contact(getMonitorAlertContact/postMonitorAlertContact), newAlertContactView+Contactschemas andAlertContactrequestBody; generated client regenerated (check:clientin sync).internal/controlapi/monitor_contact.go:MonitorContactService+WithMonitorContactoption served over the real*monitor.Orchestrator. The read projects the configured contact or{configured:false}(truthful empty); the write replaces (v1 holds one) and mapsmonitor.ErrNoContactAddressto a 400 Problem with the standing contact left intact. A successful change clears the #288 delivery-failure mark (orchestrator-side, already inSetAlertContact).main.go:controlapi.WithMonitorContact(c.mon)wired into the composition root.dashboard/src/lib/api/monitoringClient.ts:alertContact()maps the wire view toContact | nullthroughcamelize(snake_case-wire / camelCase-view convention);setAlertContact(contact)POSTs through. The already-shippedAlertContactCardnow reads/writes live.Acceptance evidence
TestHandler_AlertContactReadsAndWritesOverHTTP(real orchestrator over HTTP): resting readsconfigured:false; a set is reflected on reload; an unreachable contact is refused 400 and the standing contact is unchanged.dashboard/tests/unit/monitoringAlertContactTransport.test.ts(injected fetch, no fake in path): read mapping, none→null, the POST body, and 400→throw.monitoringAlertContact.test.ts(6 tests).Verify: Go build/vet/test + golangci-lint (nix
.#go-ci) green; dashboard tsc build + 1003 vitest green;STATUS.mdupdated (header + milestone log).