monitoring: tune-expected-pattern — alert-free pattern tune from S1x (#83 ruling) #144

Closed
opened 2026-07-26 23:02:03 +00:00 by ben · 1 comment
Owner

Parent

Feature spec: #18 (monitoring). Filed by the 2026-07-26 wireframe-vs-built rulings (origin ticket #83). Ruling: add the flow verb and build it — the flow now carries S1x → S1 "tunes an intermittent device's expected pattern in place" (amended 2026-07-26, docs/ux/flows/p5-monitoring.mermaid).

The p5-s1x wireframe offers "Tune kauri's expected pattern" on the expected-silence device — which by design raises no alert. The seam's only tune verb is acknowledge(alertId, tune) (DDR 0071), so the built button routes through openAlert with s.alertId! — a non-null assertion on an alert that doesn't exist for expected silence. The affordance is currently design-orphaned.

What to build

An alert-free tune verb on the monitoring seam: Go side (internal/monitor) accepts a pattern tune for a device with no raised alert; the classifier re-judges the device's silence against the new pattern (DDR 0071). Dashboard client gains the matching verb; DeviceGoneSilentScreen.vue's tune-pattern for expected-silence rows uses it (no alertId! assertion). The S4-acknowledge tune path for raised alerts is unchanged.

Acceptance criteria

  • Given an intermittent device in expected silence (no alert), when the operator tunes its expected pattern from S1x, then the tune applies through the seam and the classifier re-judges against the new pattern.
  • Given the re-judged pattern no longer covers the silence, then the device classifies as unexpected silence per the existing rules (never silent green).
  • The acknowledge-with-tune path on a raised alert (S4) is unchanged.
  • No non-null assertion on alertId remains in the tune path.

Blocked by

None.

Task manifest

task: monitoring:tune-expected-pattern
implements_flow: p5-monitoring
implements_edge: "S1x→S1 tune expected pattern in place (edge added by the 2026-07-26 ruling)"
wireframe: docs/ux/wireframes/p5-monitoring/p5-s1x-device-gone-silent.html
interface: "an alert-free tune verb on the monitor seam + dashboard client; DeviceGoneSilentScreen wiring"
seam: "Go seam test: tune without alert re-judges classification; component test: tune-pattern on an expected-silence row needs no alert"
acceptance: "#83's tune affordance becomes reachable for the device the wireframe draws it on"
depends_on: []
out_of_scope: [alert lifecycle changes, S4 acknowledge behaviour (built)]
needs_human_decision: []
## Parent Feature spec: #18 (monitoring). Filed by the 2026-07-26 wireframe-vs-built rulings (origin ticket #83). Ruling: **add the flow verb and build it** — the flow now carries `S1x → S1 "tunes an intermittent device's expected pattern in place"` (amended 2026-07-26, `docs/ux/flows/p5-monitoring.mermaid`). The p5-s1x wireframe offers "Tune kauri's expected pattern" on the **expected-silence** device — which by design raises no alert. The seam's only tune verb is `acknowledge(alertId, tune)` (DDR 0071), so the built button routes through `openAlert` with `s.alertId!` — a non-null assertion on an alert that doesn't exist for expected silence. The affordance is currently design-orphaned. ## What to build An alert-free tune verb on the monitoring seam: Go side (`internal/monitor`) accepts a pattern tune for a device with no raised alert; the classifier re-judges the device's silence against the new pattern (DDR 0071). Dashboard client gains the matching verb; `DeviceGoneSilentScreen.vue`'s tune-pattern for expected-silence rows uses it (no `alertId!` assertion). The S4-acknowledge tune path for raised alerts is unchanged. ## Acceptance criteria - [ ] Given an intermittent device in expected silence (no alert), when the operator tunes its expected pattern from S1x, then the tune applies through the seam and the classifier re-judges against the new pattern. - [ ] Given the re-judged pattern no longer covers the silence, then the device classifies as unexpected silence per the existing rules (never silent green). - [ ] The acknowledge-with-tune path on a raised alert (S4) is unchanged. - [ ] No non-null assertion on `alertId` remains in the tune path. ## Blocked by None. ## Task manifest ```yaml task: monitoring:tune-expected-pattern implements_flow: p5-monitoring implements_edge: "S1x→S1 tune expected pattern in place (edge added by the 2026-07-26 ruling)" wireframe: docs/ux/wireframes/p5-monitoring/p5-s1x-device-gone-silent.html interface: "an alert-free tune verb on the monitor seam + dashboard client; DeviceGoneSilentScreen wiring" seam: "Go seam test: tune without alert re-judges classification; component test: tune-pattern on an expected-silence row needs no alert" acceptance: "#83's tune affordance becomes reachable for the device the wireframe draws it on" depends_on: [] out_of_scope: [alert lifecycle changes, S4 acknowledge behaviour (built)] needs_human_decision: [] ```
Author
Owner

Done in da8615b (pushed to main).

Added an alert-free tune verb Orchestrator.TunePattern(deviceID, tune) on the monitor seam (internal/monitor/respond.go): same DDR 0071 write-back as acknowledge but with no alert involved, refusing an unknown device with ErrUnknownDevice. The silence classifier re-judges the device against the new pattern on the next read — a tune whose window does not cover the silence stays classified unexpected, never a silent green (SilenceView.CanTune now set on the intermittent expected-silence/info branch).

DeviceGoneSilentScreen.vue renders the in-place tune (a quiet-window editor → tune-confirm-<device>) for expected-silence rows keyed by device, never alertId — the s.alertId! assertion is gone from the tune path. A raised silence keeps see-the-alert → the unchanged S4 acknowledge-with-tune path. MonitoringClient gains tunePattern(deviceId, tune); ServicesSurface wires it (no respond ladder for the alert-free tune).

Acceptance:

  • ✅ AC1 tune from S1x applies through the seam & re-judges — seam test TestSilence_TuneExpectedPattern_AlertFree + surface test.
  • ✅ AC2 a non-covering re-judged pattern classifies unexpected (never silent green) — nikau case in the seam test.
  • ✅ AC3 S4 acknowledge-with-tune path unchanged (Acknowledge untouched; still reachable behind see-the-alert).
  • ✅ AC4 no non-null alertId assertion left in the tune path.

Evidence: 439-test dashboard suite + vue-tsc + eslint green locally. Go suites run under nix develop on CI (Go toolchain absent in the swarm sandbox), so the new seam test is verified by CI.

Done in `da8615b` (pushed to `main`). Added an **alert-free** tune verb `Orchestrator.TunePattern(deviceID, tune)` on the `monitor` seam (`internal/monitor/respond.go`): same DDR 0071 write-back as acknowledge but with **no alert involved**, refusing an unknown device with `ErrUnknownDevice`. The silence classifier re-judges the device against the new pattern on the next read — a tune whose window does not cover the silence stays classified *unexpected*, never a silent green (`SilenceView.CanTune` now set on the intermittent expected-silence/info branch). `DeviceGoneSilentScreen.vue` renders the in-place tune (a quiet-window editor → `tune-confirm-<device>`) for **expected-silence rows keyed by device, never `alertId`** — the `s.alertId!` assertion is gone from the tune path. A raised silence keeps see-the-alert → the **unchanged** S4 acknowledge-with-tune path. `MonitoringClient` gains `tunePattern(deviceId, tune)`; `ServicesSurface` wires it (no respond ladder for the alert-free tune). **Acceptance:** - ✅ AC1 tune from S1x applies through the seam & re-judges — seam test `TestSilence_TuneExpectedPattern_AlertFree` + surface test. - ✅ AC2 a non-covering re-judged pattern classifies unexpected (never silent green) — `nikau` case in the seam test. - ✅ AC3 S4 acknowledge-with-tune path unchanged (`Acknowledge` untouched; still reachable behind see-the-alert). - ✅ AC4 no non-null `alertId` assertion left in the tune path. **Evidence:** 439-test dashboard suite + `vue-tsc` + `eslint` green locally. Go suites run under `nix develop` on CI (Go toolchain absent in the swarm sandbox), so the new seam test is verified by CI.
ben closed this issue 2026-07-27 08:27:42 +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.

Dependencies

No dependencies set.

Reference
Matou/idss#144
No description provided.