monitoring: status-surface-classifier — always-current fleet status, severity by rule #80

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

Parent

Feature spec: #18 (monitoring).

What to build

The foundation of monitoring: the always-current status surface (P5-S1) plus
the monitoring-owned classifier and the standing-alert store it projects from.
The control plane continuously aggregates fleet health over the mesh — reading
the enroll seam's post-enrollment FleetReporting.Report heartbeat for
liveness and re-running the per-service HealthCheck provisioning gates
(ADRs 0061/0062) for correctness — and classifies severity by rule: info
(expected, e.g. an intermittent device asleep), warning (degraded
redundancy), critical (a service down, a backup failing). No anomaly is
required to see the truth: every device and every service shows its state now,
with backups' last-good in the same view, and the resting all-healthy fleet is
a first-class shown state rather than a blank or error page.

The classifier is the monitor control-plane orchestrator (ADR 0069) and the
single test seam; the P5-S1 surface is a query/projection over the standing
alerts, never a separate store (shaped like the enroll seam's RequestView).
Severity is computed by rule from per-service health, node liveness, capability
tags (intermittent) and current coverage/HA gaps (ADR 0070) — never authored by
the operator. Because the loop runs server-side, a closed browser misses
nothing and a gateway restart resumes from persisted alert state and the next
tick.

Notes: this slice reads provisioning's per-service health model and its
active / active-service-failed states — a service that failed provisioning's
gate is a standing fault from go-active. Backups' run failures and staleness
later arrive AS STATE into this same classifier (a backups-side edge), so their
faults are never a silent red row. The Services tab mounts this surface as its
resting content (slice-map ruling 2026-07-25); shell reserves a nav-chrome slot
for the standing raised-alert count (ADR 0068), which this classifier supplies.

Acceptance criteria

  • (story 1) Given a fleet with devices and services, When I open the overview, Then P5-S1 shows each device with its status and each service (Files, Chat, Video, Git) with its state, plus backups' last-good — all current without any anomaly required.
  • (story 1) Given the control plane aggregating over the mesh, When state changes, Then the surface reflects the new state on its own (the aggregation loop is continuous), not only when I act.
  • (story 2) Given the fleet state, When severity is classified, Then each item is info (expected), warning (degraded redundancy), or critical (a service down, a backup failing), by rule and never authored by the operator.
  • (story 2) Given an intermittent device asleep on its own normal pattern, When shown, Then it is classified info with a note that this is expected for the device; given a service down (e.g. chat on rimu), Then it is classified critical.
  • (story 3) Given every device healthy and every service up with backups verified, When I open the overview, Then P5-S1 shows the healthy fleet (all-green, backups ✓ last night) as a first-class state, not a blank or error page.

Blocked by

  • #26 — reads FleetReporting.Report heartbeat
  • #25 — re-runs per-service HealthCheck
  • #29 — Services tab mount + alert-count slot
  • #73 — per-service health + active/failed states

Task manifest

task: monitoring:status-surface-classifier
implements_flow: p5-monitoring
implements_edge: S1 (the always-current surface + its aggregation loop, carried as edge labels)
wireframe: docs/ux/wireframes/p5-monitoring/p5-s1-fleet-and-services-status.html
interface: monitor orchestrator — the continuous aggregate/classify loop over FleetReporting.Report (liveness) + re-run HealthCheck (correctness), projecting the standing-alert set as the P5-S1 status query
seam: "`monitor` control-plane orchestrator seam tests (Go) \u2014 fake heartbeat source, fake per-service HealthCheck, fake fleet-state provider (capability tags, coverage/HA gaps), fake clock"
acceptance:
  - given: a fleet with devices and services
    when: the overview is opened
    then: P5-S1 shows every device's status and every service's state plus backups' last-good, all current with no anomaly required
  - given: the aggregation loop running server-side
    when: fleet state changes
    then: the surface reflects the new state on its own, not only on operator action
  - given: the fleet state
    when: severity is classified by rule
    then: each item is info / warning / critical by rule (intermittent-asleep = info with expected note; service down = critical), never operator-authored
  - given: every device healthy and every service up with backups verified
    when: the overview is opened
    then: P5-S1 shows the all-green healthy fleet as a first-class state, not a blank or error page
depends_on: [bootstrap:enroll-seam, bootstrap:clan-seam, shell:ui-kit-mount-slot-contract, provisioning:provision-active-and-partial]
out_of_scope: [silence-classification (silence-classifier's, DDR 0071), notify/drill/respond (later monitoring slices), historical metrics/trend dashboards, operator-authored alert rules or thresholds, deploy-time health gating (provisioning's, once, at deploy)]
needs_human_decision: []
## Parent Feature spec: #18 (monitoring). ## What to build The foundation of monitoring: the always-current status surface (P5-S1) plus the monitoring-owned classifier and the standing-alert store it projects from. The control plane continuously aggregates fleet health over the mesh — reading the `enroll` seam's post-enrollment `FleetReporting.Report` heartbeat for liveness and re-running the per-service `HealthCheck` provisioning gates (ADRs 0061/0062) for correctness — and classifies severity by rule: **info** (expected, e.g. an intermittent device asleep), **warning** (degraded redundancy), **critical** (a service down, a backup failing). No anomaly is required to see the truth: every device and every service shows its state now, with backups' last-good in the same view, and the resting all-healthy fleet is a first-class shown state rather than a blank or error page. The classifier is the `monitor` control-plane orchestrator (ADR 0069) and the single test seam; the P5-S1 surface is a query/projection over the standing alerts, never a separate store (shaped like the `enroll` seam's `RequestView`). Severity is computed by rule from per-service health, node liveness, capability tags (intermittent) and current coverage/HA gaps (ADR 0070) — never authored by the operator. Because the loop runs server-side, a closed browser misses nothing and a gateway restart resumes from persisted alert state and the next tick. Notes: this slice reads provisioning's per-service health model and its *active / active-service-failed* states — a service that failed provisioning's gate is a standing fault from go-active. Backups' run failures and staleness later arrive AS STATE into this same classifier (a backups-side edge), so their faults are never a silent red row. The Services tab mounts this surface as its resting content (slice-map ruling 2026-07-25); shell reserves a nav-chrome slot for the standing raised-alert count (ADR 0068), which this classifier supplies. ## Acceptance criteria - [ ] (story 1) Given a fleet with devices and services, When I open the overview, Then P5-S1 shows each device with its status and each service (Files, Chat, Video, Git) with its state, plus backups' last-good — all current without any anomaly required. - [ ] (story 1) Given the control plane aggregating over the mesh, When state changes, Then the surface reflects the new state on its own (the aggregation loop is continuous), not only when I act. - [ ] (story 2) Given the fleet state, When severity is classified, Then each item is info (expected), warning (degraded redundancy), or critical (a service down, a backup failing), by rule and never authored by the operator. - [ ] (story 2) Given an intermittent device asleep on its own normal pattern, When shown, Then it is classified info with a note that this is expected for the device; given a service down (e.g. chat on rimu), Then it is classified critical. - [ ] (story 3) Given every device healthy and every service up with backups verified, When I open the overview, Then P5-S1 shows the healthy fleet (all-green, backups ✓ last night) as a first-class state, not a blank or error page. ## Blocked by - #26 — reads FleetReporting.Report heartbeat - #25 — re-runs per-service HealthCheck - #29 — Services tab mount + alert-count slot - #73 — per-service health + active/failed states ## Task manifest ```yaml task: monitoring:status-surface-classifier implements_flow: p5-monitoring implements_edge: S1 (the always-current surface + its aggregation loop, carried as edge labels) wireframe: docs/ux/wireframes/p5-monitoring/p5-s1-fleet-and-services-status.html interface: monitor orchestrator — the continuous aggregate/classify loop over FleetReporting.Report (liveness) + re-run HealthCheck (correctness), projecting the standing-alert set as the P5-S1 status query seam: "`monitor` control-plane orchestrator seam tests (Go) \u2014 fake heartbeat source, fake per-service HealthCheck, fake fleet-state provider (capability tags, coverage/HA gaps), fake clock" acceptance: - given: a fleet with devices and services when: the overview is opened then: P5-S1 shows every device's status and every service's state plus backups' last-good, all current with no anomaly required - given: the aggregation loop running server-side when: fleet state changes then: the surface reflects the new state on its own, not only on operator action - given: the fleet state when: severity is classified by rule then: each item is info / warning / critical by rule (intermittent-asleep = info with expected note; service down = critical), never operator-authored - given: every device healthy and every service up with backups verified when: the overview is opened then: P5-S1 shows the all-green healthy fleet as a first-class state, not a blank or error page depends_on: [bootstrap:enroll-seam, bootstrap:clan-seam, shell:ui-kit-mount-slot-contract, provisioning:provision-active-and-partial] out_of_scope: [silence-classification (silence-classifier's, DDR 0071), notify/drill/respond (later monitoring slices), historical metrics/trend dashboards, operator-authored alert rules or thresholds, deploy-time health gating (provisioning's, once, at deploy)] needs_human_decision: [] ```
Author
Owner

Done — commit 1e0056c on main.

The monitor control-plane orchestrator is born (ADR 0069, internal/monitor/): the continuous aggregate/classify loop over the two confirmed signals (ADR 0070) — the enroll seam's FleetReporting.Report heartbeat for liveness (a Heartbeats read over stored latest reports, arrival-stamped by the control plane's clock) and the per-service HealthCheck re-run for correctness (ADRs 0061/0062). Provisioning's per-service health model rides in through its Handoffs face: a gate-failed service is a standing critical fault from go-active, carried never re-judged, clearing only when provisioning's record clears — monitoring cannot disagree with the coverage-denying Healthy bit.

Severity is by rule, never operator-authored: info (intermittent asleep = expected, said on the row), warning (degraded redundancy from the shared fleet-state coverage/HA gaps, raised and resolved as the fleet moves; also the conservative lean for a not-yet-classified silence — DDR 0071, own-pattern judgment and the S1x raise are #83's), critical (a service down, with the port's plain-language summary and the "4 min — see alert" note). P5-S1 is a query/projection over the standing alerts, never a separate store; StandingAlerts/Resume + the next tick is the gateway-restart path; Run is the server-side cadence a closed browser misses nothing of. Backups' last-good shows in the same view, and the all-green fleet is a first-class shown state with its own headline.

Dashboard: ServicesSurface (self-refreshing) + FleetServicesStatusScreen mounted as the Services tab's resting content (DN → P5-S1, ADR 0094) to the wireframe's element contract; MonitoringAlertSource supplies shell's raised-alert chrome slot.

Evidence: 8 Go seam tests (internal/monitor/monitor_test.go — fake heartbeat source fed through the real FleetReporting face, scriptable per-service checks, fleetstate.Fake with capability tags + gaps, fake clock) and 8 Vue tests (dashboard/tests/unit/monitoringStatus.test.ts); full Go build/vet/test and full dashboard vitest + vue-tsc + eslint green. All five acceptance criteria exercised at the seam and in the component tests.

Done — commit 1e0056c on main. The `monitor` control-plane orchestrator is born (ADR 0069, `internal/monitor/`): the continuous aggregate/classify loop over the two confirmed signals (ADR 0070) — the `enroll` seam's `FleetReporting.Report` heartbeat for liveness (a `Heartbeats` read over stored latest reports, arrival-stamped by the control plane's clock) and the per-service `HealthCheck` re-run for correctness (ADRs 0061/0062). Provisioning's per-service health model rides in through its `Handoffs` face: a gate-failed service is a standing critical fault from go-active, carried never re-judged, clearing only when provisioning's record clears — monitoring cannot disagree with the coverage-denying `Healthy` bit. Severity is by rule, never operator-authored: **info** (intermittent asleep = expected, said on the row), **warning** (degraded redundancy from the shared fleet-state coverage/HA gaps, raised and resolved as the fleet moves; also the conservative lean for a not-yet-classified silence — DDR 0071, own-pattern judgment and the S1x raise are #83's), **critical** (a service down, with the port's plain-language summary and the "4 min — see alert" note). P5-S1 is a query/projection over the standing alerts, never a separate store; `StandingAlerts`/`Resume` + the next tick is the gateway-restart path; `Run` is the server-side cadence a closed browser misses nothing of. Backups' last-good shows in the same view, and the all-green fleet is a first-class shown state with its own headline. Dashboard: `ServicesSurface` (self-refreshing) + `FleetServicesStatusScreen` mounted as the Services tab's resting content (DN → P5-S1, ADR 0094) to the wireframe's element contract; `MonitoringAlertSource` supplies shell's raised-alert chrome slot. Evidence: 8 Go seam tests (`internal/monitor/monitor_test.go` — fake heartbeat source fed through the real `FleetReporting` face, scriptable per-service checks, `fleetstate.Fake` with capability tags + gaps, fake clock) and 8 Vue tests (`dashboard/tests/unit/monitoringStatus.test.ts`); full Go build/vet/test and full dashboard vitest + vue-tsc + eslint green. All five acceptance criteria exercised at the seam and in the component tests.
ben closed this issue 2026-07-25 20:18:44 +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#80
No description provided.