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.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
fix: make Proxmox protection posture evidence-backed
rcourtmand1ce12e3a0c2
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex ee6a45fff3..093152de0b 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -3981,6 +3981,12 @@ Its feature owner may clear incompatible hidden facets when the workspacechanges and may preserve that workspace during a composite reset, but theshared `FilterBar` remains the sole owner of Saved, Clear, filter-menu, andpopover chrome across desktop and narrow layouts.+That surface also keeps asynchronous posture presentation explicit: an+unresolved canonical posture request uses a neutral `Checking` row state and+coverage segment, while host and orphan recovery rows without a canonical+workload identity use neutral `Not evaluated`. Neither presentation state may+reuse the server-owned `Unknown` label, enter the posture filter contract, or+be styled as a protection success or failure.Alert History follows the same rule for its route-owned search, period, andseverity state. Its feature hook owns one composite reset and exposes asearch-aware active-state accessor to `FilterBar`; the shared shell owns wherediff --git a/docs/release-control/v6/internal/subsystems/monitoring.md b/docs/release-control/v6/internal/subsystems/monitoring.mdindex 8e46aa83b4..6989646627 100644--- a/docs/release-control/v6/internal/subsystems/monitoring.md+++ b/docs/release-control/v6/internal/subsystems/monitoring.md@@ -407,6 +407,7 @@ changes.35. `internal/mock/fixture_graph.go`35a. `internal/mock/action_fixtures.go`35b. `internal/mock/availability_fixtures.go`+35c. `internal/mock/recovery_points.go`36. `internal/dockeragent/docker_client.go`37. `pkg/agents/docker/report.go`38. `internal/models/models.go`@@ -432,6 +433,7 @@ changes.55. `internal/monitoring/resource_stale_thresholds.go`56. `internal/monitoring/recovery_ingest.go`56a. `internal/monitoring/pbs_protection_observation.go`+56b. `internal/monitoring/pve_protection_observation.go`57. `internal/monitoring/multi_tenant_monitor.go`58. `internal/monitoring/proxmox_action_observer.go`59. `internal/monitoring/agent_fleet_doctor.go`@@ -2501,7 +2503,18 @@ the same destination-scoped TLS and explicit plaintext policy as the host andDocker reporters. Observer acknowledgements never change the canonicalmonitoring configuration returned by the primary.-### PBS protection evidence collection+### Proxmox protection evidence collection++PVE backup-file enumeration follows the same explicit evidence boundary as+direct PBS collection. Every completed PVE cycle emits subject-linked recovery+points with provider scope and point evidence plus one typed observation for+the polled PVE instance. Full node and backup-storage enumeration records+complete history with sufficient permissions. Partial node or content success+records partial history, and total failure records unavailable history. A+partial or total authorization failure records partial or denied access+without deleting retained artifacts. The observation is persisted before+reconciliation, so cached backup files cannot continue presenting current+protection after collection becomes incomplete or unauthorized.Direct PBS backup enumeration emits two separate storage/recovery inputs:subject-linked recovery points and one typed provider observation for the@@ -2519,7 +2532,7 @@ for direct canonical identity and inferred only for an auditable uniqueprovider-scoped guest match. Monitoring persists the collection observationbefore point reconciliation so completeness and permission failure cannot belost behind a successful cached-artifact path. Shared protection semantics stay-in `internal/recovery/`; PBS monitoring owns only this explicit evidence-quality+in `internal/recovery/`; Proxmox monitoring owns only this explicit evidence-qualityadapter.### Alert-intent evidence adapters and UDP outcomesdiff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.jsonindex 44f4a864d9..4e10be0961 100644--- a/docs/release-control/v6/internal/subsystems/registry.json+++ b/docs/release-control/v6/internal/subsystems/registry.json@@ -5210,6 +5210,7 @@"internal/mock/fixture_graph.go","internal/mock/generator.go","internal/mock/platform_fixtures.go",+ "internal/mock/recovery_points.go","internal/models/converters.go","internal/models/deepcopy.go","internal/models/metrics_types.go",@@ -5554,7 +5555,8 @@"internal/mock/demo_scenarios.go","internal/mock/fixture_graph.go","internal/mock/generator.go",- "internal/mock/platform_fixtures.go"+ "internal/mock/platform_fixtures.go",+ "internal/mock/recovery_points.go"],"allow_same_subsystem_tests": false,"test_prefixes": [],@@ -5564,16 +5566,18 @@"internal/mock/demo_scenarios_test.go","internal/mock/generator_test.go","internal/mock/platform_fixtures_test.go",+ "internal/mock/recovery_points_test.go","tests/integration/tests/43-platform-mock-runtime.spec.ts"]},{"id": "pbs-protection-evidence-runtime",- "label": "PBS protection evidence collection proof",+ "label": "Proxmox protection evidence collection proof","match_prefixes": [],"match_files": ["internal/monitoring/monitor_backups.go","internal/monitoring/pbs_protection_observation.go",+ "internal/monitoring/pve_protection_observation.go","internal/monitoring/recovery_ingest.go"],"allow_same_subsystem_tests": false,@@ -5583,6 +5587,7 @@"internal/monitoring/monitor_backups_dir_storage_test.go","internal/monitoring/monitor_full_coverage_test.go","internal/monitoring/pbs_protection_observation_test.go",+ "internal/monitoring/pve_protection_observation_test.go","internal/monitoring/recovery_ingest_test.go","internal/recovery/mapper/proxmox/mapper_test.go","internal/recovery/posture_test.go"@@ -5656,6 +5661,7 @@"internal/monitoring/monitor_host_agents_test.go","internal/monitoring/monitor_pve_cluster_refresh_test.go","internal/monitoring/monitor_pve_guest_lxc_test.go",+ "internal/monitoring/pve_protection_observation_test.go","internal/monitoring/ratetracker_test.go","internal/monitoring/truenas_poller_test.go","internal/unifiedresources/code_standards_test.go"@@ -7350,6 +7356,7 @@"frontend-modern/src/features/kubernetes/__tests__/KubernetesStorageTable.test.tsx","frontend-modern/src/features/platformPage/__tests__/platformOverviewLayout.guardrails.test.ts","frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupServersTable.test.ts",+ "frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx","frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx","frontend-modern/src/features/proxmox/__tests__/ProxmoxNodesTable.test.tsx","frontend-modern/src/features/proxmox/__tests__/ProxmoxPageSurface.contract.test.tsx",diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex c62ddf5419..465edcdab1 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -13,6 +13,7 @@"api-contracts","cloud-paid","frontend-primitives",+ "monitoring","unified-resources"]}@@ -131,6 +132,7 @@ freshness.29. `internal/recovery/store/store_posture.go`30. `frontend-modern/src/hooks/useProtectionPostures.ts`31. `frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx`+32. `internal/mock/recovery_points.go`## Shared Boundaries@@ -2737,8 +2739,24 @@ resource-table batches, state-filtered attention lists, policy, evaluationtime, provider limitations, and evidence references. The Proxmox coveragesurface requests canonical resource IDs in batches of at most 200 and neverderives posture from raw PVE/PBS artifacts. Raw backup files, snapshots, tasks,-and provider state remain expandable recovery evidence. Missing or failed-posture reads render unknown rather than falling back to browser inference.+and provider state remain expandable recovery evidence. PVE task records use+the non-artifact `other` recovery kind: they may contribute attempt and outcome+context, but an `OK` task must not count as an available backup or mint+protected posture when provider inventory exposes no restore artifact. While the first+posture batch is unresolved, canonical workload rows render `Checking` rather+than fabricating a completed unknown result. Missing or failed posture reads+render unknown rather than falling back to browser inference. Host archives+and orphaned artifacts that have no current canonical workload identity render+`Not evaluated`, remain outside the four server posture states, and retain+their forensic recovery detail.++Runtime mock recovery points must project the same graph-owned PVE backup+files, PVE guest snapshots, PVE tasks, and PBS backups returned by the+source-native backup APIs. They attach the canonical Proxmox guest resource ID,+provider scope, and point evidence through the production mappers. A separate+three-subject sample generator or a hard cap that drops graph-owned backup+subjects is forbidden because it makes preview posture diverge from the table+inventory.The adjacent shared authentication boundary must remain live when storage orrecovery browser reads authenticated with local credentials overlap agentdiff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.mdindex 4c6d626dd6..e0a1997495 100644--- a/docs/release-control/v6/internal/subsystems/unified-resources.md+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md@@ -2235,9 +2235,11 @@ metadata.storage/recovery owns protection truth. Live VM/LXC rows carry the exactcanonical `Resource.id` into one bounded posture batch; the table must not parseits presentation key, VMID, name, node, or instance to mint a replacement-resource identity. Orphaned backup artifacts have no canonical live resource-ID and therefore render unknown posture while retaining their forensic backup-detail. Unified resources own row identity only; they do not derive backup+resource identity. Host and orphaned backup artifacts have no canonical live+workload resource ID and therefore render `Not evaluated` while retaining+their forensic backup detail. That presentation state is not a fifth server+posture and must not be counted as unknown provider evidence. Unified resources+own row identity only; they do not derive backupfreshness, provider completeness, verification, or protection state.### APT Product Trust browser projectiondiff --git a/frontend-modern/browser-verification.json b/frontend-modern/browser-verification.jsonindex 404fba00e7..16175a4f50 100644--- a/frontend-modern/browser-verification.json+++ b/frontend-modern/browser-verification.json@@ -1,113 +1,42 @@{"version": 1,- "base_sha": "2c0899e2086b4a2b9f501896dba5e5f894a41f66",- "verified_at": "2026-08-04T13:56:01Z",+ "base_sha": "39e8fe883471e48e265fc55fcc3e173f042647f8",+ "verified_at": "2026-08-04T14:06:47Z","result": "passed","changed_paths": [- "frontend-modern/src/features/docker/DockerContainerLifecycleControls.tsx",- "frontend-modern/src/features/docker/DockerContainersTable.tsx",- "frontend-modern/src/features/docker/DockerImagesTable.tsx",- "frontend-modern/src/features/docker/DockerNetworksTable.tsx",- "frontend-modern/src/features/docker/dockerContainerTableModel.ts",- "frontend-modern/src/features/kubernetes/KubernetesAutoscalingTable.tsx",- "frontend-modern/src/features/kubernetes/KubernetesConfigTable.tsx",- "frontend-modern/src/features/kubernetes/KubernetesControllersTable.tsx",- "frontend-modern/src/features/kubernetes/KubernetesNetworkingTable.tsx",- "frontend-modern/src/features/kubernetes/KubernetesPolicyTable.tsx",- "frontend-modern/src/features/kubernetes/KubernetesServicesTable.tsx",- "frontend-modern/src/features/kubernetes/KubernetesStorageTable.tsx",- "frontend-modern/src/features/platformPage/sharedPlatformPage.tsx",- "frontend-modern/src/features/proxmox/ProxmoxCephClusterDrawer.tsx",- "frontend-modern/src/features/proxmox/ProxmoxReplicationTable.tsx",- "frontend-modern/src/features/truenas/TrueNASProtectionTable.tsx",- "frontend-modern/src/features/truenas/TrueNASStorageTopologyTable.tsx",- "frontend-modern/src/features/vmware/VsphereHostsTable.tsx",- "frontend-modern/src/index.css"+ "frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx",+ "frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx",+ "frontend-modern/src/features/proxmox/proxmoxBackupRecoveryModel.ts"],"content_sha256": {- "frontend-modern/src/features/docker/DockerContainerLifecycleControls.tsx": "6626c80c0ff183ef69780362065ab59a627b827c8c8921dd8053a56afcb3fb96",- "frontend-modern/src/features/docker/DockerContainersTable.tsx": "c34d1c973266dbbe4b0de64fc1a1a3af668728cbfd839346b555d1178ec11942",- "frontend-modern/src/features/docker/DockerImagesTable.tsx": "bcccb52e92fe2031e5b4e9b02146d0700c4dd8b8a68b495e23037a51f980c7c5",- "frontend-modern/src/features/docker/DockerNetworksTable.tsx": "3aca178275b70399f32ee1c67168904294cd07551a66999e88f1225bd65271b4",- "frontend-modern/src/features/docker/dockerContainerTableModel.ts": "f997acf6196c492c7aa4e923768545ac3ccb891947d53e37f682359fa7ddb6f3",- "frontend-modern/src/features/kubernetes/KubernetesAutoscalingTable.tsx": "41ae0bcd794d6c4fb21e45cd5fee424fb98c408af82befb4ec57a86213da188d",- "frontend-modern/src/features/kubernetes/KubernetesConfigTable.tsx": "613780c1452feb8392d80d65ca585e474ebacc6919e69dec66c4d41f642fca22",- "frontend-modern/src/features/kubernetes/KubernetesControllersTable.tsx": "007a0a5b37a1055018a6ef0eeae06be9efe5331f23d87f77aaf32f5315f755f3",- "frontend-modern/src/features/kubernetes/KubernetesNetworkingTable.tsx": "d4fdcd6a7061b11b5a890b2e66dd93c44636a401b1afefed806d58b2336e5659",- "frontend-modern/src/features/kubernetes/KubernetesPolicyTable.tsx": "ef509df461f6d5e90911ebd0c0bd7a4d8c465cb43c6b4198a165d24011d5f30f",- "frontend-modern/src/features/kubernetes/KubernetesServicesTable.tsx": "ba9797ebab585bf633d8c9a49762da7239b3dd6aa89de439bafd4471242d7265",- "frontend-modern/src/features/kubernetes/KubernetesStorageTable.tsx": "f3cca1e796b77b92da9af1b8c66001d0b92fecfc199fc1e1f9e921d27978fee4",- "frontend-modern/src/features/platformPage/sharedPlatformPage.tsx": "f3a8799fe8fd60f6cf34b10167ed06d573c825feeb514cf9fd3c3e11e0e128ca",- "frontend-modern/src/features/proxmox/ProxmoxCephClusterDrawer.tsx": "70554e4eaf1434f5bfb88d710b17b638c7e838272244bd8472d79ba7e5e017c3",- "frontend-modern/src/features/proxmox/ProxmoxReplicationTable.tsx": "ad9ecf604b7060d4c96f531099e6e238ac3f47d9a2cd0ad5f1e5d82b64bb8293",- "frontend-modern/src/features/truenas/TrueNASProtectionTable.tsx": "bc68ee342610607a4951c5518c3c652bc54aafa471604b95537e90634a6dbddc",- "frontend-modern/src/features/truenas/TrueNASStorageTopologyTable.tsx": "60b5ee0447c3818c0beb6fdda1e1e73df71e94c51c82855016bcedf4ef267102",- "frontend-modern/src/features/vmware/VsphereHostsTable.tsx": "29ad8f8168af4ed5a63559b25663f04b9d668c58c03ea6d312ebc8f824f85aa8",- "frontend-modern/src/index.css": "e2461a68feb4d21062faa1131c2dd0f9c3c1469b1bcac15e487cc771ac5b7503"+ "frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx": "e8e18266f97f875318d79e9c2402e57d4811f6ef6453e2438d1bbffb1b676311",+ "frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx": "c73d79d7ab1d72dd021d759f90fb119a50e537689eb74980c8a7e9936e9b40f0",+ "frontend-modern/src/features/proxmox/proxmoxBackupRecoveryModel.ts": "3118d8ce7ed1f01793d7ecde38d633600ceb72cb4fe05afc93abfe9317f20233"},"routes": [- "/proxmox/overview",- "/proxmox/storage?tab=pools&source=proxmox-all",- "/proxmox/storage?tab=disks&source=proxmox-all",- "/proxmox/replication",- "/proxmox/backups?view=coverage",- "/proxmox/backups?view=date",- "/proxmox/ceph",- "/proxmox/mail",- "/docker/overview",- "/docker/images",- "/docker/storage",- "/docker/networks",- "/docker/swarm",- "/kubernetes/overview",- "/kubernetes/nodes",- "/kubernetes/workloads",- "/kubernetes/services",- "/kubernetes/storage",- "/kubernetes/configuration",- "/kubernetes/events",- "/truenas/overview",- "/truenas/storage",- "/truenas/services",- "/truenas/apps",- "/truenas/vms",- "/truenas/shares",- "/truenas/protection",- "/vmware/overview",- "/vmware/datastores",- "/vmware/networks",- "/vmware/health",- "/vmware/activity",- "/standalone/machines",- "/standalone/availability"+ "/proxmox/backups"],"viewports": [- { "width": 375, "height": 900 },- { "width": 540, "height": 900 },- { "width": 640, "height": 900 },- { "width": 768, "height": 900 },- { "width": 900, "height": 900 },- { "width": 1024, "height": 900 },- { "width": 1280, "height": 900 },- { "width": 1440, "height": 900 },- { "width": 1680, "height": 900 },- { "width": 1920, "height": 900 }+ {+ "width": 1280,+ "height": 800+ },+ {+ "width": 390,+ "height": 844+ }],"states": [- "All 34 primary platform routes loaded with the full mock inventory across Proxmox, Docker, Kubernetes, TrueNAS, VMware, and standalone machines",- "Every route was checked at ten viewport widths from 375px through 1920px for document overflow, table overflow, and clipped column headings",- "Compact tables preserved identity and immediate operating state before supporting metadata, while wider containers progressively restored secondary detail",- "Docker container columns responded to their measured table container, including the narrower assistant-open surface",- "Compact labels replaced long headings only where the full label would compete with operator-critical values",- "Nested Proxmox Ceph tables responded independently inside the expanded cluster drawer",- "All platform content roots retained aligned left edges and widths while switching between platforms"+ "Resolved coverage table with attention, unprotected, unknown, and not-evaluated posture rows",+ "Task-only workloads shown as unprotected with no restore point",+ "Unknown-only filter showing one genuinely indeterminate canonical workload",+ "Desktop and compact responsive coverage-table layouts"],"interactions": [- "Navigated all 34 routes and exercised Proxmox storage and backup query variants",- "Resized every route through 375, 540, 640, 768, 900, 1024, 1280, 1440, 1680, and 1920px",- "Opened the Docker container compact lifecycle menu and confirmed Start, Stop, and Restart remain reachable within the viewport",- "Opened the assistant at 1280px and switched between Docker, Kubernetes, and VMware while checking container-relative layouts",- "Expanded Proxmox Ceph cluster detail and inspected its nested pool and service tables",- "Repeated strict zero-pixel clipping checks after the final Kubernetes autoscaling label adjustment"+ "Signed in to the managed local preview and opened Proxmox Backups",+ "Selected the Unknown posture filter and confirmed the result count",+ "Cleared the posture filter",+ "Inspected desktop and 390x844 responsive layouts",+ "Checked browser console warnings and errors"]}diff --git a/frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsxindex a9fc34d8fa..90a22146df 100644--- a/frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx+++ b/frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx@@ -253,6 +253,7 @@ export const ProxmoxBackupsTable: Component<{tasks: tasks(),nowMs: nowMs(),protectionPostures: protectionPostures.postureByResourceID(),+ protectionPosturesResolved: protectionPostures.resolvedOnce(),}),);@@ -350,6 +351,8 @@ export const ProxmoxBackupsTable: Component<{attention: live.filter((row) => row.posture === 'attention').length,unprotected: live.filter((row) => row.posture === 'unprotected').length,unknown: live.filter((row) => row.posture === 'unknown').length,+ checking: live.filter((row) => row.posture === 'checking').length,+ notEvaluated: live.filter((row) => row.posture === 'not-evaluated').length,};});const view = (): BackupView =>@@ -615,6 +618,20 @@ export const ProxmoxBackupsTable: Component<{toneClass: 'bg-slate-400',muted: liveHealthSummary().unknown === 0,},+ {+ key: 'checking',+ value: liveHealthSummary().checking,+ label: 'checking',+ toneClass: 'bg-blue-400',+ muted: liveHealthSummary().checking === 0,+ },+ {+ key: 'not-evaluated',+ value: liveHealthSummary().notEvaluated,+ label: 'not evaluated',+ toneClass: 'bg-slate-300 dark:bg-slate-600',+ muted: liveHealthSummary().notEvaluated === 0,+ },]}/>diff --git a/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsxindex a53e4e7751..a528d850be 100644--- a/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx+++ b/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx@@ -44,6 +44,7 @@ const coveragePostureVariant = (if (posture === 'protected') return 'success';if (posture === 'unprotected') return 'danger';if (posture === 'attention') return 'warning';+ if (posture === 'checking') return 'info';return 'muted';};@@ -75,6 +76,15 @@ const evidenceQualityLabel = (value: string): string => {return value.charAt(0).toUpperCase() + value.slice(1);};+const postureExplanation = (row: WorkloadCoverageRow): string => {+ if (row.protectionPosture?.explanation) return row.protectionPosture.explanation;+ if (row.posture === 'checking') return 'Pulse is checking provider protection evidence.';+ if (row.posture === 'not-evaluated') {+ return 'This backup target has no current canonical workload identity, so Pulse does not evaluate workload protection for it.';+ }+ return 'Pulse does not have enough provider evidence to determine protection.';+};+// "Workload coverage" table: one row per workload answering "does this have a// backup?" across PBS snapshots / PVE backup files / guest snapshots, each// expanding to its restore evidence. Presentational — the parent owns the@@ -322,14 +332,11 @@ export function ProxmoxCoverageTable(props: {<StatusDotsize="sm"variant={coveragePostureVariant(row.posture)}- title={- row.protectionPosture?.explanation ??- 'Pulse does not have enough provider evidence to determine protection.'- }+ title={postureExplanation(row)}ariaHidden/><span- title={row.protectionPosture?.explanation}+ title={postureExplanation(row)}class={`truncate text-[11px] font-medium ${statusWordToneClass(coveragePostureVariant(row.posture),)}`}@@ -458,8 +465,7 @@ export function ProxmoxCoverageTable(props: {<span class="font-medium">{getWorkloadRecoveryPostureLabel(row.posture)}:</span>{' '}- {row.protectionPosture?.explanation ??- 'Pulse cannot determine this workload’s protection because no complete provider evidence is linked to it.'}+ {postureExplanation(row)}</div><Show when={(row.protectionPosture?.providerStates.length ?? 0) > 0}><div class="mb-2 overflow-hidden rounded-md border border-border-subtle">diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsxindex 986907d7b5..7d93f70044 100644--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx@@ -14,6 +14,7 @@ import {import { TABLE_CARD_FRAME_CLASS } from '@/components/shared/TableCard';import type { Resource } from '@/types/resource';import { getRecoveryFullDateLabel } from '@/utils/recoveryDatePresentation';+import { resetCreateNonSuspendingQueryCacheForTest } from '@/hooks/createNonSuspendingQuery';// ProxmoxBackupsTable reads URL search params (node/type scope filters), so it// must render inside a Router context.@@ -199,9 +200,60 @@ afterEach(() => {window.history.replaceState({}, '', '/');apiFetchMock.mockReset();apiFetchJSONMock.mockReset();+ resetCreateNonSuspendingQueryCacheForTest();});describe('ProxmoxBackupsTable', () => {+ it('shows Checking until the canonical posture request resolves', async () => {+ mockBackupAPIs();+ let resolvePosture: ((value: unknown) => void) | undefined;+ apiFetchJSONMock.mockReturnValue(+ new Promise((resolve) => {+ resolvePosture = resolve;+ }),+ );+ window.history.replaceState({}, '', '/?view=coverage');++ renderInRouter(() => (+ <ProxmoxBackupsTable emptyIcon={<span />} workloads={[workloadResource]} />+ ));++ await screen.findAllByText('pbs-docker');+ expect(screen.getAllByText('Checking').length).toBeGreaterThan(0);++ resolvePosture?.({+ data: [+ {+ subjectResourceId: 'ct-112',+ state: 'protected',+ freshness: 'current',+ verification: 'verified',+ coverage: 'complete',+ providerStates: [],+ repositoryResourceIds: [],+ evidenceIds: ['evidence-1'],+ explanation: 'A current verified backup is available.',+ evaluatedAt: '2026-05-25T02:05:00Z',+ },+ ],+ policy: {+ freshnessWindowSeconds: 604800,+ verificationWindowSeconds: 604800,+ requireVerification: true,+ },+ meta: { page: 1, limit: 200, total: 1, totalPages: 1 },+ });++ await waitFor(() =>+ expect(+ screen+ .getAllByTitle('A current verified backup is available.')+ .some((element) => element.textContent === 'Protected'),+ ).toBe(true),+ );+ expect(screen.queryByText('Checking')).not.toBeInTheDocument();+ });+it('defaults to coverage when protection needs attention and keeps the dated feed one click away', async () => {mockBackupAPIs('attention');diff --git a/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupRecoveryModel.branchcov.test.ts b/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupRecoveryModel.branchcov.test.tsindex 10349bb07b..8ae3acda04 100644--- a/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupRecoveryModel.branchcov.test.ts+++ b/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupRecoveryModel.branchcov.test.ts@@ -108,6 +108,8 @@ describe('getWorkloadRecoveryPostureLabel uncovered switch cases', () => {['attention', 'Needs attention'],['unprotected', 'Unprotected'],['unknown', 'Unknown'],+ ['checking', 'Checking'],+ ['not-evaluated', 'Not evaluated'],])('renders posture %s as %j', (posture, expected) => {expect(getWorkloadRecoveryPostureLabel(posture)).toBe(expected);});diff --git a/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupRecoveryModel.test.ts b/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupRecoveryModel.test.tsindex 09cd66dbb1..543d0fd54c 100644--- a/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupRecoveryModel.test.ts+++ b/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupRecoveryModel.test.ts@@ -196,6 +196,23 @@ describe('proxmoxBackupRecoveryModel', () => {expect(model.coverageSummary.unprotected).toBe(1);});+ it('distinguishes an in-flight posture read from a completed unknown evaluation', () => {+ const resource = workload({ id: 'vm-202', proxmox: { vmid: 202, node: 'delly' } });+ const model = buildProxmoxBackupRecoveryModel({+ workloads: [resource],+ pbsBackups: [],+ archives: [],+ snapshots: [],+ tasks: [],+ nowMs: Date.parse('2026-05-26T08:00:00Z'),+ protectionPosturesResolved: false,+ });++ expect(model.coverageRows[0].posture).toBe('checking');+ expect(getWorkloadRecoveryPostureLabel(model.coverageRows[0].posture)).toBe('Checking');+ expect(model.coverageSummary.unknown).toBe(0);+ });+it('does not treat a linked Pulse agent facet as recovery evidence or authority', () => {const model = buildProxmoxBackupRecoveryModel({workloads: [@@ -291,6 +308,8 @@ describe('proxmoxBackupRecoveryModel', () => {expect(model.coverageRows[0].workload.type).toBe('host');expect(model.coverageRows[0].workload.vmid).toBe('mail-gateway');expect(model.coverageRows[0].workload.label).toBe('Host mail-gateway');+ expect(model.coverageRows[0].posture).toBe('not-evaluated');+ expect(getWorkloadRecoveryPostureLabel(model.coverageRows[0].posture)).toBe('Not evaluated');expect(model.coverageRows[0].pbsCount).toBe(1);expect(model.coverageRows[0].archiveCount).toBe(1);expect(model.recoverableArtifacts.map((artifact) => artifact.workload.label)).toEqual(diff --git a/frontend-modern/src/features/proxmox/proxmoxBackupRecoveryModel.ts b/frontend-modern/src/features/proxmox/proxmoxBackupRecoveryModel.tsindex dee38ede44..6af08fd738 100644--- a/frontend-modern/src/features/proxmox/proxmoxBackupRecoveryModel.ts+++ b/frontend-modern/src/features/proxmox/proxmoxBackupRecoveryModel.ts@@ -10,7 +10,10 @@ import {export type RecoverableSourceKind = ProxmoxBackupSourceKind;-export type WorkloadRecoveryPosture = ProtectionState;+// `checking` and `not-evaluated` are presentation states, not server posture+// states. They prevent an in-flight request or a non-canonical host/orphan row+// from being mislabeled as a completed `unknown` evaluation.+export type WorkloadRecoveryPosture = ProtectionState | 'checking' | 'not-evaluated';export interface WorkloadReference {key: string;@@ -99,6 +102,7 @@ interface BuildModelInput {tasks: readonly BackupTask[];nowMs: number;protectionPostures?: ReadonlyMap<string, ProtectionPosture>;+ protectionPosturesResolved?: boolean;}interface WorkloadCandidate extends WorkloadReference {@@ -401,7 +405,9 @@ function protectionPostureRank(posture: WorkloadRecoveryPosture): number {if (posture === 'attention') return 0;if (posture === 'unprotected') return 1;if (posture === 'unknown') return 2;- return 3;+ if (posture === 'checking') return 3;+ if (posture === 'protected') return 4;+ return 5;}export function getWorkloadRecoveryPostureLabel(posture: WorkloadRecoveryPosture): string {@@ -414,6 +420,10 @@ export function getWorkloadRecoveryPostureLabel(posture: WorkloadRecoveryPosturereturn 'Unprotected';case 'unknown':return 'Unknown';+ case 'checking':+ return 'Checking';+ case 'not-evaluated':+ return 'Not evaluated';}}@@ -570,7 +580,13 @@ export function buildProxmoxBackupRecoveryModel(const protectionPosture = row.workload.resourceId? input.protectionPostures?.get(row.workload.resourceId): undefined;- const posture = protectionPosture?.state ?? 'unknown';+ const posture: WorkloadRecoveryPosture = protectionPosture?.state+ ? protectionPosture.state+ : !row.workload.resourceId+ ? 'not-evaluated'+ : input.protectionPosturesResolved === false+ ? 'checking'+ : 'unknown';return {...row,posture,diff --git a/internal/mock/recovery_points.go b/internal/mock/recovery_points.goindex 61f0ea3971..e44407e8cc 100644--- a/internal/mock/recovery_points.go+++ b/internal/mock/recovery_points.go@@ -10,22 +10,29 @@ import ("github.com/rcourtman/pulse-go-rewrite/internal/models""github.com/rcourtman/pulse-go-rewrite/internal/recovery"+ proxmoxmapper "github.com/rcourtman/pulse-go-rewrite/internal/recovery/mapper/proxmox"truenasmapper "github.com/rcourtman/pulse-go-rewrite/internal/recovery/mapper/truenas""github.com/rcourtman/pulse-go-rewrite/internal/truenas"+ "github.com/rcourtman/pulse-go-rewrite/internal/unifiedresources")func (g FixtureGraph) RecoveryPoints() []recovery.RecoveryPoint {- return generateMockRecoveryPoints(g.State, g.PlatformFixtures)+ resources, _ := g.UnifiedResourceSnapshot()+ return generateMockRecoveryPoints(g.State, g.PlatformFixtures, resources)}-func generateMockRecoveryPoints(snapshot models.StateSnapshot, fixtures PlatformFixtures) []recovery.RecoveryPoint {+func generateMockRecoveryPoints(+ snapshot models.StateSnapshot,+ fixtures PlatformFixtures,+ resources []unifiedresources.Resource,+) []recovery.RecoveryPoint {// Anchor timestamps to midnight UTC so results are stable across requests// (pagination, sorting) while still staying within the "last 30 days" window.anchor := time.Now().UTC().Truncate(24 * time.Hour)clusters := recoveryKubernetesClusters(snapshot)- points := make([]recovery.RecoveryPoint, 0, 64)+ points := make([]recovery.RecoveryPoint, 0, 192)boolPtr := func(v bool) *bool { return &v }int64Ptr := func(v int64) *int64 { return &v }@@ -226,121 +233,14 @@ func generateMockRecoveryPoints(snapshot models.StateSnapshot, fixtures Platform}}- // Proxmox: a few guest subjects with multiple backup points each.- // This keeps the Backups page platform-agnostic while still showing familiar PVE/PBS-like artifacts.- proxmoxSubjects := recoveryProxmoxSubjects(snapshot)- for si, s := range proxmoxSubjects {- for i := 0; i < 5; i++ {- ageDays := 2 + (si*8+i*6)%27- started := anchor.AddDate(0, 0, -ageDays).Add(time.Duration((6+si*4+i*3)%23) * time.Hour).Add(time.Duration((i%7)*5) * time.Minute)-- outcome := recovery.OutcomeSuccess- status := "ok"- errText := ""- switch i % 5 {- case 0, 1, 2:- outcome = recovery.OutcomeSuccess- status = "ok"- case 3:- outcome = recovery.OutcomeWarning- status = "warning"- default:- outcome = recovery.OutcomeFailed- status = "error"- errText = "backup failed: I/O error"- }-- // Keep the newest one sometimes running.- var completedAt *time.Time- if i == 0 && si%2 == 0 {- outcome = recovery.OutcomeRunning- status = "running"- completedAt = nil- } else {- t := started.Add(time.Duration(7+(i%8)) * time.Minute)- completedAt = &t- }-- guestType := "proxmox-guest"- if s.typ == "vm" {- guestType = "proxmox-vm"- } else if s.typ == "lxc" {- guestType = "proxmox-lxc"- }-- sourceID := rpStableID("proxmox", "guest", s.instance, s.node, rpItoa(s.vmid))- backupID := rpStableID("proxmox", "backup", s.instance, s.node, rpItoa(s.vmid), rpTimeKey(completedAt, &started))-- mode := recovery.ModeLocal- if s.isPBS {- mode = recovery.ModeRemote- }-- var verified *bool- if s.isPBS && completedAt != nil {- verified = boolPtr(i%3 == 0)- }- var immutable *bool- if completedAt != nil {- if i%4 == 0 {- immutable = boolPtr(true)- } else if i%4 == 1 {- immutable = boolPtr(false)- }- }- var encrypted *bool- if s.isPBS {- if i%4 == 0 {- encrypted = boolPtr(true)- } else if i%4 == 1 {- encrypted = boolPtr(false)- }- }-- var sizeBytes *int64- if completedAt != nil && i%2 == 0 {- sizeBytes = int64Ptr(15_000_000_000 + int64(si)*4_000_000_000 + int64(i)*1_500_000_000)- }-- points = append(points, recovery.RecoveryPoint{- ID: "pve-backup:" + backupID,- Provider: recovery.ProviderProxmoxPVE,- Kind: recovery.KindBackup,- Mode: mode,- Outcome: outcome,- StartedAt: rpPtrTime(started),- CompletedAt: completedAt,- SizeBytes: sizeBytes,- Verified: verified,- Encrypted: encrypted,- Immutable: immutable,- SubjectRef: &recovery.ExternalRef{- Type: guestType,- Namespace: s.instance,- Name: s.name,- ID: sourceID,- Class: s.node,- },- RepositoryRef: &recovery.ExternalRef{- Type: "proxmox-storage",- Namespace: s.instance,- Name: s.storage,- Class: s.node,- },- Details: map[string]any{- "type": s.typ,- "instance": s.instance,- "node": s.node,- "vmid": s.vmid,- "storage": s.storage,- "isPBS": s.isPBS,- "status": status,- "lastError": errText,- "notes": "scheduled",- },- })- }- }+ // Proxmox recovery is projected from the same canonical fixture inventories+ // consumed by the Backups page. Independent sample points drifted away from+ // live workload IDs and made every server-owned posture look unknown.+ points = append(points, mockProxmoxRecoveryPoints(+ snapshot,+ resources,+ mockRecoveryIngestedAt(snapshot),+ )...)// TrueNAS: reuse the provider-native recovery artifact model so demo-mode// recovery mirrors the same contract as live TrueNAS reads.@@ -379,12 +279,198 @@ func generateMockRecoveryPoints(snapshot models.StateSnapshot, fixtures Platformreturn a.ID > b.ID})- // Hard cap within requested range, while keeping at least 30 points.- if len(points) > 80 {- points = points[:80]+ return points+}++func mockProxmoxRecoveryPoints(+ snapshot models.StateSnapshot,+ resources []unifiedresources.Resource,+ ingestedAt time.Time,+) []recovery.RecoveryPoint {+ guestInfo, candidates := mockProxmoxRecoverySubjects(snapshot, resources)+ out := make([]recovery.RecoveryPoint, 0,+ len(snapshot.PVEBackups.StorageBackups)++ len(snapshot.PVEBackups.GuestSnapshots)++ len(snapshot.PVEBackups.BackupTasks)++ len(snapshot.PBSBackups),+ )++ appendMapped := func(points []recovery.RecoveryPoint, err error) {+ if err == nil {+ out = append(out, points...)+ }+ }+ appendMapped(proxmoxmapper.FromPVEStorageBackupsWithEvidence(+ snapshot.PVEBackups.StorageBackups,+ guestInfo,+ ingestedAt,+ ))+ appendMapped(proxmoxmapper.FromPVEGuestSnapshotsWithEvidence(+ snapshot.PVEBackups.GuestSnapshots,+ guestInfo,+ ingestedAt,+ ))+ appendMapped(proxmoxmapper.FromPVEBackupTasksWithEvidence(+ snapshot.PVEBackups.BackupTasks,+ guestInfo,+ ingestedAt,+ ))+ appendMapped(proxmoxmapper.FromPBSBackupsWithEvidence(+ snapshot.PBSBackups,+ candidates,+ ingestedAt,+ ))+ return out+}++func mockRecoveryIngestedAt(snapshot models.StateSnapshot) time.Time {+ var latest time.Time+ consider := func(candidate time.Time) {+ if candidate.After(latest) {+ latest = candidate.UTC()+ }+ }+ for _, backup := range snapshot.PVEBackups.StorageBackups {+ consider(backup.Time)+ }+ for _, point := range snapshot.PVEBackups.GuestSnapshots {+ consider(point.Time)+ }+ for _, task := range snapshot.PVEBackups.BackupTasks {+ consider(task.StartTime)+ consider(task.EndTime)+ }+ for _, backup := range snapshot.PBSBackups {+ consider(backup.BackupTime)+ }+ if latest.IsZero() {+ return time.Now().UTC()}+ return latest.Add(time.Second)+}- return points+func mockProxmoxRecoverySubjects(+ snapshot models.StateSnapshot,+ resources []unifiedresources.Resource,+) (+ map[string]proxmoxmapper.GuestInfo,+ map[string][]proxmoxmapper.GuestCandidate,+) {+ guestInfo := make(map[string]proxmoxmapper.GuestInfo, len(snapshot.VMs)+len(snapshot.Containers))+ candidates := make(map[string][]proxmoxmapper.GuestCandidate, len(snapshot.VMs)+len(snapshot.Containers))+ type guestCoordinate struct {+ node string+ vmid int+ }+ byCoordinate := make(map[guestCoordinate][]proxmoxmapper.GuestInfo)+ seenResourceIDs := make(map[string]struct{}, len(snapshot.VMs)+len(snapshot.Containers))++ appendGuest := func(+ resourceID string,+ resourceType unifiedresources.ResourceType,+ backupType, instance, node, name, sourceID string,+ vmid int,+ ) {+ instance = strings.TrimSpace(instance)+ node = strings.TrimSpace(node)+ if instance == "" || node == "" || vmid <= 0 {+ return+ }+ resourceID = strings.TrimSpace(resourceID)+ if resourceID == "" {+ resourceID = unifiedresources.ProxmoxGuestCanonicalID(resourceType, instance, vmid)+ }+ if sourceID = strings.TrimSpace(sourceID); sourceID == "" {+ sourceID = fmt.Sprintf("%s:%s:%d", instance, node, vmid)+ }+ info := proxmoxmapper.GuestInfo{+ ResourceID: resourceID,+ SourceID: sourceID,+ ResourceType: resourceType,+ Name: strings.TrimSpace(name),+ }+ guestInfo[fmt.Sprintf("%s|%s|%d", instance, node, vmid)] = info+ coordinate := guestCoordinate{node: node, vmid: vmid}+ byCoordinate[coordinate] = append(byCoordinate[coordinate], info)+ if _, seen := seenResourceIDs[resourceID]; seen {+ return+ }+ seenResourceIDs[resourceID] = struct{}{}+ key := backupType + ":" + rpItoa(vmid)+ candidates[key] = append(candidates[key], proxmoxmapper.GuestCandidate{+ ResourceID: resourceID,+ SourceID: sourceID,+ ResourceType: resourceType,+ DisplayName: strings.TrimSpace(name),+ InstanceName: instance,+ NodeName: node,+ VMID: vmid,+ BackupTypeKey: backupType,+ })+ }++ for _, resource := range resources {+ if resource.Proxmox == nil || resource.Proxmox.Template {+ continue+ }+ backupType := ""+ switch resource.Type {+ case unifiedresources.ResourceTypeVM:+ backupType = "vm"+ case unifiedresources.ResourceTypeSystemContainer:+ backupType = "ct"+ default:+ continue+ }+ appendGuest(+ resource.ID,+ resource.Type,+ backupType,+ resource.Proxmox.Instance,+ resource.Proxmox.NodeName,+ resource.Name,+ resource.Proxmox.SourceID,+ resource.Proxmox.VMID,+ )+ }++ // Preserve a defensive fallback for a malformed fixture graph, but prefer+ // the registry-owned IDs above. They include identity successions and merge+ // decisions that cannot be reconstructed safely from a backup record.+ for _, vm := range snapshot.VMs {+ coordinate := guestCoordinate{node: strings.TrimSpace(vm.Node), vmid: vm.VMID}+ if !vm.Template && len(byCoordinate[coordinate]) == 0 {+ appendGuest("", unifiedresources.ResourceTypeVM, "vm", vm.Instance, vm.Node, vm.Name, vm.ID, vm.VMID)+ }+ }+ for _, container := range snapshot.Containers {+ coordinate := guestCoordinate{node: strings.TrimSpace(container.Node), vmid: container.VMID}+ if !container.Template && len(byCoordinate[coordinate]) == 0 {+ appendGuest("", unifiedresources.ResourceTypeSystemContainer, "ct", container.Instance, container.Node, container.Name, container.ID, container.VMID)+ }+ }++ bindProviderAlias := func(instance, node string, vmid int) {+ instance = strings.TrimSpace(instance)+ node = strings.TrimSpace(node)+ if instance == "" || node == "" || vmid <= 0 {+ return+ }+ matches := byCoordinate[guestCoordinate{node: node, vmid: vmid}]+ if len(matches) == 1 {+ guestInfo[fmt.Sprintf("%s|%s|%d", instance, node, vmid)] = matches[0]+ }+ }+ for _, backup := range snapshot.PVEBackups.StorageBackups {+ bindProviderAlias(backup.Instance, backup.Node, backup.VMID)+ }+ for _, point := range snapshot.PVEBackups.GuestSnapshots {+ bindProviderAlias(point.Instance, point.Node, point.VMID)+ }+ for _, task := range snapshot.PVEBackups.BackupTasks {+ bindProviderAlias(task.Instance, task.Node, task.VMID)+ }+ return guestInfo, candidates}func rebaseTrueNASRecoverySnapshot(snapshot truenas.FixtureSnapshot, targetLatest time.Time) truenas.FixtureSnapshot {@@ -458,16 +544,6 @@ type mockRecoveryPVCSubject struct {class string}-type mockProxmoxRecoverySubject struct {- instance string- node string- vmid int- typ string- name string- storage string- isPBS bool-}-func recoveryKubernetesClusters(snapshot models.StateSnapshot) []mockRecoveryCluster {clusters := make([]mockRecoveryCluster, 0, len(snapshot.KubernetesClusters))seen := make(map[string]struct{}, len(snapshot.KubernetesClusters))@@ -559,64 +635,6 @@ func mockRecoveryPVCUID(clusterName, namespace, pvc string) string {)}-func recoveryProxmoxSubjects(snapshot models.StateSnapshot) []mockProxmoxRecoverySubject {- subjects := make([]mockProxmoxRecoverySubject, 0, 3)- seen := map[string]struct{}{}-- remoteStorage := "pbs-1"- if len(snapshot.PBSInstances) > 0 {- if candidate := strings.TrimSpace(snapshot.PBSInstances[0].Name); candidate != "" {- remoteStorage = candidate- }- }- localStorage := "local-zfs"-- appendSubject := func(instance, node string, vmid int, typ, name string, preferPBS bool) {- if len(subjects) >= 3 {- return- }- key := strings.TrimSpace(typ) + ":" + strings.TrimSpace(instance) + ":" + strings.TrimSpace(node) + ":" + rpItoa(vmid)- if _, ok := seen[key]; ok {- return- }- seen[key] = struct{}{}-- storage := localStorage- isPBS := false- if preferPBS {- storage = remoteStorage- isPBS = true- }-- subjects = append(subjects, mockProxmoxRecoverySubject{- instance: strings.TrimSpace(instance),- node: strings.TrimSpace(node),- vmid: vmid,- typ: strings.TrimSpace(typ),- name: strings.TrimSpace(name),- storage: storage,- isPBS: isPBS,- })- }-- for index, vm := range snapshot.VMs {- appendSubject(vm.Instance, vm.Node, vm.VMID, "vm", firstNonEmptyTrimmed(vm.Name, vm.ID), index%2 == 0)- }- for index, container := range snapshot.Containers {- appendSubject(container.Instance, container.Node, container.VMID, "lxc", firstNonEmptyTrimmed(container.Name, container.ID), index%2 == 0)- }-- if len(subjects) > 0 {- return subjects- }-- return []mockProxmoxRecoverySubject{- {instance: "pve-1", node: "pve-a", vmid: 101, typ: "vm", name: "web-01", storage: "pbs-1", isPBS: true},- {instance: "pve-1", node: "pve-a", vmid: 102, typ: "vm", name: "db-01", storage: "local-zfs", isPBS: false},- {instance: "pve-2", node: "pve-b", vmid: 201, typ: "lxc", name: "cache-01", storage: "pbs-1", isPBS: true},- }-}-func firstNonEmptyTrimmed(values ...string) string {for _, value := range values {if trimmed := strings.TrimSpace(value); trimmed != "" {diff --git a/internal/mock/recovery_points_test.go b/internal/mock/recovery_points_test.goindex 28589e011c..06364a2091 100644--- a/internal/mock/recovery_points_test.go+++ b/internal/mock/recovery_points_test.go@@ -6,6 +6,8 @@ import ("time""github.com/rcourtman/pulse-go-rewrite/internal/recovery"+ proxmoxmapper "github.com/rcourtman/pulse-go-rewrite/internal/recovery/mapper/proxmox"+ "github.com/rcourtman/pulse-go-rewrite/internal/unifiedresources")func TestCurrentFixtureGraphReturnsDefensiveCopies(t *testing.T) {@@ -98,15 +100,12 @@ func TestFixtureGraphRecoveryPointsDeriveSubjectsFromCurrentGraph(t *testing.T)}}- guestNames := make(map[string]struct{}, len(graph.State.VMs)+len(graph.State.Containers))- for _, guest := range graph.State.VMs {- if guest.Name != "" {- guestNames[guest.Name] = struct{}{}- }- }- for _, guest := range graph.State.Containers {- if guest.Name != "" {- guestNames[guest.Name] = struct{}{}+ resources, _ := graph.UnifiedResourceSnapshot()+ guestResourceIDs := make(map[string]struct{}, len(graph.State.VMs)+len(graph.State.Containers))+ for _, resource := range resources {+ if resource.Type == unifiedresources.ResourceTypeVM ||+ resource.Type == unifiedresources.ResourceTypeSystemContainer {+ guestResourceIDs[resource.ID] = struct{}{}}}@@ -137,8 +136,8 @@ func TestFixtureGraphRecoveryPointsDeriveSubjectsFromCurrentGraph(t *testing.T)foundKubernetes = true}}- case recovery.ProviderProxmoxPVE:- if _, ok := guestNames[point.SubjectRef.Name]; ok {+ case recovery.ProviderProxmoxPVE, recovery.ProviderProxmoxPBS:+ if _, ok := guestResourceIDs[point.SubjectResourceID]; ok {foundProxmox = true}case recovery.ProviderTrueNAS:@@ -159,6 +158,77 @@ func TestFixtureGraphRecoveryPointsDeriveSubjectsFromCurrentGraph(t *testing.T)}}+func TestFixtureGraphRecoveryPointsUseCanonicalProxmoxBackupInventories(t *testing.T) {+ previous := IsMockEnabled()+ mustSetEnabled(t, true)+ t.Cleanup(func() { mustSetEnabled(t, previous) })++ graph := CurrentFixtureGraph()+ resources, _ := graph.UnifiedResourceSnapshot()+ guestInfo, _ := mockProxmoxRecoverySubjects(graph.State, resources)+ guestResourceIDs := make(map[string]struct{})+ for _, resource := range resources {+ if resource.Type == unifiedresources.ResourceTypeVM ||+ resource.Type == unifiedresources.ResourceTypeSystemContainer {+ guestResourceIDs[resource.ID] = struct{}{}+ }+ }+ if _, err := proxmoxmapper.FromPVEStorageBackupsWithEvidence(+ graph.State.PVEBackups.StorageBackups,+ guestInfo,+ mockRecoveryIngestedAt(graph.State),+ ); err != nil {+ t.Fatalf("map canonical PVE fixture inventory: %v", err)+ }+ points := graph.RecoveryPoints()+ pointIDs := make(map[string]recovery.RecoveryPoint, len(points))+ for _, point := range points {+ pointIDs[point.ID] = point+ }++ assertLinked := func(id string) {+ t.Helper()+ point, ok := pointIDs[id]+ if !ok {+ t.Fatalf("expected canonical recovery point %q", id)+ }+ if strings.TrimSpace(point.SubjectResourceID) == "" {+ t.Fatalf("recovery point %q has no canonical subject resource ID", id)+ }+ if _, ok := guestResourceIDs[point.SubjectResourceID]; !ok {+ t.Fatalf(+ "recovery point %q subject %q is not owned by the current unified graph",+ id,+ point.SubjectResourceID,+ )+ }+ if strings.TrimSpace(point.ProviderScope) == "" || point.Evidence == nil {+ t.Fatalf("recovery point %q is missing provider-scoped evidence", id)+ }+ }++ for _, backup := range graph.State.PVEBackups.StorageBackups {+ if backup.VMID > 0 && (backup.Type == "qemu" || backup.Type == "vm" || backup.Type == "lxc" || backup.Type == "ct") {+ assertLinked("pve-backup:" + strings.TrimSpace(backup.ID))+ }+ }+ for _, snapshot := range graph.State.PVEBackups.GuestSnapshots {+ if snapshot.VMID > 0 {+ assertLinked("pve-snapshot:" + strings.TrimSpace(snapshot.ID))+ }+ }+ for _, task := range graph.State.PVEBackups.BackupTasks {+ if task.VMID > 0 {+ assertLinked("pve-task:" + strings.TrimSpace(task.ID))+ }+ }+ for _, backup := range graph.State.PBSBackups {+ if strings.TrimSpace(backup.VMID) != "" && strings.TrimSpace(backup.VMID) != "0" {+ assertLinked("pbs-backup:" + strings.TrimSpace(backup.ID))+ }+ }+}+func TestFixtureGraphRecoveryPointsKeepTrueNASArtifactsFreshForDemoMode(t *testing.T) {previous := IsMockEnabled()mustSetEnabled(t, true)diff --git a/internal/monitoring/monitor_backups.go b/internal/monitoring/monitor_backups.goindex c46264d247..cc09e1094a 100644--- a/internal/monitoring/monitor_backups.go+++ b/internal/monitoring/monitor_backups.go@@ -153,11 +153,13 @@ func (m *Monitor) pollStorageBackupsWithNodes(ctx context.Context, instanceNamehasPBSDirectConnection := m.config != nil && len(m.config.PBSInstances) > 0seenVolids := make(map[string]bool) // Track seen volume IDs to avoid duplicateshadSuccessfulNode := false // Track if at least one node responded successfully+ successfulNodeQueries := 0 // Number of nodes whose storage list was enumeratedstoragesWithBackup := 0 // Number of storages that should contain backupscontentSuccess := 0 // Number of successful storage content fetchescontentFailures := 0 // Number of failed storage content fetchesstorageQueryErrors := 0 // Number of nodes where storage list could not be queriedhadPermissionError := false // Track if any permission errors occurred this cycle+ permissionFailureCount := 0 // Number of node/storage reads rejected by authorizationstoragePreserveNeeded := map[string]struct{}{}storageSuccess := map[string]struct{}{}readState := m.backupReadStateForInstance(instanceName)@@ -204,6 +206,10 @@ func (m *Monitor) pollStorageBackupsWithNodes(ctx context.Context, instanceName}if err != nil {+ if isPVEBackupPermissionError(err) {+ hadPermissionError = true+ permissionFailureCount+++ }monErr := errors.NewMonitorError(errors.ErrorTypeAPI, "get_storage_for_backups", instanceName, err).WithNode(node.Node)log.Warn().Err(monErr).Str("node", node.Node).Msg("failed to get storage for backups - skipping node")for _, storageName := range storageNamesForNode(readState, instanceName, node.Node) {@@ -214,6 +220,7 @@ func (m *Monitor) pollStorageBackupsWithNodes(ctx context.Context, instanceName}hadSuccessfulNode = true+ successfulNodeQueries++// For each storage that can contain backups or templatesfor _, storage := range storages {@@ -231,12 +238,10 @@ func (m *Monitor) pollStorageBackupsWithNodes(ctx context.Context, instanceNamecontents, err := client.GetStorageContent(ctx, node.Node, storage.Storage)if err != nil {monErr := errors.NewMonitorError(errors.ErrorTypeAPI, "get_storage_content", instanceName, err).WithNode(node.Node)- errStr := strings.ToLower(err.Error())-// Check if this is a permission error- if strings.Contains(errStr, "403") || strings.Contains(errStr, "401") ||- strings.Contains(errStr, "permission") || strings.Contains(errStr, "forbidden") {+ if isPVEBackupPermissionError(err) {hadPermissionError = true+ permissionFailureCount++warning := pveBackupPermissionWarning(m.getInstanceConfig(instanceName))m.mu.Lock()m.backupPermissionWarnings[instanceName] = warning@@ -391,8 +396,33 @@ func (m *Monitor) pollStorageBackupsWithNodes(ctx context.Context, instanceNameMsg("Preserving previous PBS guest confirmation evidence due to partial failures")}+ protectionObservedAt := time.Now().UTC()+ protectionObservation, protectionObservationErr := buildPVEProtectionProviderObservation(+ instanceName,+ pveProtectionCollectionStats{+ NodeCount: len(nodes),+ SuccessfulNodeQueries: successfulNodeQueries,+ BackupStorageCount: storagesWithBackup,+ ContentSuccesses: contentSuccess,+ ContentFailures: contentFailures,+ PermissionFailureCount: permissionFailureCount,+ },+ protectionObservedAt,+ )+ if protectionObservationErr != nil {+ log.Warn().+ Err(protectionObservationErr).+ Str("instance", instanceName).+ Msg("Failed to build PVE protection provider observation")+ }+// Decide whether to keep existing backups when every query failedif shouldPreserveBackups(len(nodes), hadSuccessfulNode, storagesWithBackup, contentSuccess) {+ if protectionObservationErr == nil {+ m.ingestProtectionProviderObservationsAsync(+ []recovery.ProtectionProviderObservation{protectionObservation},+ )+ }if len(nodes) > 0 && !hadSuccessfulNode {log.Warn().Str("instance", instanceName).@@ -415,14 +445,36 @@ func (m *Monitor) pollStorageBackupsWithNodes(ctx context.Context, instanceName// Best-effort ingestion into recovery store (for rollups / unified backups UX).guestInfo := buildProxmoxGuestInfoIndex(readState)- m.ingestAndReconcileRecoveryPointsAsync(- proxmoxrecoverymapper.FromPVEStorageBackups(allBackups, guestInfo),- recoveryReconcileScope{- provider: string(recovery.ProviderProxmoxPVE),- idPrefix: "pve-backup:",- instance: instanceName,- },+ points, evidenceErr := proxmoxrecoverymapper.FromPVEStorageBackupsWithEvidence(+ allBackups,+ guestInfo,+ protectionObservedAt,)+ if evidenceErr != nil {+ log.Warn().+ Err(evidenceErr).+ Str("instance", instanceName).+ Msg("Failed to attach PVE recovery evidence; preserving existing points")+ if protectionObservationErr == nil {+ m.ingestProtectionProviderObservationsAsync(+ []recovery.ProtectionProviderObservation{protectionObservation},+ )+ }+ } else {+ observations := []recovery.ProtectionProviderObservation{}+ if protectionObservationErr == nil {+ observations = append(observations, protectionObservation)+ }+ m.ingestAndReconcileRecoveryPointsWithObservationsAsync(+ points,+ observations,+ recoveryReconcileScope{+ provider: string(recovery.ProviderProxmoxPVE),+ idPrefix: "pve-backup:",+ instance: instanceName,+ },+ )+ }// Sync backup times to VMs/Containers and republish them to canonical resources.m.syncGuestBackupTimesAndResourceStore()@@ -1190,14 +1242,26 @@ func (m *Monitor) pollGuestSnapshots(ctx context.Context, instanceName string, c// Best-effort ingestion into recovery store (for rollups / unified backups UX).guestInfo := buildProxmoxGuestInfoIndex(readState)- m.ingestAndReconcileRecoveryPointsAsync(- proxmoxrecoverymapper.FromPVEGuestSnapshots(allSnapshots, guestInfo),- recoveryReconcileScope{- provider: string(recovery.ProviderProxmoxPVE),- idPrefix: "pve-snapshot:",- instance: instanceName,- },+ points, evidenceErr := proxmoxrecoverymapper.FromPVEGuestSnapshotsWithEvidence(+ allSnapshots,+ guestInfo,+ time.Now().UTC(),)+ if evidenceErr != nil {+ log.Warn().+ Err(evidenceErr).+ Str("instance", instanceName).+ Msg("Failed to attach PVE snapshot recovery evidence; preserving existing points")+ } else {+ m.ingestAndReconcileRecoveryPointsAsync(+ points,+ recoveryReconcileScope{+ provider: string(recovery.ProviderProxmoxPVE),+ idPrefix: "pve-snapshot:",+ instance: instanceName,+ },+ )+ }if m.alertManager != nil {m.alertManager.CheckSnapshotsForInstance(instanceName, allSnapshots, guestLookups)@@ -2111,7 +2175,19 @@ func (m *Monitor) pollBackupTasks(ctx context.Context, instanceName string, clie// Best-effort ingestion into recovery store (for rollups / unified backups UX).guestInfo := buildProxmoxGuestInfoIndex(m.backupReadStateForInstance(instanceName))- m.ingestRecoveryPointsAsync(proxmoxrecoverymapper.FromPVEBackupTasks(backupTasks, guestInfo))+ points, evidenceErr := proxmoxrecoverymapper.FromPVEBackupTasksWithEvidence(+ backupTasks,+ guestInfo,+ time.Now().UTC(),+ )+ if evidenceErr != nil {+ log.Warn().+ Err(evidenceErr).+ Str("instance", instanceName).+ Msg("Failed to attach PVE backup-task recovery evidence; preserving existing points")+ return+ }+ m.ingestRecoveryPointsAsync(points)}// vzdumpJobTaskCacheEntry caches the per-guest tasks synthesized from onediff --git a/internal/monitoring/pve_protection_observation.go b/internal/monitoring/pve_protection_observation.gonew file mode 100644index 0000000000..2f28eabf28--- /dev/null+++ b/internal/monitoring/pve_protection_observation.go@@ -0,0 +1,115 @@+package monitoring++import (+ "fmt"+ "strings"+ "time"++ "github.com/rcourtman/pulse-go-rewrite/internal/operationaltrust"+ "github.com/rcourtman/pulse-go-rewrite/internal/recovery"+)++type pveProtectionCollectionStats struct {+ NodeCount int+ SuccessfulNodeQueries int+ BackupStorageCount int+ ContentSuccesses int+ ContentFailures int+ PermissionFailureCount int+}++func buildPVEProtectionProviderObservation(+ instanceName string,+ stats pveProtectionCollectionStats,+ observedAt time.Time,+) (recovery.ProtectionProviderObservation, error) {+ instanceName = strings.TrimSpace(instanceName)+ if instanceName == "" {+ return recovery.ProtectionProviderObservation{}, fmt.Errorf(+ "PVE protection observation requires an instance",+ )+ }+ if observedAt.IsZero() {+ return recovery.ProtectionProviderObservation{}, fmt.Errorf(+ "PVE protection observation requires an observation time",+ )+ }++ jobState := recovery.OutcomeSuccess+ historyCompleteness := recovery.ProtectionHistoryComplete+ permissions := operationaltrust.EvidencePermissionsSufficient+ var reason *operationaltrust.EvidenceReason++ complete := stats.NodeCount > 0 &&+ stats.SuccessfulNodeQueries == stats.NodeCount &&+ stats.ContentFailures == 0+ allBackupContentUnavailable := stats.BackupStorageCount > 0 &&+ stats.ContentSuccesses == 0+ hasUsableHistory := stats.SuccessfulNodeQueries > 0 && !allBackupContentUnavailable++ switch {+ case complete:+ // A successful empty enumeration is complete evidence that this PVE+ // instance currently exposes no backup files.+ case hasUsableHistory:+ jobState = recovery.OutcomeWarning+ historyCompleteness = recovery.ProtectionHistoryPartial+ permissions = operationaltrust.EvidencePermissionsUnknown+ reason = &operationaltrust.EvidenceReason{+ Code: "pve_partial_enumeration",+ Message: "Some PVE node or storage backup history could not be enumerated.",+ }+ if stats.PermissionFailureCount > 0 {+ permissions = operationaltrust.EvidencePermissionsPartial+ reason = &operationaltrust.EvidenceReason{+ Code: "pve_partial_provider_access",+ Message: "PVE authorized only part of the configured backup-history scope.",+ }+ }+ default:+ jobState = recovery.OutcomeFailed+ historyCompleteness = recovery.ProtectionHistoryUnavailable+ permissions = operationaltrust.EvidencePermissionsUnknown+ reason = &operationaltrust.EvidenceReason{+ Code: "pve_collection_unavailable",+ Message: "PVE backup history could not be collected; retained points may be stale.",+ }+ allNodeQueriesDenied := stats.NodeCount > 0 &&+ stats.SuccessfulNodeQueries == 0 &&+ stats.PermissionFailureCount >= stats.NodeCount+ allBackupContentDenied := stats.BackupStorageCount > 0 &&+ stats.ContentSuccesses == 0 &&+ stats.PermissionFailureCount >= stats.BackupStorageCount+ if allNodeQueriesDenied || allBackupContentDenied {+ permissions = operationaltrust.EvidencePermissionsDenied+ reason = &operationaltrust.EvidenceReason{+ Code: "pve_provider_access_denied",+ Message: "PVE rejected every node or storage backup-history request.",+ }+ }+ }++ return recovery.NewProtectionProviderObservation(+ recovery.ProviderProxmoxPVE,+ "pve-backup-enumeration",+ instanceName,+ jobState,+ historyCompleteness,+ permissions,+ false,+ observedAt,+ observedAt,+ reason,+ )+}++func isPVEBackupPermissionError(err error) bool {+ if err == nil {+ return false+ }+ message := strings.ToLower(err.Error())+ return strings.Contains(message, "403") ||+ strings.Contains(message, "401") ||+ strings.Contains(message, "permission") ||+ strings.Contains(message, "forbidden")+}diff --git a/internal/monitoring/pve_protection_observation_test.go b/internal/monitoring/pve_protection_observation_test.gonew file mode 100644index 0000000000..4a35050414--- /dev/null+++ b/internal/monitoring/pve_protection_observation_test.go@@ -0,0 +1,158 @@+package monitoring++import (+ "errors"+ "testing"+ "time"++ "github.com/rcourtman/pulse-go-rewrite/internal/operationaltrust"+ "github.com/rcourtman/pulse-go-rewrite/internal/recovery"+)++func TestBuildPVEProtectionProviderObservationMapsEvidenceQuality(t *testing.T) {+ t.Parallel()++ now := time.Date(2026, 8, 4, 8, 0, 0, 0, time.UTC)+ tests := []struct {+ name string+ stats pveProtectionCollectionStats+ wantJob recovery.Outcome+ wantHistory recovery.ProtectionHistoryCompleteness+ wantPermissions operationaltrust.EvidencePermissions+ wantReason string+ }{+ {+ name: "complete enumeration",+ stats: pveProtectionCollectionStats{+ NodeCount: 2,+ SuccessfulNodeQueries: 2,+ BackupStorageCount: 2,+ ContentSuccesses: 2,+ },+ wantJob: recovery.OutcomeSuccess,+ wantHistory: recovery.ProtectionHistoryComplete,+ wantPermissions: operationaltrust.EvidencePermissionsSufficient,+ },+ {+ name: "complete empty enumeration",+ stats: pveProtectionCollectionStats{+ NodeCount: 1,+ SuccessfulNodeQueries: 1,+ },+ wantJob: recovery.OutcomeSuccess,+ wantHistory: recovery.ProtectionHistoryComplete,+ wantPermissions: operationaltrust.EvidencePermissionsSufficient,+ },+ {+ name: "partial transient enumeration",+ stats: pveProtectionCollectionStats{+ NodeCount: 2,+ SuccessfulNodeQueries: 1,+ BackupStorageCount: 1,+ ContentSuccesses: 1,+ },+ wantJob: recovery.OutcomeWarning,+ wantHistory: recovery.ProtectionHistoryPartial,+ wantPermissions: operationaltrust.EvidencePermissionsUnknown,+ wantReason: "pve_partial_enumeration",+ },+ {+ name: "partial provider access",+ stats: pveProtectionCollectionStats{+ NodeCount: 1,+ SuccessfulNodeQueries: 1,+ BackupStorageCount: 2,+ ContentSuccesses: 1,+ ContentFailures: 1,+ PermissionFailureCount: 1,+ },+ wantJob: recovery.OutcomeWarning,+ wantHistory: recovery.ProtectionHistoryPartial,+ wantPermissions: operationaltrust.EvidencePermissionsPartial,+ wantReason: "pve_partial_provider_access",+ },+ {+ name: "provider timeout",+ stats: pveProtectionCollectionStats{+ NodeCount: 2,+ },+ wantJob: recovery.OutcomeFailed,+ wantHistory: recovery.ProtectionHistoryUnavailable,+ wantPermissions: operationaltrust.EvidencePermissionsUnknown,+ wantReason: "pve_collection_unavailable",+ },+ {+ name: "provider denies every node",+ stats: pveProtectionCollectionStats{+ NodeCount: 2,+ PermissionFailureCount: 2,+ },+ wantJob: recovery.OutcomeFailed,+ wantHistory: recovery.ProtectionHistoryUnavailable,+ wantPermissions: operationaltrust.EvidencePermissionsDenied,+ wantReason: "pve_provider_access_denied",+ },+ {+ name: "provider denies every backup storage",+ stats: pveProtectionCollectionStats{+ NodeCount: 1,+ SuccessfulNodeQueries: 1,+ BackupStorageCount: 2,+ ContentFailures: 2,+ PermissionFailureCount: 2,+ },+ wantJob: recovery.OutcomeFailed,+ wantHistory: recovery.ProtectionHistoryUnavailable,+ wantPermissions: operationaltrust.EvidencePermissionsDenied,+ wantReason: "pve_provider_access_denied",+ },+ }++ for _, test := range tests {+ test := test+ t.Run(test.name, func(t *testing.T) {+ t.Parallel()+ got, err := buildPVEProtectionProviderObservation("pve-main", test.stats, now)+ if err != nil {+ t.Fatalf("buildPVEProtectionProviderObservation() error = %v", err)+ }+ if got.JobState != test.wantJob ||+ got.HistoryCompleteness != test.wantHistory ||+ got.Permissions != test.wantPermissions {+ t.Fatalf(+ "observation = job %q, history %q, permissions %q; want %q, %q, %q",+ got.JobState,+ got.HistoryCompleteness,+ got.Permissions,+ test.wantJob,+ test.wantHistory,+ test.wantPermissions,+ )+ }+ if test.wantReason == "" {+ if got.Evidence.Reason != nil {+ t.Fatalf("reason = %#v, want nil", got.Evidence.Reason)+ }+ } else if got.Evidence.Reason == nil || got.Evidence.Reason.Code != test.wantReason {+ t.Fatalf("reason = %#v, want %q", got.Evidence.Reason, test.wantReason)+ }+ })+ }+}++func TestIsPVEBackupPermissionError(t *testing.T) {+ t.Parallel()++ for _, err := range []error{+ errors.New("403 Forbidden"),+ errors.New("permission check failed"),+ errors.New("HTTP 401"),+ } {+ if !isPVEBackupPermissionError(err) {+ t.Fatalf("expected %q to be recognized as a permission failure", err)+ }+ }+ if isPVEBackupPermissionError(errors.New("connection timed out")) {+ t.Fatal("transient timeout must not be classified as a permission failure")+ }+}diff --git a/internal/recovery/mapper/proxmox/mapper.go b/internal/recovery/mapper/proxmox/mapper.goindex 7c1cfef546..a596d49c8f 100644--- a/internal/recovery/mapper/proxmox/mapper.go+++ b/internal/recovery/mapper/proxmox/mapper.go@@ -331,6 +331,22 @@ func FromPVEStorageBackups(backups []models.StorageBackup, guestInfoByKey map[streturn out}+// FromPVEStorageBackupsWithEvidence maps a complete PVE storage enumeration+// and attaches the point-level evidence consumed by canonical protection+// posture. Collection completeness and permission state remain separate+// ProtectionProviderObservation facts owned by the polling caller.+func FromPVEStorageBackupsWithEvidence(+ backups []models.StorageBackup,+ guestInfoByKey map[string]GuestInfo,+ ingestedAt time.Time,+) ([]recovery.RecoveryPoint, error) {+ return withRecoveryPointEvidence(+ FromPVEStorageBackups(backups, guestInfoByKey),+ "pve-backup-inventory",+ ingestedAt,+ )+}+func FromPVEBackupTasks(tasks []models.BackupTask, guestInfoByKey map[string]GuestInfo) []recovery.RecoveryPoint {if len(tasks) == 0 {return nil@@ -381,9 +397,12 @@ func FromPVEBackupTasks(tasks []models.BackupTask, guestInfoByKey map[string]Gueoutcome := outcomeFromTaskStatus(task.Status)out = append(out, recovery.RecoveryPoint{- ID: "pve-task:" + strings.TrimSpace(task.ID),- Provider: recovery.ProviderProxmoxPVE,- Kind: recovery.KindBackup,+ ID: "pve-task:" + strings.TrimSpace(task.ID),+ Provider: recovery.ProviderProxmoxPVE,+ // A task is execution evidence, not proof that a restore artifact is+ // still available in provider inventory. Keep it queryable without+ // letting an OK task mint protected posture on its own.+ Kind: recovery.KindOther,Mode: recovery.ModeLocal,Outcome: outcome,StartedAt: &started,@@ -407,6 +426,30 @@ func FromPVEBackupTasks(tasks []models.BackupTask, guestInfoByKey map[string]Guereturn out}+func FromPVEBackupTasksWithEvidence(+ tasks []models.BackupTask,+ guestInfoByKey map[string]GuestInfo,+ ingestedAt time.Time,+) ([]recovery.RecoveryPoint, error) {+ return withRecoveryPointEvidence(+ FromPVEBackupTasks(tasks, guestInfoByKey),+ "pve-backup-task-inventory",+ ingestedAt,+ )+}++func FromPVEGuestSnapshotsWithEvidence(+ snapshots []models.GuestSnapshot,+ guestInfoByKey map[string]GuestInfo,+ ingestedAt time.Time,+) ([]recovery.RecoveryPoint, error) {+ return withRecoveryPointEvidence(+ FromPVEGuestSnapshots(snapshots, guestInfoByKey),+ "pve-snapshot-inventory",+ ingestedAt,+ )+}+func FromPBSBackups(backups []models.PBSBackup, candidatesByKey map[string][]GuestCandidate) []recovery.RecoveryPoint {if len(backups) == 0 {return nil@@ -542,22 +585,40 @@ func FromPBSBackupsWithEvidence(candidatesByKey map[string][]GuestCandidate,ingestedAt time.Time,) ([]recovery.RecoveryPoint, error) {- points := FromPBSBackups(backups, candidatesByKey)+ return withRecoveryPointEvidence(+ FromPBSBackups(backups, candidatesByKey),+ "pbs-backup-inventory",+ ingestedAt,+ )+}++func withRecoveryPointEvidence(+ points []recovery.RecoveryPoint,+ collector string,+ ingestedAt time.Time,+) ([]recovery.RecoveryPoint, error) {if len(points) == 0 {return []recovery.RecoveryPoint{}, nil}if ingestedAt.IsZero() {- return nil, fmt.Errorf("PBS recovery evidence ingestion time is required")+ return nil, fmt.Errorf("recovery evidence ingestion time is required")}for i := range points {points[i].ProviderScope = recovery.ProviderScopeForPoint(points[i])+ if strings.TrimSpace(points[i].SubjectResourceID) == "" &&+ strings.TrimSpace(recovery.SubjectKeyForPoint(points[i])) == "" {+ // Provider-native host/config archives have no canonical workload+ // subject. Keep them as recovery artifacts without fabricating a+ // posture identity or failing the subject-linked batch.+ continue+ }evidence, err := recovery.NewRecoveryPointEvidence(points[i],- "pbs-backup-inventory",+ collector,ingestedAt,)if err != nil {- return nil, fmt.Errorf("map PBS backup %q evidence: %w", points[i].ID, err)+ return nil, fmt.Errorf("map recovery point %q evidence: %w", points[i].ID, err)}points[i].Evidence = evidence}diff --git a/internal/recovery/mapper/proxmox/mapper_test.go b/internal/recovery/mapper/proxmox/mapper_test.goindex 20da5d4953..eb88accf1a 100644--- a/internal/recovery/mapper/proxmox/mapper_test.go+++ b/internal/recovery/mapper/proxmox/mapper_test.go@@ -181,6 +181,45 @@ func TestFromPVEStorageBackups_Single(t *testing.T) {}}+func TestFromPVEStorageBackupsWithEvidenceAttachesCanonicalProviderScope(t *testing.T) {+ t.Parallel()++ ingestedAt := time.Date(2026, 8, 4, 8, 5, 0, 0, time.UTC)+ points, err := FromPVEStorageBackupsWithEvidence(+ []models.StorageBackup{{+ ID: "backup-1",+ VMID: 100,+ Node: "pve1",+ Instance: "pve-cluster",+ Storage: "local",+ Type: "qemu",+ Time: time.Date(2026, 8, 4, 8, 0, 0, 0, time.UTC),+ }},+ nil,+ ingestedAt,+ )+ if err != nil {+ t.Fatalf("FromPVEStorageBackupsWithEvidence() error = %v", err)+ }+ if len(points) != 1 {+ t.Fatalf("points = %d, want 1", len(points))+ }+ point := points[0]+ if point.ProviderScope != "pve-cluster" {+ t.Fatalf("ProviderScope = %q, want pve-cluster", point.ProviderScope)+ }+ if point.Evidence == nil || point.Evidence.Source.Collector != "pve-backup-inventory" {+ t.Fatalf("Evidence = %#v, want PVE backup inventory evidence", point.Evidence)+ }+ if point.SubjectResourceID != unifiedresources.ProxmoxGuestCanonicalID(+ unifiedresources.ResourceTypeVM,+ "pve-cluster",+ 100,+ ) {+ t.Fatalf("SubjectResourceID = %q, want canonical guest ID", point.SubjectResourceID)+ }+}+func TestFromPVEBackupTasks_Empty(t *testing.T) {result := FromPVEBackupTasks(nil, nil)if result != nil {@@ -218,6 +257,9 @@ func TestFromPVEBackupTasks_Success(t *testing.T) {if p.Outcome != recovery.OutcomeSuccess {t.Errorf("Outcome = %v, want %v", p.Outcome, recovery.OutcomeSuccess)}+ if p.Kind != recovery.KindOther {+ t.Errorf("Kind = %v, want task evidence kind %v", p.Kind, recovery.KindOther)+ }}func TestFromPVEBackupTasks_Failed(t *testing.T) {diff --git a/internal/recovery/posture_test.go b/internal/recovery/posture_test.goindex 42c175e572..efb5381a41 100644--- a/internal/recovery/posture_test.go+++ b/internal/recovery/posture_test.go@@ -289,6 +289,60 @@ func TestBuildProtectionPostureFromPointsUsesLatestProviderObservation(t *testin}}+func TestBuildProtectionPostureDoesNotTreatSuccessfulTaskAsAvailableBackup(t *testing.T) {+ t.Parallel()++ now := time.Date(2026, 8, 4, 8, 0, 0, 0, time.UTC)+ completedAt := now.Add(-time.Hour)+ point := RecoveryPoint{+ ID: "pve-task:vm-100-2026-08-04",+ Provider: ProviderProxmoxPVE,+ Kind: KindOther,+ Mode: ModeLocal,+ Outcome: OutcomeSuccess,+ CompletedAt: &completedAt,+ SubjectResourceID: "resource:vm-100",+ ProviderScope: "pve-main",+ }+ envelope, err := NewRecoveryPointEvidence(point, "pve-backup-task-inventory", now)+ if err != nil {+ t.Fatalf("NewRecoveryPointEvidence() error = %v", err)+ }+ point.Evidence = envelope+ observation, err := NewProtectionProviderObservation(+ ProviderProxmoxPVE,+ "pve-backup-enumeration",+ "pve-main",+ OutcomeSuccess,+ ProtectionHistoryComplete,+ operationaltrust.EvidencePermissionsSufficient,+ false,+ now,+ now,+ nil,+ )+ if err != nil {+ t.Fatalf("NewProtectionProviderObservation() error = %v", err)+ }++ got := BuildProtectionPostureFromPointsAt(+ "resource:vm-100",+ []RecoveryPoint{point},+ []ProtectionProviderObservation{observation},+ DefaultProtectionPosturePolicy,+ now,+ )+ if got.State != ProtectionStateUnprotected {+ t.Fatalf("state = %q, want unprotected; posture=%#v", got.State, got)+ }+ if got.LastSuccessfulPointAt != nil {+ t.Fatalf("last successful point = %v, want nil for task-only evidence", got.LastSuccessfulPointAt)+ }+ if !strings.Contains(got.Explanation, "no qualifying subject-linked backup") {+ t.Fatalf("explanation = %q, want no qualifying backup", got.Explanation)+ }+}+func TestNewProtectionProviderObservationRequiresTypedLimitation(t *testing.T) {t.Parallel()diff --git a/scripts/release_control/canonical_completion_guard_test.py b/scripts/release_control/canonical_completion_guard_test.pyindex 99e423b3d7..5466bc550f 100644--- a/scripts/release_control/canonical_completion_guard_test.py+++ b/scripts/release_control/canonical_completion_guard_test.py@@ -303,6 +303,7 @@ class CanonicalCompletionGuardTest(unittest.TestCase):"internal/monitoring/monitor_host_agents_test.go","internal/monitoring/monitor_pve_cluster_refresh_test.go","internal/monitoring/monitor_pve_guest_lxc_test.go",+ "internal/monitoring/pve_protection_observation_test.go","internal/monitoring/ratetracker_test.go","internal/monitoring/truenas_poller_test.go","internal/unifiedresources/code_standards_test.go",diff --git a/scripts/release_control/subsystem_lookup_test.py b/scripts/release_control/subsystem_lookup_test.pyindex 27d4f49eb5..2a9215b80e 100644--- a/scripts/release_control/subsystem_lookup_test.py+++ b/scripts/release_control/subsystem_lookup_test.py@@ -3973,6 +3973,7 @@ class SubsystemLookupTest(unittest.TestCase):"internal/mock/demo_scenarios_test.go","internal/mock/generator_test.go","internal/mock/platform_fixtures_test.go",+ "internal/mock/recovery_points_test.go","tests/integration/tests/43-platform-mock-runtime.spec.ts",],)