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.

Expose the recorded clocks behind backup protection assessments

pulse-triage[bot]a0ef4fb307b9
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 8574d82895..29b118a4ff 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -10597,3 +10597,26 @@ percentage-only aggregates, fallback, severity, freshness and mounted replacemen
component boundary as a percentage. Actual producer frames must pass through
canonical resource and Workloads projection into desktop/narrow consumers, with
pixels inspected. This is presentation correction, not native guest recovery.
+
+
+### Coverage distinguishes assessment clocks from visible restore evidence
+
+An expanded Proxmox Coverage record exposes the server assessment's `evaluatedAt`,
+`lastSuccessfulPointAt` and `lastVerifiedAt` as separately labelled UTC instants.
+Evaluation is not backup completion. These workload-wide recorded times do not
+come from the current artifact list or its location filters and do not establish
+a fresh inventory read, successful restore or guest responsiveness. Missing
+optional clocks say Not reported; malformed instants say Unknown rather than
+being repaired by the browser or borrowed from another field. A failed posture
+read withdraws the section with the assessment; ordinary recovery restores it.
+No provider, policy, association, age, permission, guest operation or polling
+contract changes.
+
+Normal-suite `coverageAssessmentEvidence.test.tsx` exercises the parsed Backups
+consumer at desktop/narrow widths, differing artifact/evaluation/point clocks,
+missing fields, location filtering, ordinary refresh, failed-read withdrawal and
+isolated retry. `ProxmoxCoverageTable.test.tsx` protects strict presentation of
+invalid instants. Browser proof must inspect the actual consuming record at
+desktop and narrow widths, including UTC text, keyboard/touch disclosure and
+refresh/recovery with the open record preserved. This is evidence inspection,
+not original incident recovery.
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index f5f3826e3c..930aad8552 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -8219,3 +8219,26 @@ initial assessments, retry, deferred initial assessment, common filters/hash,
replace-history semantics, explicit views and empty inventory. Browser proof
must exercise the actual table, inventory parsers and posture client through a
local safe producer at desktop and narrow widths, with native pixel inspection.
+
+
+### Coverage distinguishes assessment clocks from visible restore evidence
+
+An expanded Proxmox Coverage record exposes the server assessment's `evaluatedAt`,
+`lastSuccessfulPointAt` and `lastVerifiedAt` as separately labelled UTC instants.
+Evaluation is not backup completion. These workload-wide recorded times do not
+come from the current artifact list or its location filters and do not establish
+a fresh inventory read, successful restore or guest responsiveness. Missing
+optional clocks say Not reported; malformed instants say Unknown rather than
+being repaired by the browser or borrowed from another field. A failed posture
+read withdraws the section with the assessment; ordinary recovery restores it.
+No provider, policy, association, age, permission, guest operation or polling
+contract changes.
+
+Normal-suite `coverageAssessmentEvidence.test.tsx` exercises the parsed Backups
+consumer at desktop/narrow widths, differing artifact/evaluation/point clocks,
+missing fields, location filtering, ordinary refresh, failed-read withdrawal and
+isolated retry. `ProxmoxCoverageTable.test.tsx` protects strict presentation of
+invalid instants. Browser proof must inspect the actual consuming record at
+desktop and narrow widths, including UTC text, keyboard/touch disclosure and
+refresh/recovery with the open record preserved. This is evidence inspection,
+not original incident recovery.
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index 176d95bdb5..ee5e15ec9b 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -8961,3 +8961,26 @@ Desktop/narrow browser proof must exercise the parsed inventory consumer,
filter interactions, scoped open records and literal long labels and inspect
actual pixels. This corrects evidence scope, not original incident causality or
native backup/guest recovery.
+
+
+### Coverage distinguishes assessment clocks from visible restore evidence
+
+An expanded Proxmox Coverage record exposes the server assessment's `evaluatedAt`,
+`lastSuccessfulPointAt` and `lastVerifiedAt` as separately labelled UTC instants.
+Evaluation is not backup completion. These workload-wide recorded times do not
+come from the current artifact list or its location filters and do not establish
+a fresh inventory read, successful restore or guest responsiveness. Missing
+optional clocks say Not reported; malformed instants say Unknown rather than
+being repaired by the browser or borrowed from another field. A failed posture
+read withdraws the section with the assessment; ordinary recovery restores it.
+No provider, policy, association, age, permission, guest operation or polling
+contract changes.
+
+Normal-suite `coverageAssessmentEvidence.test.tsx` exercises the parsed Backups
+consumer at desktop/narrow widths, differing artifact/evaluation/point clocks,
+missing fields, location filtering, ordinary refresh, failed-read withdrawal and
+isolated retry. `ProxmoxCoverageTable.test.tsx` protects strict presentation of
+invalid instants. Browser proof must inspect the actual consuming record at
+desktop and narrow widths, including UTC text, keyboard/touch disclosure and
+refresh/recovery with the open record preserved. This is evidence inspection,
+not original incident recovery.
diff --git a/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx
index 445e295b61..9326ed2d21 100644
--- a/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx
+++ b/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx
@@ -39,6 +39,7 @@ import {
import { RecordOwnerLink } from '@/features/platformPage/RecordOwnerLink';
import type { StatusIndicatorVariant } from '@/utils/status';
import { useObservedElementWidth } from '@/hooks/useObservedElementWidth';
+import { parseBackupTimestampMs } from '@/utils/backupTimestamp';
import {
getWorkloadRecoveryPostureLabel,
@@ -196,6 +197,40 @@ const postureExplanation = (row: WorkloadCoverageRow): string => {
const TASK_ORDER_NOTICE =
'Task start times do not establish which task ran last. Possible latest tasks are listed below without a time order.';
+// Keep the assessment's clocks independent of the currently visible artifacts.
+// Use explicit UTC instants, not relative ages which could imply a fresh read
+// or turn the evaluation time into a backup completion time.
+const assessmentTimeRow = (label: string, value: string | null | undefined) => {
+ const ms = parseBackupTimestampMs(value ?? undefined);
+ const display =
+ ms === undefined
+ ? value
+ ? 'Unknown'
+ : 'Not reported'
+ : formatPlatformTableDateTimeValue(ms, {
+ dateTimeFormat: {
+ year: 'numeric',
+ month: 'short',
+ day: '2-digit',
+ hour: '2-digit',
+ minute: '2-digit',
+ second: '2-digit',
+ timeZone: 'UTC',
+ timeZoneName: 'short',
+ },
+ });
+ return makeDetailRow(label, display, {
+ wrap: true,
+ tone: ms === undefined ? 'muted' : undefined,
+ valueContent:
+ ms === undefined ? undefined : (
+ <time dateTime={value!} class="block whitespace-normal text-left tabular-nums">
+ {display}
+ </time>
+ ),
+ });
+};
+
const buildCoverageTaskSection = (task: CoverageTask, label: string): DetailSection => ({
label,
rows: compactDetailRows([
@@ -258,6 +293,26 @@ const buildCoverageDetailSections = (row: WorkloadCoverageRow): DetailSection[]
}),
]),
},
+ row.protectionPosture
+ ? {
+ label: 'Protection assessment',
+ rows: compactDetailRows([
+ assessmentTimeRow('Evaluated', row.protectionPosture.evaluatedAt),
+ assessmentTimeRow(
+ 'Latest successful point',
+ row.protectionPosture.lastSuccessfulPointAt,
+ ),
+ assessmentTimeRow('Last verified', row.protectionPosture.lastVerifiedAt),
+ ]),
+ footerContent: (
+ <p class="whitespace-normal text-[11px] leading-snug text-muted wrap-anywhere">
+ Evaluation time is not a backup completion time. These are the server assessment’s
+ recorded times, independent of the current list and its filters. They do not verify a
+ restore or guest responsiveness.
+ </p>
+ ),
+ }
+ : null,
row.taskCandidates?.length
? {
label: 'Task order',
diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx
index ffc3c626f0..85d858d029 100644
--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx
+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx
@@ -70,6 +70,44 @@ const headerTexts = () =>
afterEach(cleanup);
describe('ProxmoxCoverageTable column visibility', () => {
+ it('keeps malformed assessment dates unknown instead of normalising them or borrowing a clock', () => {
+ renderInRouter(() => (
+ <ProxmoxCoverageTable
+ rows={[
+ {
+ ...row,
+ protectionPosture: {
+ ...row.protectionPosture!,
+ evaluatedAt: '2026-09-31T10:00:00Z',
+ lastSuccessfulPointAt: '2026-10-28T10:00:00',
+ lastVerifiedAt: null,
+ },
+ },
+ ]}
+ hasAnyRows
+ emptyIcon={<span />}
+ emptyTitle=""
+ emptyDescription=""
+ sortKey={() => 'posture'}
+ sortDirection={() => 'asc'}
+ onSort={() => {}}
+ expandedKey={row.key}
+ onToggleExpand={() => {}}
+ showTaskColumn={false}
+ />
+ ));
+ const panel = screen.getByTestId('proxmox-coverage-detail');
+ for (const label of ['Evaluated', 'Latest successful point']) {
+ const value = within(panel).getByText(label, { exact: true }).closest('tr')!;
+ expect(value).toHaveTextContent('Unknown');
+ expect(value.querySelector('time')).toBeNull();
+ }
+ expect(within(panel).getByText('Last verified').closest('tr')).toHaveTextContent(
+ 'Not reported',
+ );
+ expect(panel).toHaveTextContent('Protected');
+ });
+
it('keeps uncertain archive evidence inspectable without changing server posture or its owner', async () => {
const model = buildProxmoxBackupRecoveryModel({
workloads: [identityGuest('east-100', 'east', 'pve-1')],
diff --git a/frontend-modern/src/features/proxmox/__tests__/coverageAssessmentEvidence.test.tsx b/frontend-modern/src/features/proxmox/__tests__/coverageAssessmentEvidence.test.tsx
new file mode 100644
index 0000000000..8e31f5fc68
--- /dev/null
+++ b/frontend-modern/src/features/proxmox/__tests__/coverageAssessmentEvidence.test.tsx
@@ -0,0 +1,209 @@
+import { cleanup, fireEvent, render, screen, waitFor, within } from '@solidjs/testing-library';
+import { Route, Router } from '@solidjs/router';
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+import { resetCreateNonSuspendingQueryCacheForTest } from '@/hooks/createNonSuspendingQuery';
+import { protectionPolicy, protectionPosture } from '@/utils/__fixtures__/protectionPosture';
+import type { ProtectionPosture } from '@/types/recovery';
+import { ProxmoxBackupsTable } from '../ProxmoxBackupsTable';
+import { identityArchive, identityGuest } from '../__fixtures__/backupIdentity';
+
+const api = vi.hoisted(() => ({ fetch: vi.fn(), json: vi.fn(), width: 1200 }));
+vi.mock('@/utils/apiClient', () => ({ apiFetch: api.fetch, apiFetchJSON: api.json }));
+vi.mock('@/hooks/useObservedElementWidth', () => ({
+ useObservedElementWidth: () => ({ setElement: () => {}, width: () => api.width }),
+}));
+
+const guest = identityGuest('east-100', 'east', 'pve-1');
+const evaluatedAt = '2026-10-28T17:45:12Z';
+const pointAt = '2026-10-08T04:30:00Z';
+const verifiedAt = '2026-10-09T05:00:00+02:00';
+const freshArchiveAt = '2026-10-28T16:00:00Z';
+const assessment = (extra: Partial<ProtectionPosture> = {}): ProtectionPosture => ({
+ ...protectionPosture(guest.id),
+ state: 'attention',
+ freshness: 'stale',
+ lastSuccessfulPointAt: pointAt,
+ lastVerifiedAt: verifiedAt,
+ explanation: 'The recorded successful point is older than the freshness window.',
+ evaluatedAt,
+ ...extra,
+});
+const reply = (data: ProtectionPosture[]) => ({ data, policy: protectionPolicy });
+function mount(data = [assessment()]) {
+ api.json.mockResolvedValue(reply(data));
+ api.fetch.mockImplementation((url: string) =>
+ Promise.resolve(
+ new Response(
+ JSON.stringify({
+ data:
+ url === '/api/backups/pbs'
+ ? { backups: [] }
+ : {
+ storageBackups: [
+ identityArchive({
+ time: freshArchiveAt,
+ ctime: Date.parse(freshArchiveAt) / 1000,
+ }),
+ ],
+ guestSnapshots: [],
+ backupTasks: [],
+ },
+ }),
+ ),
+ ),
+ );
+ render(() => (
+ <Router>
+ <Route
+ path="/*"
+ component={() => <ProxmoxBackupsTable emptyIcon={<span />} workloads={[guest]} />}
+ />
+ </Router>
+ ));
+}
+async function open() {
+ fireEvent.click(await screen.findByRole('button', { name: /Expand details for east-100/ }));
+ const panel = await screen.findByTestId('proxmox-coverage-detail');
+ await within(panel).findByText('Protection assessment', { exact: true });
+ return panel;
+}
+const valueRow = (panel: HTMLElement, label: string) =>
+ within(panel).getByText(label, { exact: true }).closest('tr')!;
+
+beforeEach(() => {
+ vi.resetAllMocks();
+ vi.useFakeTimers({
+ now: Date.parse('2026-10-28T18:00:00Z'),
+ toFake: ['Date', 'setInterval', 'clearInterval'],
+ });
+ resetCreateNonSuspendingQueryCacheForTest();
+ api.width = 1200;
+ window.history.replaceState({}, '', '/proxmox/backups/coverage');
+});
+afterEach(() => {
+ cleanup();
+ resetCreateNonSuspendingQueryCacheForTest();
+ vi.useRealTimers();
+});
+
+describe('Coverage server assessment clocks through the parsed consumer', () => {
+ it.each([1200, 320])(
+ 'keeps evaluation, recorded point and verification distinct at %ipx',
+ async (width) => {
+ api.width = width;
+ mount();
+ const panel = await open();
+ for (const [label, instant] of [
+ ['Evaluated', evaluatedAt],
+ ['Latest successful point', pointAt],
+ ['Last verified', verifiedAt],
+ ]) {
+ const time = valueRow(panel, label).querySelector('time')!;
+ expect(time).toHaveAttribute('datetime', instant);
+ expect(time).toHaveTextContent('UTC');
+ expect(time).toHaveClass('whitespace-normal');
+ }
+ expect(valueRow(panel, 'Last verified')).toHaveTextContent('03:00:00');
+ expect(panel).toHaveTextContent('Evaluation time is not a backup completion time.');
+ expect(panel).toHaveTextContent('They do not verify a restore or guest responsiveness.');
+ expect(panel.querySelector(`time[datetime="${freshArchiveAt}"]`)).toBeNull();
+ expect(panel).toHaveTextContent('Attention');
+ expect(panel).toHaveTextContent('PVE connection');
+ expect(api.fetch).toHaveBeenCalledTimes(2);
+ expect(api.json).toHaveBeenCalledTimes(1);
+ },
+ );
+
+ it.each([undefined, null])(
+ 'does not replace an unreported point or verification with an artifact or evaluation (%s)',
+ async (missing) => {
+ mount([assessment({ lastSuccessfulPointAt: missing, lastVerifiedAt: missing })]);
+ const panel = await open();
+ for (const label of ['Latest successful point', 'Last verified']) {
+ expect(valueRow(panel, label)).toHaveTextContent('Not reported');
+ expect(valueRow(panel, label).querySelector('time')).toBeNull();
+ }
+ expect(panel.querySelectorAll('time')).toHaveLength(1);
+ expect(panel).toHaveTextContent('Attention');
+ },
+ );
+
+ it('keeps assessment clocks workload-wide when a location filter is selected and cleared', async () => {
+ mount();
+ const panel = await open();
+ fireEvent.click(screen.getByRole('button', { name: 'Backup location: All locations' }));
+ fireEvent.click(
+ within(screen.getByRole('listbox', { name: 'Backup location' })).getByRole('option', {
+ name: 'PVE file · east / local',
+ }),
+ );
+ await screen.findByRole('note', { name: 'Restore evidence scope' });
+ expect(valueRow(panel, 'Latest successful point').querySelector('time')).toHaveAttribute(
+ 'datetime',
+ pointAt,
+ );
+ expect(panel).toHaveTextContent('independent of the current list and its filters');
+ fireEvent.click(screen.getByRole('button', { name: 'Remove Backup location filter' }));
+ await waitFor(() =>
+ expect(screen.queryByRole('note', { name: 'Restore evidence scope' })).toBeNull(),
+ );
+ expect(valueRow(panel, 'Latest successful point').querySelector('time')).toHaveAttribute(
+ 'datetime',
+ pointAt,
+ );
+ expect(screen.getByTestId('proxmox-coverage-detail')).toBe(panel);
+ expect(api.fetch).toHaveBeenCalledTimes(2);
+ expect(api.json).toHaveBeenCalledTimes(1);
+ });
+
+ it('updates the open assessment on ordinary polling and withdraws it on a failed read, then restores it with an isolated retry', async () => {
+ mount();
+ const panel = await open();
+ const collapse = within(panel).getByRole('button', { name: /Collapse east-100 details/ });
+ collapse.focus();
+ const next = '2026-10-28T17:50:00Z';
+ api.json.mockResolvedValue(reply([assessment({ evaluatedAt: next })]));
+ await vi.advanceTimersByTimeAsync(30_000);
+ await waitFor(() =>
+ expect(valueRow(panel, 'Evaluated').querySelector('time')).toHaveAttribute('datetime', next),
+ );
+ expect(valueRow(panel, 'Latest successful point').querySelector('time')).toHaveAttribute(
+ 'datetime',
+ pointAt,
+ );
+ expect(screen.getByTestId('proxmox-coverage-detail')).toBe(panel);
+ expect(collapse).toHaveFocus();
+
+ api.json.mockRejectedValue(new Error('synthetic unavailable assessment'));
+ await vi.advanceTimersByTimeAsync(30_000);
+ await screen.findByText(/Protection posture is unavailable/);
+ expect(within(panel).queryByText('Protection assessment', { exact: true })).toBeNull();
+ expect(panel.querySelectorAll('time')).toHaveLength(0);
+ expect(panel).toHaveTextContent('Unknown');
+ expect(collapse).toHaveFocus();
+
+ const inventoryReads = api.fetch.mock.calls.length;
+ api.json.mockResolvedValue(reply([assessment()]));
+ fireEvent.click(screen.getByRole('button', { name: 'Retry protection posture' }));
+ await within(panel).findByText('Protection assessment', { exact: true });
+ expect(valueRow(panel, 'Evaluated').querySelector('time')).toHaveAttribute(
+ 'datetime',
+ evaluatedAt,
+ );
+ expect(api.fetch).toHaveBeenCalledTimes(inventoryReads);
+ });
+
+ it.each(['2026-09-31T10:00:00Z', '2026-10-28T17:45:12', '<img src=x onerror=alert(1)>'])(
+ 'never renders a malformed reported assessment time (%s)',
+ async (invalid) => {
+ mount([assessment({ evaluatedAt: invalid })]);
+ await screen.findByText(/Protection posture is unavailable/);
+ fireEvent.click(await screen.findByRole('button', { name: /Expand details for east-100/ }));
+ const panel = await screen.findByTestId('proxmox-coverage-detail');
+ expect(within(panel).queryByText('Protection assessment', { exact: true })).toBeNull();
+ expect(panel.querySelector('time')).toBeNull();
+ expect(panel.querySelector('img')).toBeNull();
+ expect(panel).toHaveTextContent('Unknown');
+ },
+ );
+});