Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Keep Recovery overview proof separate from transfer safety

pulse-triage[bot]77350524c4ab
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index c7dcae13c2..4ef6fe57fc 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -10014,6 +10014,12 @@ existing dialog actions and passphrase defaults; desktop/narrow browser proof
must inspect the overview and follow both actions into the production dialogs.
Archive formats, server application and access authority do not change.
+The overview has its own `settings-recovery-overview` verification policy,
+requiring `RecoverySettingsPanel.test.tsx`. That copy/action test is not transfer
+safety proof: `settings-configuration-transfer` retains its existing dialog/flow
+test alternatives without the overview test. Changes spanning both policies must
+satisfy both; generic settings framing cannot substitute for either.
+
Recovery's export/import dialogs capture and display the effective workspace ID
when opened, including explicit `default` scope. Their production flow freezes
inputs before asynchronous file reads, binds both POSTs through the API client's
diff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.json
index edcda57657..c1aaa3bd4e 100644
--- a/docs/release-control/v6/internal/subsystems/registry.json
+++ b/docs/release-control/v6/internal/subsystems/registry.json
@@ -5591,17 +5591,28 @@
"match_prefixes": [],
"match_files": [
"frontend-modern/src/components/Settings/BackupTransferDialogs.tsx",
- "frontend-modern/src/components/Settings/RecoverySettingsPanel.tsx",
"frontend-modern/src/components/Settings/useBackupTransferFlow.ts"
],
"allow_same_subsystem_tests": false,
"test_prefixes": [],
"exact_files": [
"frontend-modern/src/components/Settings/__tests__/BackupTransferDialogs.test.tsx",
- "frontend-modern/src/components/Settings/__tests__/RecoverySettingsPanel.test.tsx",
"frontend-modern/src/components/Settings/__tests__/useBackupTransferFlow.test.ts"
]
},
+ {
+ "id": "settings-recovery-overview",
+ "label": "recovery overview disclosure and actions proof",
+ "match_prefixes": [],
+ "match_files": [
+ "frontend-modern/src/components/Settings/RecoverySettingsPanel.tsx"
+ ],
+ "allow_same_subsystem_tests": false,
+ "test_prefixes": [],
+ "exact_files": [
+ "frontend-modern/src/components/Settings/__tests__/RecoverySettingsPanel.test.tsx"
+ ]
+ },
{
"id": "settings-update-install-guide",
"label": "settings update install guide proof",
diff --git a/scripts/release_control/canonical_completion_guard_test.py b/scripts/release_control/canonical_completion_guard_test.py
index 872efd6c8f..f85d63e1d6 100644
--- a/scripts/release_control/canonical_completion_guard_test.py
+++ b/scripts/release_control/canonical_completion_guard_test.py
@@ -3001,12 +3001,10 @@ None yet.
rule = next(rule for rule in load_subsystem_rules() if rule["id"] == "frontend-primitives")
proofs = [
"frontend-modern/src/components/Settings/__tests__/BackupTransferDialogs.test.tsx",
- "frontend-modern/src/components/Settings/__tests__/RecoverySettingsPanel.test.tsx",
"frontend-modern/src/components/Settings/__tests__/useBackupTransferFlow.test.ts",
]
for runtime in [
"frontend-modern/src/components/Settings/BackupTransferDialogs.tsx",
- "frontend-modern/src/components/Settings/RecoverySettingsPanel.tsx",
"frontend-modern/src/components/Settings/useBackupTransferFlow.ts",
]:
with self.subTest(runtime=runtime):
@@ -3027,16 +3025,84 @@ None yet.
staged_verification_files_for_requirement(rule, requirements[0], [proof]),
[proof],
)
- # Generic settings framing must not stand in for transfer safety.
+ # Overview copy and generic framing cannot prove transfer safety.
self.assertEqual(
staged_verification_files_for_requirement(
rule,
requirements[0],
- ["frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts"],
+ [
+ "frontend-modern/src/components/Settings/__tests__/RecoverySettingsPanel.test.tsx",
+ "frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts",
+ ],
),
[],
)
+ def test_recovery_overview_requires_its_direct_behavioral_proof(self):
+ rule = next(rule for rule in load_subsystem_rules() if rule["id"] == "frontend-primitives")
+ runtime = "frontend-modern/src/components/Settings/RecoverySettingsPanel.tsx"
+ proof = "frontend-modern/src/components/Settings/__tests__/RecoverySettingsPanel.test.tsx"
+ requirements = build_verification_requirements(rule, [runtime])
+ self.assertEqual(
+ requirements,
+ [{
+ "id": "settings-recovery-overview",
+ "label": "recovery overview disclosure and actions proof",
+ "touched_runtime_files": [runtime],
+ "allow_same_subsystem_tests": False,
+ "test_prefixes": [],
+ "exact_files": [proof],
+ }],
+ )
+ self.assertEqual(
+ staged_verification_files_for_requirement(rule, requirements[0], [proof]),
+ [proof],
+ )
+ self.assertEqual(
+ staged_verification_files_for_requirement(
+ rule,
+ requirements[0],
+ [
+ "frontend-modern/src/components/Settings/__tests__/BackupTransferDialogs.test.tsx",
+ "frontend-modern/src/components/Settings/__tests__/useBackupTransferFlow.test.ts",
+ "frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts",
+ ],
+ ),
+ [],
+ )
+
+ def test_recovery_and_transfer_edits_require_independent_proofs(self):
+ rules = load_subsystem_rules()
+ overview = "frontend-modern/src/components/Settings/RecoverySettingsPanel.tsx"
+ overview_proof = "frontend-modern/src/components/Settings/__tests__/RecoverySettingsPanel.test.tsx"
+ transfer_proofs = [
+ "frontend-modern/src/components/Settings/__tests__/BackupTransferDialogs.test.tsx",
+ "frontend-modern/src/components/Settings/__tests__/useBackupTransferFlow.test.ts",
+ ]
+ for transfer in [
+ "frontend-modern/src/components/Settings/BackupTransferDialogs.tsx",
+ "frontend-modern/src/components/Settings/useBackupTransferFlow.ts",
+ ]:
+ for transfer_proof in transfer_proofs:
+ for paths, expected in [
+ ([transfer, overview_proof], 1),
+ ([transfer, transfer_proof], 0),
+ ([overview, transfer_proof], 1),
+ ([overview, overview_proof], 0),
+ ([overview, transfer, overview_proof], 1),
+ ([overview, transfer, transfer_proof], 1),
+ ([overview, transfer, overview_proof, transfer_proof], 0),
+ ]:
+ with (
+ self.subTest(paths=paths),
+ patch.dict(os.environ, {CONTRACT_NEUTRAL_OVERRIDE_ENV: ""}, clear=False),
+ patch("canonical_completion_guard.load_subsystem_rules", return_value=rules),
+ # Isolate verification routing from contract-edit checks.
+ patch("canonical_completion_guard.required_contract_updates", return_value={}),
+ redirect_stderr(io.StringIO()),
+ ):
+ self.assertEqual(check_staged_contracts(paths), expected)
+
def test_frontend_primitive_remaining_settings_shells_use_specific_guardrails(self):
rule = next(rule for rule in load_subsystem_rules() if rule["id"] == "frontend-primitives")
runtime_files = [
diff --git a/scripts/release_control/subsystem_lookup_test.py b/scripts/release_control/subsystem_lookup_test.py
index 68be50ea79..1b04031eb5 100644
--- a/scripts/release_control/subsystem_lookup_test.py
+++ b/scripts/release_control/subsystem_lookup_test.py
@@ -2630,12 +2630,19 @@ class SubsystemLookupTest(unittest.TestCase):
],
)
- def test_lookup_paths_assigns_configuration_transfer_surfaces_to_specific_proofs(self) -> None:
+ def test_lookup_paths_separates_transfer_and_recovery_overview_proofs(self) -> None:
runtime_files = [
"frontend-modern/src/components/Settings/BackupTransferDialogs.tsx",
"frontend-modern/src/components/Settings/RecoverySettingsPanel.tsx",
"frontend-modern/src/components/Settings/useBackupTransferFlow.ts",
]
+ transfer_proofs = [
+ "frontend-modern/src/components/Settings/__tests__/BackupTransferDialogs.test.tsx",
+ "frontend-modern/src/components/Settings/__tests__/useBackupTransferFlow.test.ts",
+ ]
+ overview_proofs = [
+ "frontend-modern/src/components/Settings/__tests__/RecoverySettingsPanel.test.tsx",
+ ]
result = lookup_paths(runtime_files)
self.assertEqual(result["unowned_runtime_files"], [])
self.assertEqual(
@@ -2651,12 +2658,34 @@ class SubsystemLookupTest(unittest.TestCase):
self.assertEqual(match["subsystem"], "frontend-primitives")
self.assertEqual(match["contract"], "docs/release-control/v6/internal/subsystems/frontend-primitives.md")
self.assertEqual(match["lane_context"]["lane_id"], "L8")
- self.assertEqual(match["verification_requirement"]["id"], "settings-configuration-transfer")
- self.assertEqual(match["verification_requirement"]["exact_files"], [
- "frontend-modern/src/components/Settings/__tests__/BackupTransferDialogs.test.tsx",
- "frontend-modern/src/components/Settings/__tests__/RecoverySettingsPanel.test.tsx",
- "frontend-modern/src/components/Settings/__tests__/useBackupTransferFlow.test.ts",
- ])
+ is_overview = file_entry["path"].endswith("/RecoverySettingsPanel.tsx")
+ self.assertEqual(
+ match["verification_requirement"]["id"],
+ "settings-recovery-overview" if is_overview else "settings-configuration-transfer",
+ )
+ self.assertEqual(
+ match["verification_requirement"]["exact_files"],
+ overview_proofs if is_overview else transfer_proofs,
+ )
+ requirements = result["impacted_subsystems"][0]["verification_requirements"]
+ self.assertEqual(
+ {item["id"] for item in requirements},
+ {"settings-configuration-transfer", "settings-recovery-overview"},
+ )
+
+ # Reverse lookup must not advertise overview tests as transfer proof,
+ # nor transfer tests as overview proof.
+ proof_result = lookup_paths(transfer_proofs + overview_proofs)
+ for file_entry in proof_result["files"]:
+ with self.subTest(proof=file_entry["path"]):
+ self.assertEqual(file_entry["classification"], "test-or-fixture")
+ self.assertEqual(len(file_entry["matches"]), 1)
+ self.assertEqual(
+ file_entry["matches"][0]["verification_requirement"]["id"],
+ "settings-recovery-overview"
+ if file_entry["path"] in overview_proofs
+ else "settings-configuration-transfer",
+ )
def test_lookup_paths_assigns_remaining_settings_shell_panels_to_frontend_primitives(self) -> None:
runtime_files = [