monitoring: silence-classifier — silence judged against a node's own pattern #83

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

Parent

Feature spec: #18 (monitoring).

What to build

The rule that a machine we've stopped hearing from is never shown as healthy
(P5-S1x, DDR 0071). When a device's heartbeats stop, the aggregation loop
classifies the silence rather than ignoring it, judging it against that
node's own pattern read from the heartbeat history the enroll seam already
carries. An always-on node (no intermittent tag, no observed quiet window) gone
dark past its threshold is critical and raises an alert (edge P5-S1x → P5-S2).
An intermittent-tagged node quiet within its known pattern (e.g. asleep
22:00–06:00) is info, raises nothing, and the surface keeps watching (edge
P5-S1x → P5-S1). A device is never shown healthy on the strength of an absent
signal.

This is a rule inside the monitor classifier (ADR 0069/0070) — no new seam,
no new store. The P5-S1x state names which device, how long it has been silent
(last-heartbeat time and duration) and the pattern the silence was judged
against. For a not-yet-patterned intermittent node (newly added) the first
silence leans to a warning rather than to silence — the single agent-judgement
value in the spec, kept by Ben at sign-off; acknowledging it later can tune the
device's expected pattern (fed back by the respond ladder) so a repeated
expected silence stops warning.

Acceptance criteria

  • (story 4) Given a device whose heartbeats have stopped, When the aggregation loop notices, Then P5-S1x classifies the silence rather than ignoring it, and the device is never shown healthy on an absent signal.
  • (story 4) Given a silent device, When P5-S1x is shown, Then it names which device, how long it has been silent (last-heartbeat time and duration), and the pattern the silence was judged against.
  • (story 5) Given an always-on node (no intermittent tag, no observed quiet window) silent past its threshold, When the silence is classified, Then it is critical and an alert is raised (edge P5-S1x → P5-S2).
  • (story 6) Given an intermittent-tagged node silent within its known pattern (e.g. asleep 22:00–06:00), When classified, Then it is info, no alert is raised, and the status surface keeps watching (edge P5-S1x → P5-S1).
  • (story 6) Given an intermittent node with no established pattern yet (newly added), When it first goes silent, Then the silence leans to a warning (never to silence), and acknowledging it can tune the pattern so a repeated expected silence stops warning.

Blocked by

  • #80 — the classifier + heartbeat-history read it extends

Task manifest

task: monitoring:silence-classifier
implements_flow: p5-monitoring
implements_edge: S1→S1x, S1x→S2, S1x→S1
wireframe: docs/ux/wireframes/p5-monitoring/p5-s1x-device-gone-silent.html
interface: monitor classifier — the expected-vs-unexpected-silence rule over heartbeat history + capability tags + a clock; raises an alert on unexpected silence, stays quiet on on-pattern silence
seam: "`monitor` control-plane orchestrator seam tests (Go) \u2014 fake heartbeat source with controllable gaps, fake fleet-state provider (intermittent tag, observed pattern), fake clock (thresholds and \"asleep window\" are time-dependent), fake Notifier"
acceptance:
  - given: a device whose heartbeats have stopped
    when: the loop notices
    then: P5-S1x classifies the silence and the device is never shown healthy on an absent signal, naming the device, silence duration/last-heartbeat, and the pattern judged against
  - given: an always-on node silent past its threshold
    when: the silence is classified
    then: it is critical and an alert is raised (P5-S1x → P5-S2)
  - given: an intermittent node silent within its known pattern
    when: the silence is classified
    then: it is info, no alert is raised, watching continues (P5-S1x → P5-S1)
  - given: an intermittent node with no established pattern yet
    when: it first goes silent
    then: the silence leans to a warning, never to silence, and can be tuned by acknowledge
depends_on: [status-surface-classifier]
out_of_scope: [notify content/channel (notify-and-drill's), acknowledge writing back the pattern (respond-ladder's), the summoning mechanism for a physical-only critical silence (deferred, needs_human_decision in spec)]
needs_human_decision: []
## Parent Feature spec: #18 (monitoring). ## What to build The rule that a machine we've stopped hearing from is never shown as healthy (P5-S1x, DDR 0071). When a device's heartbeats stop, the aggregation loop classifies the *silence* rather than ignoring it, judging it against that node's own pattern read from the heartbeat history the `enroll` seam already carries. An always-on node (no intermittent tag, no observed quiet window) gone dark past its threshold is critical and raises an alert (edge P5-S1x → P5-S2). An intermittent-tagged node quiet within its known pattern (e.g. asleep 22:00–06:00) is info, raises nothing, and the surface keeps watching (edge P5-S1x → P5-S1). A device is never shown healthy on the strength of an absent signal. This is a rule inside the `monitor` classifier (ADR 0069/0070) — no new seam, no new store. The P5-S1x state names which device, how long it has been silent (last-heartbeat time and duration) and the pattern the silence was judged against. For a not-yet-patterned intermittent node (newly added) the first silence leans to a warning rather than to silence — the single agent-judgement value in the spec, kept by Ben at sign-off; acknowledging it later can tune the device's expected pattern (fed back by the respond ladder) so a repeated expected silence stops warning. ## Acceptance criteria - [ ] (story 4) Given a device whose heartbeats have stopped, When the aggregation loop notices, Then P5-S1x classifies the silence rather than ignoring it, and the device is never shown healthy on an absent signal. - [ ] (story 4) Given a silent device, When P5-S1x is shown, Then it names which device, how long it has been silent (last-heartbeat time and duration), and the pattern the silence was judged against. - [ ] (story 5) Given an always-on node (no intermittent tag, no observed quiet window) silent past its threshold, When the silence is classified, Then it is critical and an alert is raised (edge P5-S1x → P5-S2). - [ ] (story 6) Given an intermittent-tagged node silent within its known pattern (e.g. asleep 22:00–06:00), When classified, Then it is info, no alert is raised, and the status surface keeps watching (edge P5-S1x → P5-S1). - [ ] (story 6) Given an intermittent node with no established pattern yet (newly added), When it first goes silent, Then the silence leans to a warning (never to silence), and acknowledging it can tune the pattern so a repeated expected silence stops warning. ## Blocked by - #80 — the classifier + heartbeat-history read it extends ## Task manifest ```yaml task: monitoring:silence-classifier implements_flow: p5-monitoring implements_edge: S1→S1x, S1x→S2, S1x→S1 wireframe: docs/ux/wireframes/p5-monitoring/p5-s1x-device-gone-silent.html interface: monitor classifier — the expected-vs-unexpected-silence rule over heartbeat history + capability tags + a clock; raises an alert on unexpected silence, stays quiet on on-pattern silence seam: "`monitor` control-plane orchestrator seam tests (Go) \u2014 fake heartbeat source with controllable gaps, fake fleet-state provider (intermittent tag, observed pattern), fake clock (thresholds and \"asleep window\" are time-dependent), fake Notifier" acceptance: - given: a device whose heartbeats have stopped when: the loop notices then: P5-S1x classifies the silence and the device is never shown healthy on an absent signal, naming the device, silence duration/last-heartbeat, and the pattern judged against - given: an always-on node silent past its threshold when: the silence is classified then: it is critical and an alert is raised (P5-S1x → P5-S2) - given: an intermittent node silent within its known pattern when: the silence is classified then: it is info, no alert is raised, watching continues (P5-S1x → P5-S1) - given: an intermittent node with no established pattern yet when: it first goes silent then: the silence leans to a warning, never to silence, and can be tuned by acknowledge depends_on: [status-surface-classifier] out_of_scope: [notify content/channel (notify-and-drill's), acknowledge writing back the pattern (respond-ladder's), the summoning mechanism for a physical-only critical silence (deferred, needs_human_decision in spec)] needs_human_decision: [] ```
Author
Owner

Done in 65cda37 (on main). The P5-S1x silence classifier landed as a rule inside the monitor classifier (DDR 0071, ADRs 0069/0070) — no new seam, no new store.

What shipped

  • internal/monitor/silence.go: a device whose heartbeats stop has the silence classified, never ignored — judged against the node's own pattern (intermittent tag + observed quiet windows the fleet-state face carries on fleetstate.Uptime.Quiet + any acknowledge-tuned ExpectedPattern from #87). Always-on dark past StaleAfter → critical, alert raised (P5-S1x → S2), delivered diagnosis-only to both channels (no one-click fix is manufactured for a dark node). Intermittent quiet on its own known window → info, no alert, watching continues (P5-S1x → S1; the all-healthy resting state holds around it). No established pattern yet (or silent outside the known window) → warning, never silence — the learning-window judgement Ben kept — and acknowledging with the tune makes a repeated expected silence stop warning (asserted end-to-end at the seam). A never-reported device has not "stopped": it keeps #80's conservative warning row, no raise, until a heartbeat history exists.
  • StatusView.Silences names which device, how long silent (last-heartbeat time and duration vs the threshold) and the pattern judged against; a silence alert escalates device-scoped with the judgement's own words and a device/<id> log handle.
  • Dashboard: DeviceGoneSilentScreen (P5-S1x) to the wireframe's element contract (silent-device-*, judged-pattern-*, silence-detail-* with last-heartbeat/silence-duration/node-pattern, data-status silent-critical/-info/-warning, notify-*/tune-pattern-* actions), mounted by ServicesSurface above the still-watching S1 whenever a raised silence stands; both actions open the silence alert's device-scoped respond ladder, where acknowledge's tune lives (the tune button rides a raised, tunable silence — the tune write-back needs a standing alert to acknowledge).

Evidence: 6 Go seam tests in internal/monitor/silence_test.go (fake heartbeat gaps, fake fleet-state observed pattern, fake clock, fake Notifier — per the manifest's seam) + 6 Vue tests in dashboard/tests/unit/monitoringSilence.test.ts; full Go suite and dashboard vitest (331/331), vue-tsc and eslint green.

Out of scope honoured: notify content/channel machinery reused from #84 unchanged; the pattern write-back reused from #87 unchanged; the summoning mechanism for a physical-only critical silence untouched (deferred per spec).

Done in 65cda37 (on main). The P5-S1x silence classifier landed as a rule inside the `monitor` classifier (DDR 0071, ADRs 0069/0070) — no new seam, no new store. **What shipped** - `internal/monitor/silence.go`: a device whose heartbeats stop has the silence classified, never ignored — judged against the node's own pattern (intermittent tag + observed quiet windows the fleet-state face carries on `fleetstate.Uptime.Quiet` + any acknowledge-tuned `ExpectedPattern` from #87). Always-on dark past `StaleAfter` → **critical**, alert raised (P5-S1x → S2), delivered diagnosis-only to both channels (no one-click fix is manufactured for a dark node). Intermittent quiet on its own known window → **info**, no alert, watching continues (P5-S1x → S1; the all-healthy resting state holds around it). No established pattern yet (or silent outside the known window) → **warning, never silence** — the learning-window judgement Ben kept — and acknowledging with the tune makes a repeated expected silence stop warning (asserted end-to-end at the seam). A never-reported device has not "stopped": it keeps #80's conservative warning row, no raise, until a heartbeat history exists. - `StatusView.Silences` names which device, how long silent (last-heartbeat time and duration vs the threshold) and the pattern judged against; a silence alert escalates device-scoped with the judgement's own words and a `device/<id>` log handle. - Dashboard: `DeviceGoneSilentScreen` (P5-S1x) to the wireframe's element contract (`silent-device-*`, `judged-pattern-*`, `silence-detail-*` with `last-heartbeat`/`silence-duration`/`node-pattern`, `data-status` silent-critical/-info/-warning, `notify-*`/`tune-pattern-*` actions), mounted by `ServicesSurface` above the still-watching S1 whenever a raised silence stands; both actions open the silence alert's device-scoped respond ladder, where acknowledge's tune lives (the tune button rides a raised, tunable silence — the tune write-back needs a standing alert to acknowledge). **Evidence**: 6 Go seam tests in `internal/monitor/silence_test.go` (fake heartbeat gaps, fake fleet-state observed pattern, fake clock, fake Notifier — per the manifest's seam) + 6 Vue tests in `dashboard/tests/unit/monitoringSilence.test.ts`; full Go suite and dashboard vitest (331/331), vue-tsc and eslint green. **Out of scope honoured**: notify content/channel machinery reused from #84 unchanged; the pattern write-back reused from #87 unchanged; the summoning mechanism for a physical-only critical silence untouched (deferred per spec).
ben closed this issue 2026-07-25 22:07:26 +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#83
No description provided.