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
Clean up monitored-system contract governance
rcourtman1c6b41522959
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.mdindex f1b02794dd..5d67b6c405 100644--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md@@ -222,7 +222,6 @@ management, and fleet control surfaces.code must treat the resulting activation-state callback as commercialownership cleanup only, not as install inventory proof or fleet enrollmentstate.-The same lifecycle-adjacent platform-connections boundary also assumesdirect TrueNAS and VMware connection writes fail closed when canonicalmonitored-system usage is unavailable. Shared `internal/api/` admission@@ -353,9 +352,7 @@ That same adjacent `internal/api/` boundary now also keeps public demos fromleaking commercial state through lifecycle-adjacent surfaces. Agent install,reporting, and setup flows may share backend helpers with billing or licensetransport, but `DEMO_MODE` must continue to 404 commercial read surfaces-instead of teaching lifecycle or mock-mode paths to bypass licensing. That-same boundary also hides monitored-system explanation and provider preview-routes used by lifecycle-adjacent platform connections. Public+instead of teaching lifecycle or mock-mode paths to bypass licensing. Publicdemo readiness therefore comes from hiding commercial presentation on theshared API boundary, not from introducing a second fake-entitlement path intolifecycle-owned install or reporting flows. Browser-facing lifecycle surfaces@@ -1074,15 +1071,6 @@ final, or retry admission against a provider-owned supplemental platform suchas TrueNAS or VMware until the monitor has both seen an initial baseline forevery active connection and rebuilt the canonical store at or after thatprovider watermark.-That same lifecycle-owned admission surface now also requires canonical-unavailable-reason guidance. When `/api/license/monitored-system-ledger/preview`,-`/api/truenas/connections/preview`, `/api/truenas/connections/{id}/preview`,-`/api/vmware/connections/preview`, or-`/api/vmware/connections/{id}/preview` fail with-`monitored_system_usage_unavailable`, the backend must preserve-`details.reason` from the monitor usage contract and the shared admission-preview shell plus provider panels must render helper-owned retry copy and-disable save until preview can resolve again.That same lifecycle-owned admission surface must keep provider save actionsgated on a successful monitored-system preview. TrueNAS and VMware settingsmay not create or update a connection while the admission preview is missing,diff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.mdindex fdba8c1437..8d7f8e5858 100644--- a/docs/release-control/v6/internal/subsystems/api-contracts.md+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md@@ -75,7 +75,7 @@ Own canonical runtime payload shapes between backend and frontend.50. `internal/cloudcp/portal/frontend_sync_test.go`51. `internal/api/recovery_handlers.go`52. `internal/api/config_setup_handlers.go`-53. `internal/api/demo_mode_commercial.go`: the canonical public-demo commercial route policy, including monitored-system ledger, explanation, and provider preview surfaces.+53. `internal/api/demo_mode_commercial.go`54. `internal/api/security_status_capabilities.go`55. `internal/api/demo_middleware.go`56. `frontend-modern/src/stores/aiRuntimeState.ts`@@ -169,7 +169,6 @@ Own canonical runtime payload shapes between backend and frontend.and the same shared correlation card's ordering and truncation rule, so callers pass raw correlations instead of encoding their own top-N sort behaviorand the shared `frontend-modern/src/components/Infrastructure/ResourceChangeSummary.tsx` and `frontend-modern/src/components/Infrastructure/ResourceCorrelationSummary.tsx` cards' infrastructure resource-link default, so the Patrol page, resource drawer, and problem-resource dashboard panels inherit the canonical resource-filter path construction instead of rebuilding infrastructure URLs inline8. Route frontend API-client parsed error propagation, API-error-status fallback handling, allowed-status handling, custom status-specific error handling, command-trigger success envelope handling, shared response parsing pipelines, missing-resource lookup handling, metadata CRUD routing, stream event consumption, response status, collection normalization, scalar payload coercion, and structured error normalization through canonical shared helpers under `frontend-modern/src/api/`-9. Keep direct platform-connection write admission on this shared API contract as well: `internal/api/truenas_handlers.go`, `internal/api/vmware_handlers.go`, `internal/api/monitored_system_limit_enforcement.go`, and `internal/api/contract_test.go` must keep TrueNAS and VMware creates/updates fail-closed with `monitored_system_usage_unavailable` whenever the canonical monitored-system usage view is unsettled or rebuilding, and VMware write admission must check that canonical usage state before collecting external vCenter inventory so direct API callers cannot persist connections behind an unsafe capacity view.9. Add or change API token scope, assignment, and revocation presentation through `frontend-modern/src/components/Settings/APITokenManager.tsx`, `frontend-modern/src/components/Settings/apiTokenManagerModel.ts`, and `frontend-modern/src/components/Settings/useAPITokenManagerState.ts`10. Add or change infrastructure operations token generation, lookup, assignment, the pure unified-agent inventory/install model, the split infrastructure install/reporting state owners, the split direct-node/discovery infrastructure settings owners, the shared infrastructure-operations state provider/context shell, and reporting/install presentation through `frontend-modern/src/components/Settings/InfrastructureOperationsController.tsx`, `frontend-modern/src/components/Settings/infrastructureOperationsModel.tsx`, `frontend-modern/src/components/Settings/useInfrastructureConfiguredNodesState.ts`, `frontend-modern/src/components/Settings/useInfrastructureDiscoveryRuntimeState.ts`, `frontend-modern/src/components/Settings/useInfrastructureInstallState.tsx`, `frontend-modern/src/components/Settings/useInfrastructureOperationsState.tsx`, and `frontend-modern/src/components/Settings/useInfrastructureReportingState.tsx`11. Keep `internal/api/session_store.go` on a fail-closed auth-persistence boundary: persisted OIDC refresh tokens may only round-trip through encrypted-at-rest session payloads, and any missing-crypto or invalid-ciphertext path must drop the token instead of preserving plaintext-at-rest session state.@@ -375,10 +374,6 @@ Own canonical runtime payload shapes between backend and frontend.store after an owned settings mutation, but they must not reintroducepage-local mount loops that fetch `/api/settings/ai` or `/api/ai/models`separately for chat, Patrol, and cost/budget views.- The shared chat shell under `frontend-modern/src/components/AI/Chat/`- stays on that same read-side contract: it may coordinate assistant UI- state, but it must not reopen page-local fetch loops against- `/api/settings/ai` or `/api/ai/models` outside the shared runtime store.23. Keep API-backed first-target onboarding canonical on that same sharedinfrastructure-settings boundary:`frontend-modern/src/components/Settings/infrastructureOperationsModel.tsx`,@@ -1081,14 +1076,6 @@ Provider-backed preview routes such as `/api/truenas/connections/preview`,and `/api/vmware/connections/{id}/preview` must serialize that same canonicalpreview shape directly; they may not down-scope the response to local counts orhide current/projected grouped systems from the governed contract.-That same fail-closed contract now also carries a structured unavailable-reason. When monitored-system usage is unavailable, the 503 payload must keep-`code=monitored_system_usage_unavailable` and include `details.reason` with the-canonical monitor usage reason such as `monitor_state_unavailable`,-`supplemental_inventory_unsettled`, or-`supplemental_inventory_rebuild_pending`, and provider-backed preview routes-plus deploy slot checks must emit that same reason-bearing payload instead of a-generic unavailable error.That client contract must also fail closed when older or partial payloads omitthe nested explanation object: the frontend may normalize missing explanationfields to empty reasons/surfaces plus a safe default summary, but it must not@@ -2649,3 +2636,13 @@ reads or preview probes whenever `DEMO_MODE` is enabled. Demo runtimes maystill use real server-side entitlement evaluation internally, but thegoverned browser/API contract must not expose commercial identity, usage, orupgrade-state payloads back to public viewers through those read surfaces.+That same monitored-system admission contract now also owns direct write-path+failure semantics for platform connections. `internal/api/truenas_handlers.go`,+`internal/api/vmware_handlers.go`,+`internal/api/monitored_system_limit_enforcement.go`, and+`internal/api/contract_test.go` must keep TrueNAS and VMware connection+creates/updates fail-closed with `monitored_system_usage_unavailable` whenever+the canonical monitored-system usage view is unsettled or rebuilding. VMware+write admission must check that canonical usage state before collecting+external vCenter inventory, so direct API callers cannot receive provider+connection errors or persist connections while capacity accounting is unsafe.diff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.mdindex 1f95fe55f3..ab8eef38ea 100644--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md@@ -650,17 +650,6 @@ panels must map `monitored_system_usage_unavailable` plus backend`details.reason` through `frontend-modern/src/utils/monitoredSystemPresentation.ts`,render helper-owned required-preview guidance before the first safe preview,and keep save disabled until the shared preview state resolves safely.-That same helper-owned admission-preview copy now also owns unavailable--capacity guidance. When provider-backed preview endpoints return-`monitored_system_usage_unavailable`, the shared preview shell and provider-panels must render helper-owned unavailable title/message mapped from the-canonical backend `details.reason` and disable the save action until preview-can resolve again.-That same helper also owns grouped preview attribution and multi-source labels.-When a current or projected monitored system represents several included-surfaces, the admission preview must render canonical helper-owned labels such-as `Multiple Sources` and helper-owned effect copy instead of provider-local-source names, raw type/source slugs, or ad hoc billing phrasing.That same disclosure surface must not accept arbitrary caller-suppliedmonitored-system summary strings as its primary API. When the disclosure needsto show brief summary copy, it should render the canonical helper-owned briefdiff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex ae75c7fbbf..9c03668ba4 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -70,7 +70,13 @@ querying, and the operator-facing storage health presentation layer.provider-backed recovery: storage and recovery must treat `truenas_disabled`as an explicit platform opt-out, not as the baseline onboarding state for asupported platform.- That same adjacent API boundary also owns direct provider write admission when canonical monitored-system usage is unavailable. `internal/api/truenas_handlers.go`, `internal/api/vmware_handlers.go`, and the shared monitored-system admission helpers must fail those connection saves closed before provider state persists, and VMware must not collect external vCenter inventory before the canonical capacity view is safe.+ That same adjacent API boundary also owns monitored-system admission preview+ transport for provider-backed setup context. `/api/truenas/connections/preview`,+ `/api/truenas/connections/{id}/preview`, `/api/vmware/connections/preview`,+ and `/api/vmware/connections/{id}/preview` may surface canonical+ current/projected grouped systems plus enforced limit verdicts for setup and+ support clarity, but storage and recovery must not reinterpret those routes+ as recovery-local onboarding or restore APIs.That same adjacent API boundary now also owns SSO outbound discovery and metadata fetch trust: storage- and recovery-adjacent surfaces may share `internal/api/sso_outbound.go`, `internal/api/saml_service.go`, and `internal/api/oidc_service.go`, but they must not fork separate metadata/discovery HTTP clients, redirect policies, or credential-file read rules when they depend on shared backend auth helpers.5. Route canonical storage/recovery resource selection through `frontend-modern/src/hooks/useUnifiedResources.ts` and the owning `unified-resources` contractThat shared hook now also projects resource `clusterId` through the shared cluster-name helper, so storage and recovery links keep the same cluster-context label as other unified-resource consumers instead of rebuilding a local fallback chain.@@ -148,8 +154,6 @@ querying, and the operator-facing storage health presentation layer.26. Keep cross-surface recovery handoffs on the shared route-helper contract. When infrastructure or other unified-resource consumers expose TrueNAS recovery links, they must reuse the canonical `frontend-modern/src/routing/resourceLinks.ts` recovery builder with owned `platform` and `node` queries instead of inventing drawer-local recovery URLs or treating PBS services as the only infrastructure-to-recovery path.27. Keep alert-side recovery drill-ins on that same shared route-helper contract. When alert investigation surfaces such as resource-incident panels expose recovery follow-up links for TrueNAS or future API-backed platforms, they must route through the canonical `frontend-modern/src/routing/resourceLinks.ts` recovery builder instead of freezing alert-local recovery URLs or introducing another provider-shaped recovery handoff vocabulary.28. Keep VMware onboarding runtime and recovery semantics separate on that same adjacent platform-connections contract. When `internal/api/router.go`, `internal/api/router_routes_registration.go`, or `internal/api/vmware_handlers.go` evolve VMware connection CRUD, poller-owned `poll` / `observed` summary payloads, saved-test refresh, or observed datastore/VM snapshot visibility, storage and recovery may consume the resulting shared context but must not treat those onboarding/runtime payloads as canonical recovery artifacts, restore capability, or recovery-local control transport.- That same adjacent platform-connections boundary also owns pre-save monitored-system admission preview. When `internal/api/monitored_system_ledger.go`, `internal/api/router_routes_registration.go`, `internal/api/truenas_handlers.go`, or `internal/api/vmware_handlers.go` expose current/projected grouped systems and limit-enforcement verdicts before a provider connection is saved, storage and recovery may consume that context only as adjacent onboarding evidence; they must not reinterpret those preview groups as protected inventory, restore readiness, backup coverage, or recovery-local capacity truth.- That same adjacent platform-connections boundary also owns the retryable unavailable reason for those preview and slot-enforcement flows. Shared `internal/api/` helpers must preserve canonical `details.reason` values on `monitored_system_usage_unavailable` responses so storage/recovery-adjacent onboarding does not collapse distinct settling-vs-rebuild states into an opaque generic failure.29. Keep VMware datastore projection on the shared unified-resource and storage-source contracts. When `frontend-modern/src/hooks/useUnifiedResources.ts` or shared `internal/api/router.go` wiring starts surfacing VMware-backed canonical `storage` resources, storage and recovery may expose those datastores through the owned `vmware-vsphere` source/platform vocabulary for inventory, capacity, and handoff flows only; they must not reinterpret that projection as VMware recovery support, restore semantics, or a provider-local protection surface.30. Keep VMware placement and guest-detail enrichment descriptive on that same shared unified-resource contract. When `internal/vmware/provider.go`, `internal/unifiedresources/types.go`, and `frontend-modern/src/hooks/useUnifiedResources.ts` project datacenter, cluster, folder, runtime-host, datastore-attachment, guest-hostname, or guest-IP metadata onto canonical VMware `agent` / `vm` / `storage` resources, storage and recovery may use that detail for labeling and navigation only; they must not promote those topology or guest fields into recovery ownership, restore targeting, protection grouping, or a VMware-local recovery taxonomy without a separately governed slice.31. Keep VMware datastore classification neutral on the shared storage adapter contract. When `frontend-modern/src/features/storageBackups/resourceStorageMapping.ts`, `frontend-modern/src/features/storageBackups/resourceStoragePresentation.ts`, and `frontend-modern/src/features/storageBackups/storageAdapters.ts` evolve canonical storage-record mapping, VMware-backed datastores must continue to land on the shared storage route as inventory-only datastores with neutral protection fallback, not as backup repositories, backup targets, or recovery-protected resources.@@ -355,10 +359,9 @@ storage or recovery consumes the resulting runtime context.That same adjacent `internal/api/` boundary now also governs public-democommercial redaction for storage and recovery viewers. Shared storage/recoverysurfaces may run beside a demo runtime that has real internal entitlements,-but `DEMO_MODE` must still 404 license-status, billing-state, monitored--system-ledger reads, and monitored-system explanation/provider preview routes-so adjacent recovery or storage pages do not leak commercial identity or-upgrade posture into a public demo. Storage/recovery+but `DEMO_MODE` must still 404 license-status, billing-state, and monitored-+system-ledger reads so adjacent recovery or storage pages do not leak+commercial identity or upgrade posture into a public demo. Storage/recoverymust consume that redacted boundary as presentation truth rather thanreintroducing mock-only license bypasses or page-local commercial fallbacks.Browser-facing storage/recovery surfaces must also treat@@ -1454,6 +1457,11 @@ an already-counted host, the API helper must strip only that source from theprospective grouped system and preserve any remaining top-level evidence suchas agent or sibling API ownership, rather than briefly freeing a slot ordouble-counting the same monitored system.+When storage- or recovery-adjacent settings or support flows need to explain+that result, they must rely on the shared monitored-system ledger preview+contract for current/projected grouped systems and enforced limit verdicts+instead of reconstructing preview copy from page-local recovery inventory or+provider-local connection details.That same shared boundary now also assumes settled monitored-system usagereadiness. Storage- or recovery-adjacent transport flows may not interpret thefirst store-backed monitor view as commercial truth when provider-owned@@ -2018,6 +2026,11 @@ observed datastore/VM snapshot visibility on the sharedplatform-connections surface, but storage and recovery must treat that data assetup/runtime context only, not as proof that VMware has joined the canonicalrecovery artifact or restore plane.+The same rule applies to `/api/truenas/connections*/preview` and+`/api/vmware/connections*/preview`: monitored-system admission previews may+surface current/projected grouped systems and enforced limit verdicts for setup+and support clarity, but they do not imply recovery-local onboarding, recovery+artifact ownership, or restore support.That same bounded phase-1 slice now also includes the shared unified-resourceadapter floor. `frontend-modern/src/hooks/useUnifiedResources.ts`,`frontend-modern/src/routing/resourceLinks.ts`, and adjacent storage filters@@ -2083,3 +2096,10 @@ Browser-facing storage/recovery surfaces must also treat`/api/security/status.sessionCapabilities.demoMode` as the canonicalpublic-demo bootstrap signal instead of inferring demo posture from headers,`/api/health`, or hostname heuristics.+That same adjacent platform-connections boundary now also assumes direct+TrueNAS and VMware connection writes fail closed while canonical+monitored-system usage is unavailable. Storage and recovery may depend on the+resulting provider setup state only after `internal/api/truenas_handlers.go`,+`internal/api/vmware_handlers.go`, and the shared monitored-system admission+helpers have returned a safe capacity verdict; VMware write admission must not+collect external vCenter inventory before that canonical usage state is safe.diff --git a/scripts/release_control/canonical_completion_guard_test.py b/scripts/release_control/canonical_completion_guard_test.pyindex 72879b9b71..c7c9334779 100644--- a/scripts/release_control/canonical_completion_guard_test.py+++ b/scripts/release_control/canonical_completion_guard_test.py@@ -25,12 +25,16 @@ PLATFORM_CONNECTIONS_WORKSPACE_EXACT_FILES = ["frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx","frontend-modern/src/components/Settings/__tests__/PlatformConnectionsWorkspace.test.tsx","frontend-modern/src/components/Settings/__tests__/TrueNASSettingsPanel.test.tsx",+ "frontend-modern/src/components/Settings/__tests__/VMwareSettingsPanel.test.tsx","frontend-modern/src/components/Settings/__tests__/monitoredSystemModelGuardrails.test.ts","frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts","frontend-modern/src/components/Settings/__tests__/useTrueNASSettingsPanelState.test.tsx",+ "frontend-modern/src/components/Settings/__tests__/useVMwareSettingsPanelState.test.tsx","frontend-modern/src/utils/__tests__/clusterEndpointPresentation.test.ts","frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts","frontend-modern/src/utils/__tests__/proxmoxSettingsPresentation.test.ts",+ "tests/integration/tests/21-truenas-settings-platform-connections.spec.ts",+ "tests/integration/tests/22-vmware-settings-platform-connections.spec.ts",]