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.

Repair alert delivery governance proof

pulse-triage[bot]e88583866a47
diff --git a/docs/release-control/v6/internal/status.json b/docs/release-control/v6/internal/status.json
index d1c6b167c6..b41270e1a8 100644
--- a/docs/release-control/v6/internal/status.json
+++ b/docs/release-control/v6/internal/status.json
@@ -9761,7 +9761,7 @@
},
{
"id": "alert-engine-suppression-observability",
- "summary": "Alert notification suppression decisions (cooldown, quiet hours, flapping, grouping, rate limit, activation state) are unobservable: the delivery log records attempts only, the delivery-diagnosis endpoint has no frontend consumer, and lifecycle transitions have no durable event trail, so held notifications read as breakage and lifecycle regressions (#1682, #1683, #1553, #1693) ship without an end-to-end contract gate. Resolution is Phase 0 of docs/ALERT_ENGINE_EVOLUTION.md: an additive SQLite alert event log recording transitions and suppressions with reasons, plus UI surfacing of the existing delivery diagnosis.",
+ "summary": "Alert notification suppression decisions (cooldown, quiet hours, flapping, grouping, rate limit, activation state) lacked operator-visible evidence, so held notifications read as breakage and lifecycle regressions (#1682, #1683, #1553, #1693) could ship without an end-to-end contract gate. Phase 0 of docs/ALERT_ENGINE_EVOLUTION.md now supplies the Alerts Overview delivery-diagnosis projection and an additive SQLite event log/API for notification decisions and the safe lifecycle seams. The remaining gap is the deliberately deferred firing event plus convergence of history and delivery projections onto that log before the later reducer phases.",
"owner": "project-owner",
"status": "triaged",
"recorded_at": "2026-08-26",
@@ -9778,12 +9778,12 @@
"evidence": [
{
"repo": "pulse",
- "path": "docs/release-control/v6/internal/records/alert-engine-suppression-observability-2026-08-26.md",
+ "path": "docs/ALERT_ENGINE_EVOLUTION.md",
"kind": "file"
},
{
"repo": "pulse",
- "path": "docs/ALERT_ENGINE_EVOLUTION.md",
+ "path": "docs/release-control/v6/internal/records/alert-engine-suppression-observability-2026-08-26.md",
"kind": "file"
}
]
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
index 0183596899..fb46b54b05 100644
--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
@@ -3110,6 +3110,15 @@ adjacent only: `/api/alerts/delivery-diagnosis` is alerts/API-contract owned
read-only notification-policy evidence and must not be interpreted as agent
enrollment, agent liveness, install progress, setup-token authority, or fleet
repair eligibility.
+Its identifier-free bulk form merely projects the same evidence for every
+active alert in one read pass. Array membership, resource identity, delivery
+reason, and missing diagnosis data grant no agent command or continuity
+authority and must not be folded into agent lifecycle state.
+The adjacent `/api/alerts/events` route and its SQLite source are likewise
+alerts/API-contract evidence only. Alert resource fields, suppression reasons,
+and lifecycle event membership grant no enrollment, heartbeat, command,
+installation, continuity, or repair authority, and a missing event must not be
+reinterpreted as agent liveness evidence.
The router projection-builder (`internal/api/router.go`) that wires
the operator-state provider into the findings runtime now also
diff --git a/docs/release-control/v6/internal/subsystems/alerts.md b/docs/release-control/v6/internal/subsystems/alerts.md
index 5559f0c297..b995e9372b 100644
--- a/docs/release-control/v6/internal/subsystems/alerts.md
+++ b/docs/release-control/v6/internal/subsystems/alerts.md
@@ -851,6 +851,24 @@ projection used by `/api/alerts/delivery-diagnosis`; that projection may explain
current gating state, quiet-hours replay timing, cooldown timing, rate-limit
counts, and flapping suppression, but it must not dispatch callbacks or mutate
flapping/rate-limit tracking maps.
+Omitting the alert identifier returns one diagnosis for every active alert from
+one manager read pass, ordered by alert identifier, and an empty active set is
+encoded as `[]` rather than `null`. The Alerts Overview consumes that bulk
+projection once per refresh and may render its current delivery outcome on an
+unacknowledged active-alert card. Missing or failed diagnosis reads degrade to
+no delivery line; they must not hide alert truth or trigger per-card requests.
+`internal/alerts/eventlog/` and `internal/alerts/event_emission.go` own the
+additive append-only alert event record. Persistent managers enable a
+SQLite-backed store under the alerts data directory; ephemeral managers record
+nothing unless a store is installed explicitly. Resolution, acknowledgement,
+unacknowledgement, escalation, flapping detection, dispatch, quiet-hours
+deferral, and suppression append immutable events without changing lifecycle
+or delivery behavior. The write path is non-blocking and fail-open for alert
+evaluation: a full buffer counts and drops its event, while an unavailable
+store disables recording. Events retain for 90 days and prune hourly. A fired
+lifecycle event is deliberately absent until an activation seam can distinguish
+a real firing from persisted-alert restore; the event log must not invent that
+transition from the active-alert storage funnel.
The same dispatch policy owns firing-notification evidence on active alerts:
any alert that passes notification suppression and enters the fired callback
fan-out must carry `LastNotified` before the callback clone is emitted. Resolved
@@ -1450,6 +1468,12 @@ Render-heavy alert overview ownership now routes through
and `frontend-modern/src/features/alerts/AlertOverviewAlertCard.tsx` instead
of rebuilding stats-card, active-alert, and timeline-card presentation inline
inside `frontend-modern/src/features/alerts/OverviewTab.tsx`.
+`AlertOverviewAlertCard.tsx` also owns the compact delivery-status placement,
+while `deliveryDiagnosisPresentation.ts` owns the reason-to-copy and tone
+mapping. Acknowledged cards keep their canonical badge and omit that redundant
+line; held delivery states that can surprise an operator use the attention
+tone, while cooldown, quiet-hours, monitor-only, and successful/pending states
+remain neutral.
The retired dashboard recent-alert panel must not be reintroduced as a
parallel alert surface. Alert summary/tone copy belongs to the alert overview
presentation owner, and any future compact alert surface must compose the
diff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.md
index e89a6dff48..de39853998 100644
--- a/docs/release-control/v6/internal/subsystems/api-contracts.md
+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md
@@ -4439,6 +4439,22 @@ manager's current delivery-policy projection for one active alert, including
replay timing, recent rate-limit counts, and flapping suppression evidence. The
route requires `monitoring:read`, returns `404` for unknown active alerts, and
must not send notifications or mutate delivery tracking state.
+When `alertIdentifier` (and its legacy `id` alias) is omitted, the same route
+returns a JSON array containing the diagnosis for every active alert, ordered
+by alert identifier and computed in one manager pass. No active alerts returns
+`[]`, never `null`. This bulk form is the list-surface contract; clients must
+not replace it with one request per alert, and an unavailable diagnosis read
+must not change the independently sourced active-alert projection.
+`GET /api/alerts/events` is the read-only API projection of the additive alert
+event log and also requires `monitoring:read`. Optional `alertIdentifier`,
+comma/repeated `type`, RFC 3339 `since`, and positive `limit` filters narrow a
+newest-first result; the store defaults to 200 rows and caps reads at 1,000.
+Invalid identifiers, timestamps, or limits return `400`, and a manager with no
+event store returns `[]` rather than `null`. The event payload is evidence of
+recorded lifecycle and notification-decision seams only. It must not dispatch,
+acknowledge, resolve, or otherwise mutate alert or notification state, and the
+current absence of a fired lifecycle event must not be inferred as a firing
+that never happened.
The generated PVE setup-script temperature wrapper is part of the API contract
for legacy SSH sensor collection. Discovery uses non-opening `smartctl --scan`
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index b219ee6c18..eaec60a7a8 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -428,6 +428,12 @@ alert-owned presentation helpers. Alert IDs, alert types, resource IDs,
resource names, node names, source messages, event payloads, commands, command
output, logs, and Assistant model-context labels stay machine-stable and
untranslated.
+The active-alert card's delivery-status row remains an alerts-owned compact
+presentation composed inside the shared responsive card shell. It consumes one
+bulk diagnosis snapshot per overview refresh, wraps beside started-at and
+threshold metadata at narrow widths, and does not create a second card or
+page-level banner. Acknowledged cards omit the redundant row, and unavailable
+diagnosis data leaves the existing alert card intact.
The legacy pricing handoff page may also route its visible redirect title and
manual-link copy through the catalog, but `Pulse Account`, route paths, feature
keys, query parameters, public URLs, and purchase-return state remain
diff --git a/docs/release-control/v6/internal/subsystems/notifications.md b/docs/release-control/v6/internal/subsystems/notifications.md
index f18f1182d8..a0390d15be 100644
--- a/docs/release-control/v6/internal/subsystems/notifications.md
+++ b/docs/release-control/v6/internal/subsystems/notifications.md
@@ -32,6 +32,12 @@ Email rendering treats `patrol_finding` as a finding rather than a numeric
threshold alert. Single and grouped HTML/text bodies show the finding message
and optional category, omit meaningless zero-value metrics, preserve mixed
group headings, and HTML-escape every resource, message, and category field.
+The alerts-owned append-only event log may record notification dispatch,
+quiet-hours deferral, and suppression decisions at the alert manager's policy
+seams. Those events explain why delivery was or was not attempted, but they do
+not replace the notifications-owned queue, delivery log, retry/DLQ state, or
+provider receipts and must not be treated as proof that a destination accepted
+or displayed a notification.
## Canonical Files
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index c52f8d27e1..02b2d863c5 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -2628,6 +2628,15 @@ adjacent only: `/api/alerts/delivery-diagnosis` exposes alerts/API-contract
read-only notification-policy evidence and creates no storage health,
recovery-point, backup verification, restore authorization, or provider
coverage semantics.
+The identifier-free bulk response applies that same boundary to every active
+alert in one read pass. A storage-related row in the array, a held delivery
+reason, or an unavailable diagnosis cannot create, clear, or qualify backup,
+recovery, protection, or restore evidence.
+The adjacent `/api/alerts/events` route carries the same boundary over durable
+alert lifecycle and notification-decision records. Storage-shaped resource
+fields and suppression reasons remain alert evidence only; event presence or
+absence cannot create, clear, verify, or authorize a backup, recovery point,
+protection posture, or restore operation.
Kubernetes pod metadata decoded by `frontend-modern/src/hooks/useUnifiedResources.ts`
is shared inventory context for storage/recovery handoffs only; Pod phase,
diff --git a/frontend-modern/browser-verification.json b/frontend-modern/browser-verification.json
index 2b81a4608c..a83a147916 100644
--- a/frontend-modern/browser-verification.json
+++ b/frontend-modern/browser-verification.json
@@ -1,25 +1,23 @@
{
"version": 1,
- "base_sha": "8fb7b3764183168f93140d83e2b18b4e953b6cd8",
- "verified_at": "2026-08-26T19:25:19Z",
+ "base_sha": "515aa319e8c61fe9658f5ecfec417291df30a1da",
+ "verified_at": "2026-08-26T20:18:28Z",
"result": "passed",
"changed_paths": [
- "frontend-modern/src/components/Workloads/GuestDrawer.tsx",
- "frontend-modern/src/components/Workloads/GuestDrawerOverview.tsx",
- "frontend-modern/src/components/Workloads/WorkloadPanel.tsx",
- "frontend-modern/src/components/Workloads/WorkloadTableHeader.tsx",
- "frontend-modern/src/components/Workloads/guestDrawerModel.ts"
+ "frontend-modern/src/api/alerts.ts",
+ "frontend-modern/src/features/alerts/AlertOverviewAlertCard.tsx",
+ "frontend-modern/src/features/alerts/deliveryDiagnosisPresentation.ts",
+ "frontend-modern/src/features/alerts/useAlertOverviewState.ts",
+ "frontend-modern/src/types/api.ts"
],
"content_sha256": {
- "frontend-modern/src/components/Workloads/GuestDrawer.tsx": "0fa154ca920e2e6182fe390130ca687f3a6845fc45b33b2660d57ff236742e06",
- "frontend-modern/src/components/Workloads/GuestDrawerOverview.tsx": "b514e2f36de05c63e657e06c4fbf154740708e5ae936ee7a4bf52afefaeebee6",
- "frontend-modern/src/components/Workloads/WorkloadPanel.tsx": "e80cb5bd3dbdee66a9934f22e11372d2e89aeed71f9d5ed44b4f6371f7f65582",
- "frontend-modern/src/components/Workloads/WorkloadTableHeader.tsx": "a0938fc2603f51a3e6c0fc996906a3688c26db7d63c762aa2bcd83e23b6cfce8",
- "frontend-modern/src/components/Workloads/guestDrawerModel.ts": "412b541f2a928b959e52e84673f5a278ff395a78d2e1b9f78adfd878749da89b"
+ "frontend-modern/src/api/alerts.ts": "315ff7f3e2424e736a17a0a440511eec254ed5f1aba5426249c72318e0aac24a",
+ "frontend-modern/src/features/alerts/AlertOverviewAlertCard.tsx": "a16ca92470d7833003d3e6812bc464e51e5c34e4aa600ea2ad1cfda9d32e9635",
+ "frontend-modern/src/features/alerts/deliveryDiagnosisPresentation.ts": "ce55e5c8c2a6474768f62fadba70bd9c00f65d87985931b4eb23166f60c4ca3f",
+ "frontend-modern/src/features/alerts/useAlertOverviewState.ts": "8c923babd58f4942803f04a891f5c1a9a80aa7770d367faa01b9036edfa0015b",
+ "frontend-modern/src/types/api.ts": "076917acef66323e0914db6f56ab54261cd74e10cbb435a0d1d592bb14062c94"
},
- "routes": [
- "/proxmox/overview"
- ],
+ "routes": ["/alerts/overview"],
"viewports": [
{
"width": 1440,
@@ -31,15 +29,14 @@
}
],
"states": [
- "host-relative memory display selected with a live Proxmox guest memory alert",
- "alerted guest row expanded to its Overview tab on desktop",
- "same expanded alert state at the narrow responsive layout",
- "guest memory alert threshold restored to its original 85 percent after verification"
+ "mock-mode Alerts Overview loaded with active critical and warning alerts while external notification delivery was not active",
+ "bulk delivery diagnosis rendered Notification delivery not turned on beside active-alert timing metadata",
+ "the same active-alert delivery state rendered in the narrow responsive card layout"
],
"interactions": [
- "selected Host capacity in View preferences and filtered to a live alerted guest",
- "expanded the guest and confirmed the row header reads MEM · HOST",
- "confirmed the row shows 16% of host capacity while Needs attention shows VM memory at 84.5% (guest allocation · 16% of host capacity)",
- "resized from 1440x900 to 760x900 and confirmed the clarified warning wraps without clipping or overlap"
+ "loaded the current managed development build at /alerts/overview and confirmed the active-alert list populated from the bulk diagnosis read",
+ "confirmed delivery status appeared inline with Started metadata while Acknowledge, Timeline, monitoring-policy, and investigation controls remained usable on desktop",
+ "resized from 1440x900 to 760x900 and confirmed the delivery status and adjacent metadata wrapped without clipping or overlap",
+ "confirmed the browser console contained no errors across the desktop and narrow checks"
]
}
diff --git a/frontend-modern/public/docs/API.md b/frontend-modern/public/docs/API.md
index ca8aa29cab..6f4a8d00ca 100644
--- a/frontend-modern/public/docs/API.md
+++ b/frontend-modern/public/docs/API.md
@@ -617,7 +617,8 @@ Alert configuration and history (requires `monitoring:read`/`monitoring:write`).
- `PUT /api/alerts/config`
- `POST /api/alerts/activate`
- `GET /api/alerts/active`
-- `GET /api/alerts/delivery-diagnosis?alertIdentifier=<alert-id>`
+- `GET /api/alerts/delivery-diagnosis?alertIdentifier=<alert-id>` (omit `alertIdentifier` to get the diagnosis array for every active alert)
+- `GET /api/alerts/events?alertIdentifier=<alert-id>&type=<event-type,...>&since=<RFC3339>&limit=<n>` — append-only alert event log: lifecycle transitions and notification decisions, including suppressions with reasons; all parameters optional, newest first
- `GET /api/alerts/history`
- `DELETE /api/alerts/history`
- `GET /api/alerts/incidents`
diff --git a/frontend-modern/src/features/alerts/__tests__/OverviewTab.total24h.test.tsx b/frontend-modern/src/features/alerts/__tests__/OverviewTab.total24h.test.tsx
index 5687d4c07f..dedd034d32 100644
--- a/frontend-modern/src/features/alerts/__tests__/OverviewTab.total24h.test.tsx
+++ b/frontend-modern/src/features/alerts/__tests__/OverviewTab.total24h.test.tsx
@@ -1,15 +1,21 @@
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { cleanup, render, screen } from '@solidjs/testing-library';
import { DEFAULT_LOCALE, setActiveLocale } from '@/i18n';
-import type { Alert } from '@/types/api';
+import type { Alert, AlertDeliveryDiagnosis } from '@/types/api';
vi.mock('@solidjs/router', () => ({
useLocation: () => ({ hash: '', pathname: '/alerts', search: '', query: {} }),
A: (props: Record<string, unknown>) => props.children,
}));
+const getDeliveryDiagnoses = vi.fn<() => Promise<AlertDeliveryDiagnosis[]>>();
+
vi.mock('@/api/alerts', () => ({
- AlertsAPI: {},
+ AlertsAPI: {
+ get getDeliveryDiagnoses() {
+ return getDeliveryDiagnoses;
+ },
+ },
}));
vi.mock('@/stores/notifications', () => ({
@@ -57,6 +63,8 @@ function defaultProps(overrides: Record<string, unknown> = {}) {
describe('OverviewTab Last 24 Hours stat', () => {
beforeEach(() => {
setActiveLocale(DEFAULT_LOCALE);
+ getDeliveryDiagnoses.mockReset();
+ getDeliveryDiagnoses.mockResolvedValue([]);
vi.useFakeTimers();
vi.setSystemTime(new Date('2026-03-06T12:00:00Z'));
});
@@ -176,6 +184,39 @@ describe('OverviewTab Last 24 Hours stat', () => {
expect(container.querySelector('#alert-acknowledged.bg-surface-alt')).toBeTruthy();
});
+ it('renders the bulk delivery diagnosis on an unacknowledged active alert card', async () => {
+ const recentTime = new Date(Date.now() - 1_800_000).toISOString();
+ const activeAlerts: Record<string, Alert> = {
+ recent: makeAlert('recent', recentTime),
+ };
+ getDeliveryDiagnoses.mockResolvedValue([
+ {
+ alertIdentifier: 'recent',
+ alertId: 'recent',
+ trackingKey: 'vm-recent/cpu',
+ status: 'suppressed',
+ reason: 'notifications_inactive',
+ message: 'Alert notifications are not active yet.',
+ alertType: 'cpu',
+ level: 'warning',
+ notificationsEnabled: false,
+ activationState: 'pending',
+ cooldownMinutes: 5,
+ maxAlertsHour: 10,
+ recentAlertsInHour: 0,
+ flappingActive: false,
+ flappingHistoryInWindow: 0,
+ flappingThreshold: 5,
+ flappingWindowSeconds: 300,
+ },
+ ]);
+
+ render(() => <OverviewTab {...defaultProps({ activeAlerts })} />);
+
+ expect(await screen.findByText('Notification delivery not turned on')).toBeInTheDocument();
+ expect(getDeliveryDiagnoses).toHaveBeenCalledTimes(1);
+ });
+
it('localizes stats and active alert card controls without translating source fields', () => {
setActiveLocale('es');
const recentTime = new Date(Date.now() - 1_800_000).toISOString();
diff --git a/frontend-modern/src/utils/__tests__/docsLinks.test.ts b/frontend-modern/src/utils/__tests__/docsLinks.test.ts
index 077a3e2e5a..e6cdec1434 100644
--- a/frontend-modern/src/utils/__tests__/docsLinks.test.ts
+++ b/frontend-modern/src/utils/__tests__/docsLinks.test.ts
@@ -194,6 +194,24 @@ describe('docsLinks', () => {
expect(apiReference).toContain('without deleting delivery history');
});
+ it('ships the bulk active-alert delivery diagnosis contract', () => {
+ const apiReference = readFileSync(path.join(repoRoot, 'docs', 'API.md'), 'utf8');
+ const shippedAPIReference = readFileSync(
+ path.join(frontendRoot, 'public', 'docs', 'API.md'),
+ 'utf8',
+ );
+
+ expect(shippedAPIReference).toBe(apiReference);
+ expect(apiReference).toContain(
+ '`GET /api/alerts/delivery-diagnosis?alertIdentifier=<alert-id>`',
+ );
+ expect(apiReference).toContain(
+ 'omit `alertIdentifier` to get the diagnosis array for every active alert',
+ );
+ expect(apiReference).toContain('`GET /api/alerts/events?alertIdentifier=<alert-id>');
+ expect(apiReference).toContain('append-only alert event log');
+ });
+
it('ships the truthful Patrol objective API contract', () => {
const apiReference = readFileSync(path.join(repoRoot, 'docs', 'API.md'), 'utf8');
const shippedAPIReference = readFileSync(
diff --git a/internal/api/alerts_endpoints_test.go b/internal/api/alerts_endpoints_test.go
index 51eca2d4cc..1492d5392f 100644
--- a/internal/api/alerts_endpoints_test.go
+++ b/internal/api/alerts_endpoints_test.go
@@ -263,6 +263,28 @@ func TestAlertsEndpoints(t *testing.T) {
}
})
+ // The identifier-free form is the list-surface contract. Even with no
+ // active alerts it must route successfully and encode [] rather than null.
+ t.Run("GetAllActiveAlertDeliveryDiagnoses", func(t *testing.T) {
+ res, err := http.Get(srv.server.URL + "/api/alerts/delivery-diagnosis")
+ if err != nil {
+ t.Fatalf("request failed: %v", err)
+ }
+ defer res.Body.Close()
+
+ if res.StatusCode != http.StatusOK {
+ t.Fatalf("status code = %d, want %d", res.StatusCode, http.StatusOK)
+ }
+
+ var diagnoses []alerts.AlertDeliveryDiagnosis
+ if err := json.NewDecoder(res.Body).Decode(&diagnoses); err != nil {
+ t.Fatalf("decode delivery diagnoses: %v", err)
+ }
+ if diagnoses == nil {
+ t.Fatal("delivery diagnoses decoded as nil, want an empty JSON array")
+ }
+ })
+
// 5. Get alert history
t.Run("GetAlertHistory", func(t *testing.T) {
res, err := http.Get(srv.server.URL + "/api/alerts/history")