Complete mock alert governance

Record the agent, performance, and storage boundaries for fixture-owned alert timelines. Teach the verification registry to accept the focused mock incident and alert transport proofs used by the implementation.

Change-source: pulse-maintainer
This commit is contained in:
pulse-triage[bot]
2026-08-27 22:20:17 +01:00
parent 8ade613dfd
commit de01e2847d
4 changed files with 38 additions and 0 deletions
@@ -6737,3 +6737,15 @@ relink, or otherwise mutate an agent. The serialized write boundary in
`internal/api/alerting/notifications.go` therefore prevents an uncommitted
notification change from being mistaken for an agent lifecycle transition;
its failure coverage lives in `internal/api/alerting/notifications_test.go`.
### Mock alert timelines remain outside agent lifecycle authority
The shared `internal/api/alerting/alerts.go` boundary may resolve fixture-owned
alert incidents and notes from `internal/mock/fixture_graph.go` while mock mode
is active. Those records are alert-history presentation state only: creating,
listing, or annotating a mock incident cannot enroll, identify, link, command,
update, revoke, remove, or re-enroll an agent. The graph must not synthesize an
agent report or mutate the live agent inventory to make a mock timeline
complete. `internal/api/alerting/alerts_test.go` and
`internal/mock/alert_incidents_test.go` pin the transport and fixture sides of
this separation.
@@ -2860,3 +2860,17 @@ goroutine per destination. Updating Relay settings atomically replaces the
cached client and floor, so the next incident observes the new policy without
turning alert fan-out into configuration I/O. The hosted Relay runtime tests
pin persistence and cache replacement together.
### Mock alert timelines reuse the canonical fixture graph
Mock alert incidents are built once with the canonical fixture graph and read
under its existing lock. An occurrence lookup is a bounded scan of that
in-memory fixture slice; a resource lookup performs one scan, clones only the
matching incidents, sorts them newest-first, and applies the requested limit
before transport. Reads add no persistence access, provider request, polling
loop, or per-row frontend fetch. Notes mutate the matching in-memory fixture
under the same graph lock and advance the fixture data version without
rebuilding the estate. `internal/mock/alert_incidents_test.go` proves bounded
resource results and defensive-copy isolation, while
`internal/api/alerting/alerts_test.go` proves that mock transport does not need
the production incident store.
@@ -2998,6 +2998,7 @@
"test_prefixes": [],
"exact_files": [
"frontend-modern/src/api/__tests__/alertIntentPolicies.test.ts",
"internal/api/alerting/alerts_test.go",
"internal/api/alerting/deadman_handlers_test.go",
"internal/api/alerts_endpoints_test.go"
]
@@ -6735,6 +6736,7 @@
"exact_files": [
"frontend-modern/src/stores/__tests__/websocket-unified.test.ts",
"frontend-modern/src/utils/__tests__/resourceStateAdapters.test.ts",
"internal/mock/alert_incidents_test.go",
"internal/mock/integration_coverage_test.go",
"internal/mock/platform_fixtures_test.go"
]
@@ -5700,3 +5700,13 @@ no backup or restore authority; they make the existing configuration file the
explicit commit boundary. Persistence-failure proofs live in
`internal/api/alerting/notifications_test.go` with API ordering pinned by
`internal/api/contract_test.go`.
### Mock alert incident notes are not recovery records
The shared `internal/api/alerting/alerts.go` transport now reads and annotates
mock alert incidents on `internal/mock/fixture_graph.go` when mock mode is
active. That graph-lifetime state is demo history only: it is not backup
inventory, a recovery point, restore evidence, retention state, or durable
storage metadata. Mock notes must not be written to the production incident
store or survive a fixture-graph rebuild, and real-mode incident persistence
remains unchanged. The mock API and fixture tests pin that isolation.