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
Complete trust-gate governance contracts
rcourtmancee4f646141c
diff --git a/docs/release-control/v6/internal/subsystems/ai-runtime.md b/docs/release-control/v6/internal/subsystems/ai-runtime.mdindex fe87c81e17..298dd996d4 100644--- a/docs/release-control/v6/internal/subsystems/ai-runtime.md+++ b/docs/release-control/v6/internal/subsystems/ai-runtime.md@@ -6646,3 +6646,28 @@ acknowledgement flag. `internal/ai/patrol_metrics.go` compares the canonicalactive summary with the projected state set and increments one unlabeledlow-cardinality mismatch counter on contradiction. It never labels metrics withresource, record, evidence, actor, or provider-instance identity.++### Trust-gate manual Patrol acceptance++An unscoped manual Patrol run is accepted only after `internal/ai/patrol.go`+atomically reserves one execution slot and assigns the run ID and start time.+That accepted identity is synchronously visible through Patrol status before+the provider goroutine can emit its first event. A concurrent request therefore+fails as already running instead of starting a second provider call. Once+accepted, the run owns exactly one history record: provider or runtime setup+failure is recorded against that run as an error outcome and must not be+reclassified as an HTTP start failure or silently dropped.++Acceptance authorizes analysis only. Any proposed customer-infrastructure+mutation must still enter the canonical Actions lifecycle with its normal+planning, approval, execution, audit, and verification boundaries; Patrol does+not gain a parallel mutation plane from owning the run slot.++`docs/AI_PATROL_QUALIFICATION.md` treats provider cold start as an explicit+compatibility matrix. First provider events at 0, 15, 30, and 60 seconds must+all retain the one accepted run identity, while the browser's delayed+status/history read remains bounded and cannot trigger a replacement run.+`internal/ai/patrol_manual_acceptance_test.go`,+`internal/api/ai_handlers_patrol_actions_additional_test.go`, and+`frontend-modern/src/features/patrol/__tests__/patrolRunAcceptance.test.ts`+are the focused acceptance, API, and cold-start timing proofs.diff --git a/docs/release-control/v6/internal/subsystems/alerts.md b/docs/release-control/v6/internal/subsystems/alerts.mdindex 4bd55c73e3..2cf3da93f2 100644--- a/docs/release-control/v6/internal/subsystems/alerts.md+++ b/docs/release-control/v6/internal/subsystems/alerts.md@@ -1160,3 +1160,29 @@ Suppression is bounded and reasoned, leaves the default active queue, andremains inspectable. Expiry or explicit unsuppression returns the record to itsdetector-owned state; it never resolves it. Only fresh sufficient recoveryevidence may enter resolving, and only detector recovery may resolve.++### Canonical threshold-override succession++Alert threshold overrides are persisted under the current canonical resource+ID. `internal/alerts/canonical_override_migration.go` may re-home an override+from a retired ID only when the unified-resource owner explicitly publishes+that ID in `SupersededCanonicalIDs`. Display aliases, hostnames, metric+targets, connection labels, and other lookup conveniences are not persistence+authority. A still-live old ID or one old ID claimed by multiple current+resources fails closed and remains untouched; when both keys exist, the current+canonical override wins.++Monitoring owns the synchronization point that applies this migration to the+active alert configuration and persists it before later reloads. The frontend+may read legacy connection-target keys as compatibility candidates, but save,+edit, and delete operations target the resource's current canonical ID and+retain that ID across refetches or reported-identity changes. This migration+changes alert configuration only and does not create customer-infrastructure+mutation authority outside canonical Actions.++`internal/alerts/canonical_override_migration_test.go` proves the+unambiguous/live/ambiguous decision matrix,+`internal/monitoring/monitor_alert_override_migration_test.go` proves durable+reload behavior, and+`frontend-modern/src/features/alerts/thresholds/hooks/__tests__/truenasThresholdPersistence.test.tsx`+proves the browser-side TrueNAS save/refetch contract.diff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.mdindex 5a24d6298a..51b7c98a10 100644--- a/docs/release-control/v6/internal/subsystems/api-contracts.md+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md@@ -7864,3 +7864,31 @@ projection. The browser cannot submit operational state, transition,evidence, actor, or subject identity. Action offers and planning additionallyrequire the canonical `ai_autofix` entitlement and return the normallicense-required `402` contract when it is absent.++### Manual Patrol acceptance transport++For an unscoped `POST /api/ai/patrol/run`, HTTP success means the server has+atomically accepted one named run, not merely queued an attempt. The response+retains the existing `success` and `message` fields and additively includes+`accepted: true`, `run_id`, and `started_at`. The matching status payload+exposes `running`, `current_run_id`, and `current_run_started_at` immediately,+so a client can reconcile acceptance without waiting for a model-provider+stream event.++Pre-acceptance failures remain typed API failures: disabled Patrol and an+already-running slot return `409` with `patrol_disabled` or+`patrol_already_running`; the latter may include `current_run_id`. Readiness,+scope-resolution, and cadence failures retain their existing typed rejection+contracts. After acceptance, provider or runtime failure belongs to the run+history as an error record and is not rewritten as a start rejection. Clients+must also keep a transport/network failure distinct from a structured backend+rejection.++Scoped targeted checks retain their established scope-resolution response and+do not claim the unscoped run-slot acceptance fields. All remediation remains+on the canonical Actions API and lifecycle; accepting Patrol analysis does not+authorize an alternate execution route.+`internal/api/ai_handlers_patrol_actions_additional_test.go` proves the+acceptance and typed-conflict payloads, while+`frontend-modern/src/features/patrol/__tests__/patrolRunAcceptance.test.ts`+proves bounded status/history reconciliation against the returned run ID.diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 7aef463446..6d6514261e 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -5113,3 +5113,32 @@ after node replacement, reduced-motion behavior, and a no-overflow phonelayout. Raw evidence history, lifecycle timeline, provider limitations, andaction audit remain one disclosure or shared review deeper; no platform tableor Assistant surface recreates these controls.++### Trust-gate state presentation++Shared frontend composition must preserve the typed domain state supplied by+Patrol, alerts, storage, and unified resources rather than flattening it into a+generic success/error or loading flag. After the backend accepts a manual+Patrol run, the page leaves the transient Starting state using the accepted run+identity and performs one bounded status/history reconciliation; a structured+backend rejection remains distinct from a browser or network failure. Any+action proposed from that run still hands off to the shared canonical Actions+review instead of adding approve, execute, or retry-mutation controls to the+Patrol feature.++Storage detail primitives render physical-disk collection truth explicitly:+temporarily unavailable, provider/controller unsupported, and unexpectedly+missing evidence use different copy, and an unavailable per-disk I/O stream+must not render an apparently live chart or synthetic zero counters. Alert+threshold primitives similarly carry the current canonical override ID through+edit, save, reload, and refetch while legacy IDs remain read-only compatibility+candidates. Domain ownership stays with Patrol intelligence, storage recovery,+alerts, and unified resources; the primitive layer owns consistent rendering,+accessibility, and handoff behavior only.++The focused browser proofs are+`frontend-modern/src/features/patrol/__tests__/patrolRunAcceptance.test.ts`,+`frontend-modern/src/components/Storage/__tests__/DiskDetail.test.tsx`,+`frontend-modern/src/components/Storage/__tests__/useDiskDetailModel.test.ts`,+and+`frontend-modern/src/features/alerts/thresholds/hooks/__tests__/truenasThresholdPersistence.test.tsx`.diff --git a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md b/docs/release-control/v6/internal/subsystems/patrol-intelligence.mdindex 3652480217..fc518d60aa 100644--- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md+++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md@@ -2121,3 +2121,28 @@ context. Evidence, impact, relationships, protection posture, lifecycletimeline, action origin, and verification truth remain linked to the samerecord. Mobile consumes the same list/detail and acknowledgement contracts; itdoes not revive the retired primary findings feed.++### Accepted-run browser ownership++`usePatrolIntelligenceState.ts` treats a successful unscoped start response as+an accepted backend run identified by `run_id`, not as a request that remains+Starting until the first provider event. It schedules one reconciliation after+15 seconds, bounds the parallel status and history reads to 5 seconds, and+accepts either a matching running status or the matching durable run record as+authoritative. A provider/runtime error record remains a completed accepted run+outcome. Missing data, refresh failure, backend rejection, and browser/network+failure remain separate states and copy.++Reconciliation is generation-aware and cancellable. Route changes, retries, or+superseding starts cancel the old timer; stale completions cannot overwrite the+current run, and reconciliation never starts a replacement provider call.+Patrol state may present investigation and proposed-action context, but all+customer-infrastructure mutations remain exclusively in the canonical Actions+review and lifecycle.++`frontend-modern/src/features/patrol/__tests__/patrolRunAcceptance.test.ts`+proves 0/15/30/60-second provider-event timing, recorded failures, bounded hung+reads, cancellation, and clean retry.+`frontend-modern/src/features/patrol/__tests__/usePatrolIntelligenceState.test.ts`+and `frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx` prove typed+start-failure presentation and the accepted-run page transition.diff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.jsonindex a2a0c54660..755a14e873 100644--- a/docs/release-control/v6/internal/subsystems/registry.json+++ b/docs/release-control/v6/internal/subsystems/registry.json@@ -1224,7 +1224,8 @@"test_prefixes": [],"exact_files": ["cmd/pulse-agent/main_test.go",- "cmd/pulse-agent/observers_config_test.go"+ "cmd/pulse-agent/observers_config_test.go",+ "scripts/installtests/agent_state_dir_lifecycle_test.go"]},{@@ -1326,6 +1327,7 @@"internal/hostagent/commands_host_update_test.go","internal/hostagent/commands_storage_cleanup_test.go","internal/hostagent/docker_lifecycle_test.go",+ "internal/hostagent/issue1595_sas_collection_test.go","internal/hostagent/observer_delivery_test.go","internal/hostagent/package_updates_test.go","internal/hostagent/send_report_test.go",@@ -1343,6 +1345,7 @@"allow_same_subsystem_tests": false,"test_prefixes": [],"exact_files": [+ "scripts/installtests/agent_state_dir_lifecycle_test.go","scripts/installtests/install_sh_test.go"]},@@ -1665,7 +1668,10 @@"test_prefixes": ["internal/ai/qualification/"],- "exact_files": []+ "exact_files": [+ "frontend-modern/src/features/patrol/__tests__/patrolRunAcceptance.test.ts",+ "internal/ai/patrol_manual_acceptance_test.go"+ ]},{"id": "canonical-mutation-registry",@@ -1733,6 +1739,7 @@],"exact_files": ["internal/api/ai_handler_test.go",+ "internal/api/ai_handlers_patrol_actions_additional_test.go","internal/api/ai_handlers_test.go","internal/api/ai_intelligence_handlers_test.go","internal/api/patrol_autopilot_test.go"@@ -2084,6 +2091,7 @@"frontend-modern/src/features/alerts/__tests__/OverviewTab.total24h.test.tsx","frontend-modern/src/features/alerts/identity.test.ts","frontend-modern/src/features/alerts/thresholds/__tests__/helpers.test.ts",+ "frontend-modern/src/features/alerts/thresholds/hooks/__tests__/truenasThresholdPersistence.test.tsx","frontend-modern/src/features/alerts/thresholds/hooks/__tests__/useThresholdsTableState.test.tsx","frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts","frontend-modern/src/utils/__tests__/alertOverviewPresentation.test.ts",@@ -2230,6 +2238,7 @@"exact_files": ["internal/alerts/alerts_test.go","internal/alerts/callback_config_coverage_test.go",+ "internal/alerts/canonical_override_migration_test.go","internal/alerts/config_validation_test.go","internal/alerts/filter_evaluation_test.go","internal/alerts/guest_snapshot_test.go",@@ -2238,7 +2247,8 @@"internal/alerts/operational_contract_test.go","internal/alerts/synology_test.go","internal/alerts/threshold_resolution_shared_test.go",- "internal/alerts/update_alerts_test.go"+ "internal/alerts/update_alerts_test.go",+ "internal/monitoring/monitor_alert_override_migration_test.go"]},{@@ -2595,6 +2605,7 @@],"exact_files": ["frontend-modern/src/types/api.ts",+ "internal/api/ai_handlers_patrol_actions_additional_test.go","internal/api/contract_test.go","internal/api/patrol_autopilot_test.go"]@@ -4238,6 +4249,7 @@"allow_same_subsystem_tests": false,"test_prefixes": [],"exact_files": [+ "scripts/installtests/agent_state_dir_lifecycle_test.go","scripts/installtests/install_sh_test.go"]}@@ -4883,7 +4895,8 @@"owned_prefixes": ["internal/monitoring/","internal/storagehealth/",- "internal/truenas/"+ "internal/truenas/",+ "pkg/diskinventory/"],"owned_files": ["docker-entrypoint.sh",@@ -4949,6 +4962,7 @@"allow_same_subsystem_tests": false,"test_prefixes": [],"exact_files": [+ "internal/monitoring/issue1595_collection_trust_test.go","internal/monitoring/monitor_host_agents_test.go","internal/monitoring/monitor_package_updates_test.go","internal/unifiedresources/code_standards_test.go"@@ -5112,6 +5126,7 @@"internal/dockeragent/swarm_coverage_test.go","internal/models/deepcopy_test.go","internal/models/state_host_test.go",+ "internal/monitoring/issue1595_collection_trust_test.go","internal/monitoring/monitor_host_agents_test.go","internal/monitoring/monitor_package_updates_test.go","internal/unifiedresources/adapter_coverage_test.go",@@ -5214,6 +5229,22 @@"internal/recovery/posture_test.go"]},+ {+ "id": "diskinventory-collection-trust",+ "label": "physical-disk collection trust and identity proof",+ "match_prefixes": [+ "pkg/diskinventory/"+ ],+ "match_files": [],+ "allow_same_subsystem_tests": false,+ "test_prefixes": [],+ "exact_files": [+ "internal/hostagent/issue1595_sas_collection_test.go",+ "internal/monitoring/issue1595_collection_trust_test.go",+ "pkg/diskinventory/identity_test.go",+ "pkg/diskinventory/status_test.go"+ ]+ },{"id": "monitoring-runtime","label": "monitoring runtime proof",@@ -5226,6 +5257,8 @@"exact_files": ["internal/monitoring/availability_poller_test.go","internal/monitoring/canonical_guardrails_test.go",+ "internal/monitoring/issue1595_collection_trust_test.go",+ "internal/monitoring/monitor_alert_override_migration_test.go","internal/monitoring/monitor_backups_readstate_test.go","internal/monitoring/monitor_host_agents_test.go","internal/unifiedresources/code_standards_test.go"@@ -5567,6 +5600,8 @@"frontend-modern/src/features/patrol/__tests__/patrolControlPresentation.test.ts","frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceHeader.test.ts","frontend-modern/src/features/patrol/__tests__/patrolInvestigationContextModel.test.ts",+ "frontend-modern/src/features/patrol/__tests__/patrolRunAcceptance.test.ts",+ "frontend-modern/src/features/patrol/__tests__/usePatrolIntelligenceState.test.ts","frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx","frontend-modern/src/stores/__tests__/aiIntelligence.test.ts","frontend-modern/src/stores/__tests__/aiIntelligenceSummaryModel.test.ts",@@ -6426,11 +6461,14 @@"test_prefixes": [],"exact_files": ["frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts",+ "frontend-modern/src/components/Storage/__tests__/DiskDetail.test.tsx","frontend-modern/src/components/Storage/__tests__/DiskList.test.tsx","frontend-modern/src/components/Storage/__tests__/Storage.test.tsx","frontend-modern/src/components/Storage/__tests__/StorageGroupRow.test.tsx","frontend-modern/src/components/Storage/__tests__/StoragePoolDetail.test.tsx",+ "frontend-modern/src/components/Storage/__tests__/useDiskDetailModel.test.ts","frontend-modern/src/components/Storage/code_standards.test.ts",+ "frontend-modern/src/features/storageBackups/__tests__/diskPresentation.test.ts","frontend-modern/src/features/storageBackups/__tests__/resourceStorageMapping.test.ts","frontend-modern/src/features/storageBackups/__tests__/storageAdapters.test.ts","frontend-modern/src/features/storageBackups/__tests__/storageAlertState.test.ts",@@ -6659,11 +6697,16 @@"test_prefixes": [],"exact_files": ["frontend-modern/src/utils/__tests__/resourceIdentity.test.ts",+ "internal/hostagent/issue1595_sas_collection_test.go",+ "internal/monitoring/issue1595_collection_trust_test.go",+ "internal/truenas/contract_test.go","internal/unifiedresources/canonical_identity_test.go","internal/unifiedresources/canonical_ids_types_test.go","internal/unifiedresources/code_standards_test.go","internal/unifiedresources/identity_test.go",- "internal/unifiedresources/ids_test.go"+ "internal/unifiedresources/ids_test.go",+ "pkg/diskinventory/identity_test.go",+ "pkg/diskinventory/status_test.go"]},{@@ -6681,6 +6724,7 @@"test_prefixes": [],"exact_files": ["frontend-modern/src/stores/__tests__/websocket-unified.test.ts",+ "internal/monitoring/issue1595_collection_trust_test.go","internal/unifiedresources/adapter_coverage_test.go","internal/unifiedresources/adapters_test.go","internal/unifiedresources/host_storage_cleanup_test.go",@@ -7061,6 +7105,7 @@"allow_same_subsystem_tests": false,"test_prefixes": [],"exact_files": [+ "internal/monitoring/issue1595_collection_trust_test.go","internal/unifiedresources/availability_link_test.go","internal/unifiedresources/kubernetes_registry_test.go","internal/unifiedresources/pbs_pmg_registry_test.go",diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex 6709e63f02..574682829a 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -2180,6 +2180,34 @@ while storage detail drawers and filter controls must route summary series IDs,source tones, and disk metrics through the shared storage helpers instead ofreconstructing them from local table state.+### Physical-disk collection truth++Storage surfaces consume the unified physical-disk collection contract without+turning absence into health or activity. Serial identity, temperature, per-disk+I/O, controller association, and pool membership each carry one of+`available`, transiently `unavailable`, provider/controller `unsupported`, or+unexpectedly `missing`, plus bounded source and reason detail. Retained prior+values may remain visible as history, but their current collection state must+remain explicit. In particular, members behind a shared controller must not+inherit aggregate I/O counters, and a disk drawer must hide live-I/O charts+when per-member collection is unavailable or unsupported.++Direct SATA, SAS, and NVMe device fallback identities remain compatible.+Controller-member fallback identities add controller/target scope only where+needed to keep multiple members distinct; serial and WWN continue to take+precedence. These rules belong to deterministic Collection Trust and+read-state presentation. They do not establish backup coverage, restore+readiness, or any other Recovery Assurance conclusion, and they introduce no+storage mutation path outside canonical Actions.++`internal/hostagent/issue1595_sas_collection_test.go` and+`internal/monitoring/issue1595_collection_trust_test.go` prove wide-SAS+collection, normalization, identity, and read-state retention.+`frontend-modern/src/features/storageBackups/__tests__/diskPresentation.test.ts`,+`frontend-modern/src/components/Storage/__tests__/DiskDetail.test.tsx`, and+`frontend-modern/src/components/Storage/__tests__/useDiskDetailModel.test.ts`+prove the distinct operator-facing states and live-I/O suppression.+### Operational Trust posture rolloutProtection posture remains a provider-aware, subject-linked read model overdiff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.mdindex 8b156a3575..699bffab0f 100644--- a/docs/release-control/v6/internal/subsystems/unified-resources.md+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md@@ -1815,6 +1815,51 @@ through the canonical resource model, but unified-resource consumers must notreintroduce removed workload aliases or feature-local resource-type shims justto satisfy one table, drawer, or badge surface.+### Physical-disk identity and collection read state++`pkg/diskinventory` owns deterministic physical-disk fallback identity and+field-level collection state. Serial remains preferred over WWN, and both+remain preferred over device fallback. Direct SATA, SAS, and NVMe fallbacks+retain their historical device-scoped shape; controller members sharing one+block path add controller/target scope so they cannot collapse into one+resource. Topology correlation is parent-scoped and ambiguity fails closed.++Host reports, monitoring models, registry merges, typed physical-disk views,+API resources, websocket/REST snapshot merges, and storage presentation must+round-trip controller, target, per-member I/O, storage-group membership, and+the five field statuses for serial, temperature, I/O, controller, and pool.+`available` evidence wins over weaker observations per field. A current+`unavailable`, `unsupported`, or `missing` state may retain a prior value for+continuity, but the state and reason must survive so the consumer cannot claim+fresh evidence or synthesize controller-level activity for one member.++### Canonical identity succession++Connection-backed TrueNAS systems keep connection-scoped canonical IDs across+reported hostname or machine-identity changes, and separate connections with+the same hostname remain distinct. Legacy hostname-derived IDs may be exposed+as explicit `SupersededCanonicalIDs`; registry persistence may re-key owned+operator state and delete the retired pin, while ordinary aliases remain+read-only lookup compatibility. Identity pins from an unrelated Pulse Agent+must not complete or merge a TrueNAS connection identity.++`canonicalIdentity.supersededIds` is preserved across backend projection and+thin/fresh frontend snapshot merges. Only this explicit succession set may+authorize another subsystem to migrate durable keys. Unified resources owns+identity and read-state truth, not alert configuration writes, Recovery+Assurance, or customer-infrastructure mutation; canonical Actions remains the+sole mutation plane.++`pkg/diskinventory/identity_test.go`,+`pkg/diskinventory/status_test.go`,+`internal/hostagent/issue1595_sas_collection_test.go`,+`internal/monitoring/issue1595_collection_trust_test.go`, and+`internal/truenas/contract_test.go` prove identity, collection, registry+read-state, and TrueNAS succession behavior.+`frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts` and+`frontend-modern/src/utils/__tests__/resourceStateAdapters.test.ts` prove+browser projection and snapshot-merge continuity.+### Operational Trust relationship identityOperational Trust relationships use a stable normalized relationship ID anddiff --git a/frontend-modern/src/utils/__tests__/resourceStateAdapters.test.ts b/frontend-modern/src/utils/__tests__/resourceStateAdapters.test.tsindex 87ed2c394a..5259f67da5 100644--- a/frontend-modern/src/utils/__tests__/resourceStateAdapters.test.ts+++ b/frontend-modern/src/utils/__tests__/resourceStateAdapters.test.ts@@ -365,6 +365,38 @@ describe('resourceStateAdapters nodeFromResource', () => {expect(resource.platformScopes).toEqual(['proxmox-pve', 'docker']);});+ it('preserves canonical identity succession across thin realtime merges', () => {+ const existing = {+ ...createNodeResource({ proxmox: { nodeName: 'pve-node-1' } }),+ canonicalIdentity: {+ primaryId: 'agent:connection-current',+ aliases: ['agent-current', 'node-1'],+ supersededIds: ['agent-retired-before-refresh'],+ },+ } as Resource;++ const [resource] = mergeCanonicalResourceSnapshot(+ [+ {+ ...existing,+ lastSeen: Date.now(),+ canonicalIdentity: {+ primaryId: 'agent:connection-current',+ aliases: ['agent-current'],+ supersededIds: ['agent-retired-in-refresh'],+ },+ } as Resource,+ ],+ [existing],+ );++ expect(resource.canonicalIdentity).toMatchObject({+ primaryId: 'agent:connection-current',+ aliases: ['agent-current', 'node-1'],+ supersededIds: ['agent-retired-in-refresh', 'agent-retired-before-refresh'],+ });+ });+it('canonicalizes agentless availability realtime resources as availability endpoints', () => {const [resource] = mergeCanonicalResourceSnapshot([diff --git a/scripts/release_control/canonical_completion_guard_test.py b/scripts/release_control/canonical_completion_guard_test.pyindex ea3f1feca4..cc80dd5a0a 100644--- a/scripts/release_control/canonical_completion_guard_test.py+++ b/scripts/release_control/canonical_completion_guard_test.py@@ -231,6 +231,7 @@ class CanonicalCompletionGuardTest(unittest.TestCase):"container-entrypoint-runtime","mock-runtime-fixtures","pbs-protection-evidence-runtime",+ "diskinventory-collection-trust","monitoring-runtime",],)@@ -246,6 +247,8 @@ class CanonicalCompletionGuardTest(unittest.TestCase):"exact_files": ["internal/monitoring/availability_poller_test.go","internal/monitoring/canonical_guardrails_test.go",+ "internal/monitoring/issue1595_collection_trust_test.go",+ "internal/monitoring/monitor_alert_override_migration_test.go","internal/monitoring/monitor_backups_readstate_test.go","internal/monitoring/monitor_host_agents_test.go","internal/unifiedresources/code_standards_test.go",@@ -339,6 +342,7 @@ class CanonicalCompletionGuardTest(unittest.TestCase):"allow_same_subsystem_tests": False,"test_prefixes": [],"exact_files": [+ "internal/monitoring/issue1595_collection_trust_test.go","internal/monitoring/monitor_host_agents_test.go","internal/monitoring/monitor_package_updates_test.go","internal/unifiedresources/code_standards_test.go",@@ -378,6 +382,42 @@ class CanonicalCompletionGuardTest(unittest.TestCase):],)+ def test_diskinventory_runtime_uses_collection_trust_policy(self):+ required = infer_impacted_subsystems(+ [+ "pkg/diskinventory/identity.go",+ "pkg/diskinventory/status.go",+ ]+ )+ self.assertEqual(set(required), {"monitoring"})++ monitoring = required["monitoring"]+ self.assertEqual(+ monitoring["contract"],+ "docs/release-control/v6/internal/subsystems/monitoring.md",+ )+ self.assertEqual(+ monitoring["verification_requirements"],+ [+ {+ "id": "diskinventory-collection-trust",+ "label": "physical-disk collection trust and identity proof",+ "touched_runtime_files": [+ "pkg/diskinventory/identity.go",+ "pkg/diskinventory/status.go",+ ],+ "allow_same_subsystem_tests": False,+ "test_prefixes": [],+ "exact_files": [+ "internal/hostagent/issue1595_sas_collection_test.go",+ "internal/monitoring/issue1595_collection_trust_test.go",+ "pkg/diskinventory/identity_test.go",+ "pkg/diskinventory/status_test.go",+ ],+ }+ ],+ )+def test_install_script_change_uses_unified_agent_installer_policy(self):required = infer_impacted_subsystems(["scripts/install.sh"])self.assertEqual(set(required), {"agent-lifecycle", "deployment-installability"})@@ -401,6 +441,7 @@ class CanonicalCompletionGuardTest(unittest.TestCase):"allow_same_subsystem_tests": False,"test_prefixes": [],"exact_files": [+ "scripts/installtests/agent_state_dir_lifecycle_test.go","scripts/installtests/install_sh_test.go",],}@@ -425,6 +466,7 @@ class CanonicalCompletionGuardTest(unittest.TestCase):"allow_same_subsystem_tests": False,"test_prefixes": [],"exact_files": [+ "scripts/installtests/agent_state_dir_lifecycle_test.go","scripts/installtests/install_sh_test.go",],}@@ -556,6 +598,7 @@ class CanonicalCompletionGuardTest(unittest.TestCase):"internal/hostagent/commands_host_update_test.go","internal/hostagent/commands_storage_cleanup_test.go","internal/hostagent/docker_lifecycle_test.go",+ "internal/hostagent/issue1595_sas_collection_test.go","internal/hostagent/observer_delivery_test.go","internal/hostagent/package_updates_test.go","internal/hostagent/send_report_test.go",@@ -1026,6 +1069,7 @@ class CanonicalCompletionGuardTest(unittest.TestCase):"test_prefixes": ["frontend-modern/src/api/__tests__/"],"exact_files": ["frontend-modern/src/types/api.ts",+ "internal/api/ai_handlers_patrol_actions_additional_test.go","internal/api/contract_test.go","internal/api/patrol_autopilot_test.go",],@@ -2114,6 +2158,7 @@ None yet."frontend-modern/src/features/alerts/__tests__/helpers.test.ts","frontend-modern/src/features/alerts/identity.test.ts","frontend-modern/src/features/alerts/thresholds/__tests__/helpers.test.ts",+ "frontend-modern/src/features/alerts/thresholds/hooks/__tests__/truenasThresholdPersistence.test.tsx","frontend-modern/src/features/alerts/thresholds/hooks/__tests__/useThresholdsTableState.test.tsx","frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts","frontend-modern/src/utils/__tests__/alertOverviewPresentation.test.ts",diff --git a/scripts/release_control/registry_audit_test.py b/scripts/release_control/registry_audit_test.pyindex f72260d2b0..8a42b5b4e9 100644--- a/scripts/release_control/registry_audit_test.py+++ b/scripts/release_control/registry_audit_test.py@@ -43,6 +43,96 @@ class RegistryAuditTest(unittest.TestCase):self.assertTrue(args.check)self.assertTrue(args.staged)+ def test_trust_gate_regression_proofs_are_registered_to_exact_policies(self) -> None:+ registry = registry_audit.load_registry_payload()+ rules = {rule["id"]: rule for rule in registry["subsystems"]}++ def policy(subsystem_id: str, policy_id: str) -> dict:+ return next(+ item+ for item in rules[subsystem_id]["verification"]["path_policies"]+ if item["id"] == policy_id+ )++ expected = {+ ("agent-lifecycle", "pulse-agent-cli-entrypoint"): {+ "scripts/installtests/agent_state_dir_lifecycle_test.go",+ },+ ("agent-lifecycle", "unified-agent-runtime"): {+ "internal/hostagent/issue1595_sas_collection_test.go",+ },+ ("agent-lifecycle", "unified-agent-installer-runtime"): {+ "scripts/installtests/agent_state_dir_lifecycle_test.go",+ },+ ("deployment-installability", "shell-installer-runtime"): {+ "scripts/installtests/agent_state_dir_lifecycle_test.go",+ },+ ("ai-runtime", "patrol-qualification"): {+ "frontend-modern/src/features/patrol/__tests__/patrolRunAcceptance.test.ts",+ "internal/ai/patrol_manual_acceptance_test.go",+ },+ ("ai-runtime", "ai-api-surface"): {+ "internal/api/ai_handlers_patrol_actions_additional_test.go",+ },+ ("alerts", "alerts-frontend-surface"): {+ "frontend-modern/src/features/alerts/thresholds/hooks/__tests__/truenasThresholdPersistence.test.tsx",+ },+ ("alerts", "alerts-runtime-support"): {+ "internal/alerts/canonical_override_migration_test.go",+ "internal/monitoring/monitor_alert_override_migration_test.go",+ },+ ("api-contracts", "backend-payload-contracts"): {+ "internal/api/ai_handlers_patrol_actions_additional_test.go",+ },+ ("monitoring", "host-agent-ingest-runtime"): {+ "internal/monitoring/issue1595_collection_trust_test.go",+ },+ ("monitoring", "runtime-report-model"): {+ "internal/monitoring/issue1595_collection_trust_test.go",+ },+ ("monitoring", "monitoring-runtime"): {+ "internal/monitoring/issue1595_collection_trust_test.go",+ "internal/monitoring/monitor_alert_override_migration_test.go",+ },+ ("monitoring", "diskinventory-collection-trust"): {+ "internal/hostagent/issue1595_sas_collection_test.go",+ "internal/monitoring/issue1595_collection_trust_test.go",+ "pkg/diskinventory/identity_test.go",+ "pkg/diskinventory/status_test.go",+ },+ ("patrol-intelligence", "patrol-page-and-state"): {+ "frontend-modern/src/features/patrol/__tests__/patrolRunAcceptance.test.ts",+ "frontend-modern/src/features/patrol/__tests__/usePatrolIntelligenceState.test.ts",+ },+ ("storage-recovery", "storage-product-surface"): {+ "frontend-modern/src/components/Storage/__tests__/DiskDetail.test.tsx",+ "frontend-modern/src/components/Storage/__tests__/useDiskDetailModel.test.ts",+ "frontend-modern/src/features/storageBackups/__tests__/diskPresentation.test.ts",+ },+ ("unified-resources", "identity-canonicalization"): {+ "internal/hostagent/issue1595_sas_collection_test.go",+ "internal/monitoring/issue1595_collection_trust_test.go",+ "internal/truenas/contract_test.go",+ "pkg/diskinventory/identity_test.go",+ "pkg/diskinventory/status_test.go",+ },+ ("unified-resources", "read-state-views"): {+ "internal/monitoring/issue1595_collection_trust_test.go",+ },+ ("unified-resources", "resource-runtime-adapter-helpers"): {+ "frontend-modern/src/utils/__tests__/resourceStateAdapters.test.ts",+ },+ ("unified-resources", "platform-registry-runtime"): {+ "internal/monitoring/issue1595_collection_trust_test.go",+ },+ }++ for (subsystem_id, policy_id), proof_files in expected.items():+ with self.subTest(subsystem=subsystem_id, policy=policy_id):+ self.assertTrue(+ proof_files.issubset(set(policy(subsystem_id, policy_id)["exact_files"]))+ )+def test_patrol_autopilot_registry_uses_dedicated_proof_and_rejects_drift(self) -> None:registry = registry_audit.load_registry_payload()rules = {rule["id"]: rule for rule in registry["subsystems"]}diff --git a/scripts/release_control/subsystem_lookup_test.py b/scripts/release_control/subsystem_lookup_test.pyindex bbcf569a7c..f4e2822e61 100644--- a/scripts/release_control/subsystem_lookup_test.py+++ b/scripts/release_control/subsystem_lookup_test.py@@ -18,6 +18,8 @@ PATROL_PAGE_AND_STATE_EXACT_FILES = ["frontend-modern/src/features/patrol/__tests__/PatrolIntelligenceHeader.test.ts","frontend-modern/src/features/patrol/__tests__/patrolControlPresentation.test.ts","frontend-modern/src/features/patrol/__tests__/patrolInvestigationContextModel.test.ts",+ "frontend-modern/src/features/patrol/__tests__/patrolRunAcceptance.test.ts",+ "frontend-modern/src/features/patrol/__tests__/usePatrolIntelligenceState.test.ts","frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx","frontend-modern/src/stores/__tests__/aiIntelligence.test.ts","frontend-modern/src/stores/__tests__/aiIntelligenceSummaryModel.test.ts",@@ -1349,7 +1351,10 @@ class SubsystemLookupTest(unittest.TestCase):)self.assertEqual(match["verification_requirement"]["exact_files"],- ["scripts/installtests/install_sh_test.go"],+ [+ "scripts/installtests/agent_state_dir_lifecycle_test.go",+ "scripts/installtests/install_sh_test.go",+ ],)match = by_subsystem["deployment-installability"]@@ -1364,7 +1369,10 @@ class SubsystemLookupTest(unittest.TestCase):)self.assertEqual(match["verification_requirement"]["exact_files"],- ["scripts/installtests/install_sh_test.go"],+ [+ "scripts/installtests/agent_state_dir_lifecycle_test.go",+ "scripts/installtests/install_sh_test.go",+ ],)def test_lookup_paths_assigns_docker_entrypoint_to_monitoring(self) -> None:@@ -4136,12 +4144,33 @@ class SubsystemLookupTest(unittest.TestCase):self.assertEqual(match["verification_requirement"]["exact_files"],[+ "internal/monitoring/issue1595_collection_trust_test.go","internal/monitoring/monitor_host_agents_test.go","internal/monitoring/monitor_package_updates_test.go","internal/unifiedresources/code_standards_test.go",],)+ def test_lookup_paths_assigns_diskinventory_to_monitoring_collection_trust(self) -> None:+ result = lookup_paths(["pkg/diskinventory/identity.go"])+ self.assertEqual(result["unowned_runtime_files"], [])++ match = result["files"][0]["matches"][0]+ self.assertEqual(match["subsystem"], "monitoring")+ self.assertEqual(+ match["verification_requirement"]["id"],+ "diskinventory-collection-trust",+ )+ self.assertEqual(+ match["verification_requirement"]["exact_files"],+ [+ "internal/hostagent/issue1595_sas_collection_test.go",+ "internal/monitoring/issue1595_collection_trust_test.go",+ "pkg/diskinventory/identity_test.go",+ "pkg/diskinventory/status_test.go",+ ],+ )+def test_lookup_paths_assigns_docker_swarm_runtime_to_monitoring(self) -> None:result = lookup_paths(["internal/dockeragent/swarm.go"])self.assertEqual(result["unowned_runtime_files"], [])@@ -4222,6 +4251,7 @@ class SubsystemLookupTest(unittest.TestCase):self.assertEqual(match["verification_requirement"]["exact_files"],[+ "internal/monitoring/issue1595_collection_trust_test.go","internal/unifiedresources/availability_link_test.go","internal/unifiedresources/kubernetes_registry_test.go","internal/unifiedresources/pbs_pmg_registry_test.go",@@ -4251,6 +4281,7 @@ class SubsystemLookupTest(unittest.TestCase):self.assertEqual(match["verification_requirement"]["exact_files"],[+ "internal/monitoring/issue1595_collection_trust_test.go","internal/unifiedresources/availability_link_test.go","internal/unifiedresources/kubernetes_registry_test.go","internal/unifiedresources/pbs_pmg_registry_test.go",@@ -4437,6 +4468,7 @@ class SubsystemLookupTest(unittest.TestCase):"internal/hostagent/commands_host_update_test.go","internal/hostagent/commands_storage_cleanup_test.go","internal/hostagent/docker_lifecycle_test.go",+ "internal/hostagent/issue1595_sas_collection_test.go","internal/hostagent/observer_delivery_test.go","internal/hostagent/package_updates_test.go","internal/hostagent/send_report_test.go",