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.

Distinguish provider evidence from backup job results

pulse-triage[bot]6957cf1c5532
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 30b8205154..694b272648 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -20,6 +20,18 @@
## Purpose
+### Coverage keeps provider provenance separate from task state
+
+The existing Coverage drawer uses the shared wrapping detail-section pattern
+for each provider's scope, evidence source and Reported outcome. Known PBS/PVE
+inventory sources are named; unknown sources stay literal text. The summary is
+not labelled a job or collection result because the rollup can combine sources
+of different ages. A visible qualifier distinguishes provider evidence from
+actual task and restore-point states without changing their semantics or shared
+primitives. `ProxmoxCoverageTable.test.tsx` and `ProxmoxBackupsTable.test.tsx`
+cover source meaning, unknown/literal values, independent states, polling and
+focus. Actual desktop/narrow Backups pixels must confirm readable wrapping.
+
### Coverage dates are inspectable without hover
Open Coverage evidence retains each point’s exact reported date as wrapping
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 4efbe0dfa2..ee448d2537 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -21,6 +21,27 @@
## Purpose
+### Coverage provider outcomes are not backup job results
+
+Provider evidence identifies the source of each scoped assessment: PBS/PVE
+backup inventories have explicit names; legacy restore-point evidence is named
+as such, and unrecognised sources remain literal text (or Unknown when absent).
+The rollup's `jobState` is displayed as Reported outcome, never Job or Collection:
+an inventory observation can supply it, but a newer retained point can also
+supply the outcome beside an older observation's source. Visible wrapping copy
+keeps this evidence distinct from actual task and restore-point states. History,
+access, reported values, protection, dates and policy do not change.
+
+Normal-suite `ProxmoxCoverageTable.test.tsx` covers known/unknown/literal sources,
+all reported outcomes and narrow/wide rendering. `ProxmoxBackupsTable.test.tsx`
+passes parsed inventory and posture reads through the consuming surface,
+retaining a Running/unprotected point and a real OK task independently of
+successful or failed inventory evidence, including polling and owned focus.
+Desktop/narrow browser proof must inspect the production Backups consumer with
+source-bound collector frames, its separate task/evidence meanings and readable
+source/outcome/qualifier. This is safer inspection, not backup-job execution,
+original guest recovery, a tested restore or published availability.
+
### PBS backup listings require the whole response
Namespace, group and snapshot reads accept one unambiguous JSON envelope only
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index f15d09c217..f072c8a183 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -23,6 +23,27 @@ and sort the complete canonical change table while startup and ingestion wait.
## Purpose
+### Coverage provider outcomes are not backup job results
+
+Provider evidence identifies the source of each scoped assessment: PBS/PVE
+backup inventories have explicit names; legacy restore-point evidence is named
+as such, and unrecognised sources remain literal text (or Unknown when absent).
+The rollup's `jobState` is displayed as Reported outcome, never Job or Collection:
+an inventory observation can supply it, but a newer retained point can also
+supply the outcome beside an older observation's source. Visible wrapping copy
+keeps this evidence distinct from actual task and restore-point states. History,
+access, reported values, protection, dates and policy do not change.
+
+Normal-suite `ProxmoxCoverageTable.test.tsx` covers known/unknown/literal sources,
+all reported outcomes and narrow/wide rendering. `ProxmoxBackupsTable.test.tsx`
+passes parsed inventory and posture reads through the consuming surface,
+retaining a Running/unprotected point and a real OK task independently of
+successful or failed inventory evidence, including polling and owned focus.
+Desktop/narrow browser proof must inspect the production Backups consumer with
+source-bound collector frames, its separate task/evidence meanings and readable
+source/outcome/qualifier. This is safer inspection, not backup-job execution,
+original guest recovery, a tested restore or published availability.
+
### Coverage dates are inspectable without hover
Open Coverage evidence retains each point’s exact reported date as wrapping
diff --git a/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx
index e52a5c2409..70a34865a0 100644
--- a/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx
+++ b/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx
@@ -189,6 +189,19 @@ const evidenceQualityLabel = (value: string): string => {
return value.charAt(0).toUpperCase() + value.slice(1);
};
+const providerEvidenceSourceLabel = (source: string | undefined): string => {
+ switch (source?.trim()) {
+ case 'pbs-backup-enumeration':
+ return 'PBS backup inventory';
+ case 'pve-backup-enumeration':
+ return 'PVE backup inventory';
+ case 'legacy-recovery-point':
+ return 'Retained restore point';
+ default:
+ return source?.trim() || 'Unknown';
+ }
+};
+
const postureExplanation = (row: WorkloadCoverageRow): string => {
if (row.protectionPosture?.explanation) return row.protectionPosture.explanation;
if (row.posture === 'checking') return "Pulse is checking this guest's backups.";
@@ -394,8 +407,11 @@ function CoverageTaskCandidates(props: { tasks: readonly CoverageTask[] }) {
);
}
-// Provider evidence quality (did the job run, is history complete, can Pulse
-// read it) explains a posture; it is detail, not the answer.
+// Provider outcomes can come from an inventory observation or a retained point.
+// The rollup may keep a newer point's outcome beside an older observation's
+// source, so neither "Job" nor "Collection" accurately names every outcome.
+// Keep its reported value, identify the source, and leave actual task/point
+// states in their own sections. Provider quality explains a posture, not a job.
const buildCoverageDetailSections = (row: WorkloadCoverageRow): DetailSection[] =>
compactDetailSections([
{
@@ -438,7 +454,8 @@ const buildCoverageDetailSections = (row: WorkloadCoverageRow): DetailSection[]
providerLabel(provider.provider),
[
`Scope ${provider.scope?.trim() || 'Unknown'}`,
- `Job ${evidenceQualityLabel(provider.jobState)}`,
+ `Source ${providerEvidenceSourceLabel(provider.source)}`,
+ `Reported outcome ${evidenceQualityLabel(provider.jobState)}`,
`History ${evidenceQualityLabel(provider.historyCompleteness)}`,
`Access ${evidenceQualityLabel(provider.permissions)}`,
].join(' · '),
@@ -449,8 +466,11 @@ const buildCoverageDetailSections = (row: WorkloadCoverageRow): DetailSection[]
<span class="block whitespace-normal wrap-anywhere">
Scope {provider.scope?.trim() || 'Unknown'}
</span>
+ <span class="block whitespace-normal wrap-anywhere">
+ Source {providerEvidenceSourceLabel(provider.source)}
+ </span>
<span class="flex flex-wrap gap-x-3">
- <span>Job {evidenceQualityLabel(provider.jobState)}</span>
+ <span>Reported outcome {evidenceQualityLabel(provider.jobState)}</span>
<span>History {evidenceQualityLabel(provider.historyCompleteness)}</span>
<span>Access {evidenceQualityLabel(provider.permissions)}</span>
</span>
@@ -460,6 +480,12 @@ const buildCoverageDetailSections = (row: WorkloadCoverageRow): DetailSection[]
),
),
),
+ footerContent: row.protectionPosture?.providerStates.length ? (
+ <p class="whitespace-normal text-[11px] leading-snug text-muted wrap-anywhere">
+ Provider evidence describes inventory reads or retained restore points, not a backup job
+ result. Task and restore-point states are shown separately.
+ </p>
+ ) : undefined,
},
]);
diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx
index 0d98b69479..f401b5f8f6 100644
--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx
+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx
@@ -3475,3 +3475,95 @@ describe('PBS inventory state column', () => {
expect(countColumn.style.width).toBe('15.5%');
});
});
+
+describe('Coverage provider-outcome-meaning through parsed API reads', () => {
+ it.each([
+ ['proxmox-pbs', 'pbs-backup-enumeration', 'PBS backup inventory'],
+ ['proxmox-pve', 'pve-backup-enumeration', 'PVE backup inventory'],
+ ] as const)(
+ 'keeps %s inventory outcomes distinct from actual tasks and restore points through polling',
+ async (provider, source, label) => {
+ vi.useFakeTimers({ now: BACKUP_IDENTITY_NOW, toFake: ['Date', 'setInterval', 'clearInterval'] });
+ try {
+ window.history.replaceState({}, '', '/proxmox/backups/coverage');
+ const guest = identityGuest('east-100', 'east', 'pve-1');
+ const assessment = protectionPosture(guest.id);
+ assessment.state = 'unprotected';
+ assessment.coverage = 'none';
+ assessment.freshness = 'unknown';
+ assessment.verification = 'unknown';
+ assessment.explanation =
+ 'Pulse can see the full backup history, but found no successful, completed backup for this resource.';
+ assessment.providerStates = [
+ { ...assessment.providerStates[0], provider, source, scope: 'read-scope' },
+ ];
+ apiFetchMock.mockImplementation(async (url: string) =>
+ jsonResponse({
+ data:
+ url === '/api/backups/pbs'
+ ? {
+ backups: [
+ identityPBS({
+ inProgress: true,
+ writeActivityObserved: true,
+ writeActive: true,
+ verified: false,
+ }),
+ ],
+ }
+ : {
+ storageBackups: [],
+ guestSnapshots: [],
+ backupTasks: [identityTask()],
+ },
+ }),
+ );
+ apiFetchJSONMock.mockImplementation(async () => ({
+ data: [structuredClone(assessment)],
+ policy: protectionPolicy,
+ }));
+ renderInRouter(() => <ProxmoxBackupsTable emptyIcon={<span />} workloads={[guest]} />);
+ const toggle = await screen.findByRole('button', { name: /Expand details for east-100/ });
+ fireEvent.click(toggle);
+ const panel = await screen.findByTestId('proxmox-coverage-detail');
+ await waitFor(() => expect(panel).toHaveTextContent(`Source ${label}`));
+ const task = within(panel).getByText('Latest task', { selector: 'th' }).closest('tbody')!;
+ expect(within(task).getByText('OK', { exact: true })).toBeVisible();
+ expect(panel).toHaveTextContent('Reported outcome Success');
+ expect(panel).not.toHaveTextContent('Job Success');
+ expect(within(panel).getByText('Running', { exact: true })).toBeVisible();
+ expect(within(panel).getByRole('img', { name: 'Unprotected' })).toBeInTheDocument();
+ expect(panel).toHaveTextContent('no successful, completed backup');
+
+ toggle.focus();
+ Object.assign(assessment.providerStates[0], {
+ jobState: 'failed',
+ historyCompleteness: 'unavailable',
+ permissions: 'denied',
+ });
+ await vi.advanceTimersByTimeAsync(30_000);
+ await waitFor(() => expect(panel).toHaveTextContent('Reported outcome Failed'));
+ expect(panel).toHaveTextContent('History Unavailable');
+ expect(panel).toHaveTextContent('Access Denied');
+ expect(panel).not.toHaveTextContent('Reported outcome Success');
+ expect(
+ within(within(panel).getByText('Latest task', { selector: 'th' }).closest('tbody')!).getByText(
+ 'OK',
+ { exact: true },
+ ),
+ ).toBeVisible();
+ expect(within(panel).getByText('Running', { exact: true })).toBeVisible();
+ expect(screen.getByTestId('proxmox-coverage-detail')).toBe(panel);
+ expect(toggle).toHaveFocus();
+ // No new read, test-job or mutation is needed to explain the evidence.
+ expect(apiFetchMock).toHaveBeenCalledTimes(4);
+ expect(apiFetchJSONMock).toHaveBeenCalledTimes(2);
+ expect(new Set(apiFetchMock.mock.calls.map(([url]) => url))).toEqual(
+ new Set(['/api/backups/pbs', '/api/backups/pve']),
+ );
+ } finally {
+ vi.useRealTimers();
+ }
+ },
+ );
+});
diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx
index bebe3c4b8a..3cd26b0c3b 100644
--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx
+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx
@@ -795,6 +795,84 @@ describe('ProxmoxCoverageTable column visibility', () => {
});
});
+describe('Coverage provider-outcome-meaning', () => {
+ const mount = (source: string, jobState = 'success', width = 320) =>
+ renderInRouter(() => (
+ <ProxmoxCoverageTable
+ rows={[
+ {
+ ...row,
+ protectionPosture: {
+ ...row.protectionPosture!,
+ providerStates: [{ ...row.protectionPosture!.providerStates[0], source, jobState }],
+ },
+ } as WorkloadCoverageRow,
+ ]}
+ hasAnyRows
+ emptyIcon={<span />}
+ emptyTitle=""
+ emptyDescription=""
+ sortKey={() => 'posture'}
+ sortDirection={() => 'asc'}
+ onSort={() => {}}
+ expandedKey={row.key}
+ onToggleExpand={() => {}}
+ showTaskColumn={false}
+ layoutWidth={() => width}
+ />
+ ));
+
+ it.each([
+ ['pbs-backup-enumeration', 'PBS backup inventory'],
+ ['pve-backup-enumeration', 'PVE backup inventory'],
+ ['legacy-recovery-point', 'Retained restore point'],
+ ['future-backup-enumeration', 'future-backup-enumeration'],
+ ['', 'Unknown'],
+ [' ', 'Unknown'],
+ ])('identifies %j without guessing a backup job result', (source, label) => {
+ mount(` ${source} `);
+ const panel = screen.getByTestId('proxmox-coverage-detail');
+ expect(within(panel).getByText(`Source ${label}`)).toHaveClass(
+ 'whitespace-normal',
+ 'wrap-anywhere',
+ );
+ expect(within(panel).getByText('Reported outcome Success')).toBeVisible();
+ expect(panel).not.toHaveTextContent('Job Success');
+ // Source and outcome can come from different-aged inputs to the rollup.
+ // Replacing Job with Collection would create another unsupported claim.
+ expect(panel).not.toHaveTextContent('Collection Success');
+ expect(panel).toHaveTextContent(
+ 'Provider evidence describes inventory reads or retained restore points, not a backup job result.',
+ );
+ expect(panel).toHaveTextContent('Task and restore-point states are shown separately.');
+ });
+
+ it.each(['success', 'warning', 'failed', 'running', 'unknown'])(
+ 'retains the reported %s without changing protection, history or access',
+ (outcome) => {
+ mount('pbs-backup-enumeration', outcome, 1200);
+ const panel = screen.getByTestId('proxmox-coverage-detail');
+ expect(panel).toHaveTextContent(
+ `Reported outcome ${outcome.charAt(0).toUpperCase() + outcome.slice(1)}`,
+ );
+ expect(panel).toHaveTextContent('History Complete');
+ expect(panel).toHaveTextContent('Access Sufficient');
+ expect(within(panel).getByRole('img', { name: 'Protected' })).toBeInTheDocument();
+ },
+ );
+
+ it.each([320, 1200])('keeps an unknown source literal and wrapping at %ipx', (width) => {
+ const source = '<img src=x onerror=alert(1)>' + 'source-'.repeat(30);
+ mount(source, 'unknown', width);
+ const panel = screen.getByTestId('proxmox-coverage-detail');
+ const label = within(panel).getByText(`Source ${source}`);
+ expect(label).toHaveClass('whitespace-normal', 'wrap-anywhere');
+ expect(label).not.toHaveClass('truncate');
+ expect(label.querySelector('img, a')).toBeNull();
+ expect(panel).toHaveTextContent('Reported outcome Unknown');
+ });
+});
+
describe('Coverage absence requires readable, complete history', () => {
const unknownTitle =
'No completed backup is visible in the current list. Missing entries do not mean no backups exist. Expand this row to inspect the evidence.';