observability: monitor-recent-events — monitoring's RecentEvents(window) — alert transitions and curated service events #825

Closed
opened 2026-08-25 10:59:43 +00:00 by matou-build-agent · 3 comments

Parent

Feature spec: #796 — control-panel observability child spec: activity feed (P12) (DDR 0206).
Design ticket #763; slice-map fan-in #770; wayfinder map #7.
Slice monitor-recent-events of docs/slices/observability.yaml; covers spec #796 stories 54–61 (monitoring face).

What to build

Monitoring's additive RecentEvents(window) face, derived at read time from the standing-alert
store and the recorded health history it already keeps: standing-alert raise / resolve /
acknowledge / escalate
transitions, plus the curated service events (crashed, recovered,
unexpected silence and return).

A raised alert is not an event. It is a standing condition, and it rides the read as a
separate field from monitoring's existing RaisedAlerts query — never merged into the rows.
The alert's transitions are events and stay in the chronology forever; the standing condition is
the band's, not the list's.

Monitoring-derived rows are the only rows wearing monitoring's info/warning/critical severity —
no other source's row is graded on a severity scale. Nothing confirmed moves, no signature changes,
no new table, file, stream or collector is created.

Note the horizon this owner genuinely has: monitoring's recorded health history is a 24h window by
construction (monitor.DetailWindow), and the surface states that rather than implying depth it
does not have.

Acceptance criteria

  • (story 56) Given monitoring's records, when RecentEvents(window) is called, then it derives events from the standing-alert store's transitions and its curated service-events projection (ADR 0069) — and no new table, file, stream or collector is created.
  • (story 56) Given the window bound, then only events inside it are returned.
  • (story 8) Given each derived event, then it carries monitoring's own words verbatim and its own outcome token — no sentence is composed and no outcome re-derived.
  • (story 9) Given monitoring-derived rows, then they are the only rows carrying monitoring's info/warning/critical severity.
  • (story 36) Given an alert that raised and later resolved, then both transitions are returned as ordinary events with monitoring's own words and severity.
  • (story 60) Given the standing raised alerts, then they are not merged into the events — they ride monitoring's existing RaisedAlerts query, projected not re-classified, with monitoring's own drill-in intent.
  • (story 45/48) Given a fleet in which members signed in, were invited, approved, suspended and removed with reasons, then this face emits zero events whose subject is a person.
  • (story 31) Given each event, then it carries monitoring's own drill-in intent (the service's detail) — this face maps no owner.

Blocked by

  • #824 — observability:activity-ops-event-contract
  • monitoring:notify-and-drill (#84 — done, satisfied)
  • monitoring:respond-ladder (#87 — done, satisfied)

Task manifest

task: observability:monitor-recent-events
interface: monitoring gains an additive `RecentEvents(window)` face returning typed ops events for standing-alert
  raise / resolve / acknowledge / escalate transitions and its curated service events, derived at read
  time from the alert store and the recorded health history it already keeps; standing raised alerts stay
  a separate query
seam: 'monitoring''s own package tests (prior art `monitor_test.go`, `detail_test.go`): the transitions
  and curated events derived for a window; the window bound honoured; monitoring''s own words carried
  verbatim; the standing-alert query unmodified and unmerged; no person-subject event emitted'
acceptance:
- given: an alert that raised at 21:02 and resolved at 21:14 inside the window
  when: '`RecentEvents(window)` is called'
  then: both transitions return as events with monitoring's own words and severity
- given: a service that crashed and recovered
  when: '`RecentEvents(window)` is called'
  then: the curated service events return carrying monitoring's own wording verbatim
- given: events outside the requested window
  when: '`RecentEvents(window)` is called'
  then: they are not returned
- given: a raised alert standing now
  when: '`RecentEvents(window)` is called'
  then: it is not merged into the rows — the standing query stays separate
- given: a fleet with sign-ins, invites, approvals, suspensions and removals
  when: '`RecentEvents(window)` is called'
  then: zero person-subject events are emitted
depends_on:
- activity-ops-event-contract
- monitoring:notify-and-drill
- monitoring:respond-ladder
out_of_scope:
- the read-composition and its route (`transport-activity-read`)
- any new table, file, stream or collector
- durable history / feed-side retention — the horizon is monitoring's own 24h `DetailWindow`
- notifying from the feed — notifying is monitoring's existing job (P5-S2, ADR 0106)
needs_human_decision: []

Emitted by /to-tickets over docs/slices/observability.yaml in an unattended session under ADR 0174 (two-way-door posture — Ben's veto is asynchronous, never blocking). Advances #797.

## Parent Feature spec: **#796** — control-panel observability child spec: activity feed (P12) (DDR 0206). Design ticket #763; slice-map fan-in **#770**; wayfinder map #7. Slice `monitor-recent-events` of `docs/slices/observability.yaml`; covers spec #796 stories 54–61 (monitoring face). ## What to build Monitoring's additive `RecentEvents(window)` face, derived **at read time** from the standing-alert store and the recorded health history it already keeps: standing-alert **raise / resolve / acknowledge / escalate** transitions, plus the curated service events (crashed, recovered, unexpected silence and return). **A raised alert is not an event.** It is a standing condition, and it rides the read as a **separate field** from monitoring's existing `RaisedAlerts` query — never merged into the rows. The alert's *transitions* are events and stay in the chronology forever; the standing condition is the band's, not the list's. Monitoring-derived rows are the **only** rows wearing monitoring's info/warning/critical severity — no other source's row is graded on a severity scale. Nothing confirmed moves, no signature changes, **no new table, file, stream or collector is created**. Note the horizon this owner genuinely has: monitoring's recorded health history is a 24h window by construction (`monitor.DetailWindow`), and the surface states that rather than implying depth it does not have. ## Acceptance criteria - [ ] (story 56) Given monitoring's records, when `RecentEvents(window)` is called, then it derives events from the standing-alert store's transitions and its curated service-events projection (ADR 0069) — and **no new table, file, stream or collector is created**. - [ ] (story 56) Given the window bound, then only events inside it are returned. - [ ] (story 8) Given each derived event, then it carries monitoring's **own words verbatim** and its own outcome token — no sentence is composed and no outcome re-derived. - [ ] (story 9) Given monitoring-derived rows, then they are the only rows carrying monitoring's info/warning/critical severity. - [ ] (story 36) Given an alert that raised and later resolved, then **both** transitions are returned as ordinary events with monitoring's own words and severity. - [ ] (story 60) Given the standing raised alerts, then they are **not** merged into the events — they ride monitoring's existing `RaisedAlerts` query, projected not re-classified, with monitoring's own drill-in intent. - [ ] (story 45/48) Given a fleet in which members signed in, were invited, approved, suspended and removed with reasons, then this face emits **zero** events whose subject is a person. - [ ] (story 31) Given each event, then it carries monitoring's **own** drill-in intent (the service's detail) — this face maps no owner. ## Blocked by - #824 — `observability:activity-ops-event-contract` - `monitoring:notify-and-drill` (#84 — done, satisfied) - `monitoring:respond-ladder` (#87 — done, satisfied) ## Task manifest ```yaml task: observability:monitor-recent-events interface: monitoring gains an additive `RecentEvents(window)` face returning typed ops events for standing-alert raise / resolve / acknowledge / escalate transitions and its curated service events, derived at read time from the alert store and the recorded health history it already keeps; standing raised alerts stay a separate query seam: 'monitoring''s own package tests (prior art `monitor_test.go`, `detail_test.go`): the transitions and curated events derived for a window; the window bound honoured; monitoring''s own words carried verbatim; the standing-alert query unmodified and unmerged; no person-subject event emitted' acceptance: - given: an alert that raised at 21:02 and resolved at 21:14 inside the window when: '`RecentEvents(window)` is called' then: both transitions return as events with monitoring's own words and severity - given: a service that crashed and recovered when: '`RecentEvents(window)` is called' then: the curated service events return carrying monitoring's own wording verbatim - given: events outside the requested window when: '`RecentEvents(window)` is called' then: they are not returned - given: a raised alert standing now when: '`RecentEvents(window)` is called' then: it is not merged into the rows — the standing query stays separate - given: a fleet with sign-ins, invites, approvals, suspensions and removals when: '`RecentEvents(window)` is called' then: zero person-subject events are emitted depends_on: - activity-ops-event-contract - monitoring:notify-and-drill - monitoring:respond-ladder out_of_scope: - the read-composition and its route (`transport-activity-read`) - any new table, file, stream or collector - durable history / feed-side retention — the horizon is monitoring's own 24h `DetailWindow` - notifying from the feed — notifying is monitoring's existing job (P5-S2, ADR 0106) needs_human_decision: [] ``` --- *Emitted by `/to-tickets` over `docs/slices/observability.yaml` in an unattended session under ADR 0174 (two-way-door posture — Ben's veto is asynchronous, never blocking). Advances #797.*
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=10073
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=10073 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #825 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • commit 3a9bc542 is not a valid commit object (fabricated, or never pushed)
  • changed_files: 'STATUS.md' is not in the diff of the claimed commits
  • changed_files: 'internal/monitor/detail.go' is not in the diff of the claimed commits
  • changed_files: 'internal/monitor/recentevents.go' is not in the diff of the claimed commits
  • changed_files: 'internal/monitor/recentevents_test.go' is not in the diff of the claimed commits
envelope
{
  "issue": 825,
  "status": "success",
  "commits": [
    "3a9bc542"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/monitor/detail.go",
    "internal/monitor/recentevents.go",
    "internal/monitor/recentevents_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/monitor ./internal/opsevent",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/monitor",
      "exit_code": 0
    },
    {
      "command": "gofmt -l internal/monitor/",
      "exit_code": 0
    },
    {
      "command": "golangci-lint run ./internal/monitor/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci (pre-push gate: go build/vet/test/lint ./...)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "story 56 — derives from the standing-alert store's transitions and the curated service-events projection (ADR 0069); no new table/file/stream/collector": "internal/monitor/recentevents.go RecentEvents reads o.transitions + o.hist via the shared curatedHealth projection only — no new store; TestRecentEvents_AlertRaiseAndResolveAreBothEvents + TestRecentEvents_CuratedCrashedAndRecovered",
    "story 56 — only events inside the window are returned": "win.Contains gates every emitted event; TestRecentEvents_WindowBoundsWhatReturns",
    "story 8 — monitoring's own words verbatim + its own outcome token, no sentence composed, no outcome re-derived": "transition events carry a.Summary verbatim; curated events carry the shared curatedHealth label verbatim (same words as the P5-S3 timeline); TestRecentEvents_* assert Words == a.Summary / 'Chat stopped responding' / 'Chat back up'",
    "story 9 — monitoring-derived rows are the only rows carrying info/warning/critical severity": "every monitoring row's Outcome is a severity token (DDR 0206 line 170); TestRecentEvents asserts Outcome==critical/info",
    "story 36 — an alert that raised and later resolved returns BOTH transitions with monitoring's own words and severity": "transitionEvents emits raise (at RaisedAt, Problem=true) + close (at tr.At), both Words=Summary, Outcome=severity; TestRecentEvents_AlertRaiseAndResolveAreBothEvents",
    "story 60 — standing raised alerts are NOT merged into the events; they ride StandingAlerts, projected not re-classified": "a raise is emitted only for a CLOSED alert (from o.transitions); a standing alert emits no row and StandingAlerts is untouched; TestRecentEvents_StandingAlertRidesStandingAlertsNotTheRows",
    "story 45/48 — zero events whose subject is a person": "monitorSubject only builds opsevent.Service/opsevent.Machine; the OpsEvent type forbids a person subject; TestRecentEvents_NoPersonSubjectEvents asserts every subject kind is service/machine",
    "story 31 — each event carries monitoring's own drill-in intent (the service's detail); maps no owner": "monitorDrillIn/serviceDrillIn set Target 'monitoring', Ref the service/device; TestRecentEvents asserts DrillIn.Target=='monitoring', Ref=='chat'"
  },
  "summary": "Monitoring gains an additive RecentEvents(window) face deriving standing-alert transitions and curated crashed/recovered service events at read time from the store and 24h health history it already keeps, with severity as its own outcome token and the person-subject fence intact.",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #825 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit 3a9bc542 is not a valid commit object (fabricated, or never pushed) - changed_files: 'STATUS.md' is not in the diff of the claimed commits - changed_files: 'internal/monitor/detail.go' is not in the diff of the claimed commits - changed_files: 'internal/monitor/recentevents.go' is not in the diff of the claimed commits - changed_files: 'internal/monitor/recentevents_test.go' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 825, "status": "success", "commits": [ "3a9bc542" ], "changed_files": [ "STATUS.md", "internal/monitor/detail.go", "internal/monitor/recentevents.go", "internal/monitor/recentevents_test.go" ], "tests": [ { "command": "go test ./internal/monitor ./internal/opsevent", "exit_code": 0 }, { "command": "go vet ./internal/monitor", "exit_code": 0 }, { "command": "gofmt -l internal/monitor/", "exit_code": 0 }, { "command": "golangci-lint run ./internal/monitor/", "exit_code": 0 }, { "command": "nix develop .#go-ci (pre-push gate: go build/vet/test/lint ./...)", "exit_code": 0 } ], "criteria": { "story 56 — derives from the standing-alert store's transitions and the curated service-events projection (ADR 0069); no new table/file/stream/collector": "internal/monitor/recentevents.go RecentEvents reads o.transitions + o.hist via the shared curatedHealth projection only — no new store; TestRecentEvents_AlertRaiseAndResolveAreBothEvents + TestRecentEvents_CuratedCrashedAndRecovered", "story 56 — only events inside the window are returned": "win.Contains gates every emitted event; TestRecentEvents_WindowBoundsWhatReturns", "story 8 — monitoring's own words verbatim + its own outcome token, no sentence composed, no outcome re-derived": "transition events carry a.Summary verbatim; curated events carry the shared curatedHealth label verbatim (same words as the P5-S3 timeline); TestRecentEvents_* assert Words == a.Summary / 'Chat stopped responding' / 'Chat back up'", "story 9 — monitoring-derived rows are the only rows carrying info/warning/critical severity": "every monitoring row's Outcome is a severity token (DDR 0206 line 170); TestRecentEvents asserts Outcome==critical/info", "story 36 — an alert that raised and later resolved returns BOTH transitions with monitoring's own words and severity": "transitionEvents emits raise (at RaisedAt, Problem=true) + close (at tr.At), both Words=Summary, Outcome=severity; TestRecentEvents_AlertRaiseAndResolveAreBothEvents", "story 60 — standing raised alerts are NOT merged into the events; they ride StandingAlerts, projected not re-classified": "a raise is emitted only for a CLOSED alert (from o.transitions); a standing alert emits no row and StandingAlerts is untouched; TestRecentEvents_StandingAlertRidesStandingAlertsNotTheRows", "story 45/48 — zero events whose subject is a person": "monitorSubject only builds opsevent.Service/opsevent.Machine; the OpsEvent type forbids a person subject; TestRecentEvents_NoPersonSubjectEvents asserts every subject kind is service/machine", "story 31 — each event carries monitoring's own drill-in intent (the service's detail); maps no owner": "monitorDrillIn/serviceDrillIn set Target 'monitoring', Ref the service/device; TestRecentEvents asserts DrillIn.Target=='monitoring', Ref=='chat'" }, "summary": "Monitoring gains an additive RecentEvents(window) face deriving standing-alert transitions and curated crashed/recovered service events at read time from the store and 24h health history it already keeps, with severity as its own outcome token and the person-subject fence intact.", "blockers": [], "no_code_change": "" } ``` </details>
Author
Member

close-report for #825 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 825,
  "status": "success",
  "commits": [
    "3a9bc5411b570db940b2625557a408b6159a9740"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/monitor/detail.go",
    "internal/monitor/recentevents.go",
    "internal/monitor/recentevents_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/monitor ./internal/opsevent",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/monitor",
      "exit_code": 0
    },
    {
      "command": "gofmt -l internal/monitor/",
      "exit_code": 0
    },
    {
      "command": "golangci-lint run ./internal/monitor/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci (pre-push gate: go build/vet/test/lint ./...)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "story 56 — derives from the standing-alert store's transitions and the curated service-events projection (ADR 0069); no new table/file/stream/collector": "internal/monitor/recentevents.go RecentEvents reads o.transitions + o.hist via the shared curatedHealth projection only — no new store; TestRecentEvents_AlertRaiseAndResolveAreBothEvents + TestRecentEvents_CuratedCrashedAndRecovered",
    "story 56 — only events inside the window are returned": "win.Contains gates every emitted event; TestRecentEvents_WindowBoundsWhatReturns",
    "story 8 — monitoring's own words verbatim + its own outcome token, no sentence composed, no outcome re-derived": "transition events carry a.Summary verbatim; curated events carry the shared curatedHealth label verbatim (same words as the P5-S3 timeline); TestRecentEvents_* assert Words == a.Summary / 'Chat stopped responding' / 'Chat back up'",
    "story 9 — monitoring-derived rows are the only rows carrying info/warning/critical severity": "every monitoring row's Outcome is a severity token (DDR 0206 line 170); TestRecentEvents asserts Outcome==critical/info",
    "story 36 — an alert that raised and later resolved returns BOTH transitions with monitoring's own words and severity": "transitionEvents emits raise (at RaisedAt, Problem=true) + close (at tr.At), both Words=Summary, Outcome=severity; TestRecentEvents_AlertRaiseAndResolveAreBothEvents",
    "story 60 — standing raised alerts are NOT merged into the events; they ride StandingAlerts, projected not re-classified": "a raise is emitted only for a CLOSED alert (from o.transitions); a standing alert emits no row and StandingAlerts is untouched; TestRecentEvents_StandingAlertRidesStandingAlertsNotTheRows",
    "story 45/48 — zero events whose subject is a person": "monitorSubject only builds opsevent.Service/opsevent.Machine; the OpsEvent type forbids a person subject; TestRecentEvents_NoPersonSubjectEvents asserts every subject kind is service/machine",
    "story 31 — each event carries monitoring's own drill-in intent (the service's detail); maps no owner": "monitorDrillIn/serviceDrillIn set Target 'monitoring', Ref the service/device; TestRecentEvents asserts DrillIn.Target=='monitoring', Ref=='chat'"
  },
  "summary": "Monitoring gains an additive RecentEvents(window) face deriving standing-alert transitions and curated crashed/recovered service events at read time from the store and 24h health history it already keeps, with severity as its own outcome token and the person-subject fence intact.",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #825 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 825, "status": "success", "commits": [ "3a9bc5411b570db940b2625557a408b6159a9740" ], "changed_files": [ "STATUS.md", "internal/monitor/detail.go", "internal/monitor/recentevents.go", "internal/monitor/recentevents_test.go" ], "tests": [ { "command": "go test ./internal/monitor ./internal/opsevent", "exit_code": 0 }, { "command": "go vet ./internal/monitor", "exit_code": 0 }, { "command": "gofmt -l internal/monitor/", "exit_code": 0 }, { "command": "golangci-lint run ./internal/monitor/", "exit_code": 0 }, { "command": "nix develop .#go-ci (pre-push gate: go build/vet/test/lint ./...)", "exit_code": 0 } ], "criteria": { "story 56 — derives from the standing-alert store's transitions and the curated service-events projection (ADR 0069); no new table/file/stream/collector": "internal/monitor/recentevents.go RecentEvents reads o.transitions + o.hist via the shared curatedHealth projection only — no new store; TestRecentEvents_AlertRaiseAndResolveAreBothEvents + TestRecentEvents_CuratedCrashedAndRecovered", "story 56 — only events inside the window are returned": "win.Contains gates every emitted event; TestRecentEvents_WindowBoundsWhatReturns", "story 8 — monitoring's own words verbatim + its own outcome token, no sentence composed, no outcome re-derived": "transition events carry a.Summary verbatim; curated events carry the shared curatedHealth label verbatim (same words as the P5-S3 timeline); TestRecentEvents_* assert Words == a.Summary / 'Chat stopped responding' / 'Chat back up'", "story 9 — monitoring-derived rows are the only rows carrying info/warning/critical severity": "every monitoring row's Outcome is a severity token (DDR 0206 line 170); TestRecentEvents asserts Outcome==critical/info", "story 36 — an alert that raised and later resolved returns BOTH transitions with monitoring's own words and severity": "transitionEvents emits raise (at RaisedAt, Problem=true) + close (at tr.At), both Words=Summary, Outcome=severity; TestRecentEvents_AlertRaiseAndResolveAreBothEvents", "story 60 — standing raised alerts are NOT merged into the events; they ride StandingAlerts, projected not re-classified": "a raise is emitted only for a CLOSED alert (from o.transitions); a standing alert emits no row and StandingAlerts is untouched; TestRecentEvents_StandingAlertRidesStandingAlertsNotTheRows", "story 45/48 — zero events whose subject is a person": "monitorSubject only builds opsevent.Service/opsevent.Machine; the OpsEvent type forbids a person subject; TestRecentEvents_NoPersonSubjectEvents asserts every subject kind is service/machine", "story 31 — each event carries monitoring's own drill-in intent (the service's detail); maps no owner": "monitorDrillIn/serviceDrillIn set Target 'monitoring', Ref the service/device; TestRecentEvents asserts DrillIn.Target=='monitoring', Ref=='chat'" }, "summary": "Monitoring gains an additive RecentEvents(window) face deriving standing-alert transitions and curated crashed/recovered service events at read time from the store and 24h health history it already keeps, with severity as its own outcome token and the person-subject fence intact.", "blockers": [], "no_code_change": "" } ``` </details>
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#825
No description provided.