Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Complete mock alert governance

pulse-triage[bot]de01e2847de6
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
index 602a5cac3b..6525d9fabd 100644
--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
@@ -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.
diff --git a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
index f40d8886d7..b1d0e1f308 100644
--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
@@ -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.
diff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.json
index 9e5584c255..2175367a9d 100644
--- a/docs/release-control/v6/internal/subsystems/registry.json
+++ b/docs/release-control/v6/internal/subsystems/registry.json
@@ -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"
]
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index a0902e76e4..b6f50c6562 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -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.