feat(perception): seal detector replay evidence

This commit is contained in:
DCCONSTRUCTIONS
2026-08-05 14:36:55 +03:00
parent a680debfaf
commit 95ac235122
12 changed files with 1754 additions and 31 deletions
+23
View File
@@ -49,6 +49,29 @@ def test_m4_baseline_cannot_silently_select_another_source(tmp_path: Path) -> No
load_m4_baseline(path)
@pytest.mark.parametrize(
("section", "key", "value", "message"),
(
("calibration", "valid_fov_mask_sha256", "0" * 64, "calibration"),
("detector", "minimum_score", 0.51, "detector"),
("rollback", "worker_node", "worker-007", "rollback"),
),
)
def test_m4_baseline_cannot_silently_tune_frozen_execution_identity(
tmp_path: Path,
section: str,
key: str,
value: object,
message: str,
) -> None:
document = json.loads(BASELINE_PATH.read_text("utf-8"))
document[section][key] = value
path = tmp_path / "baseline.json"
path.write_text(json.dumps(document), "utf-8")
with pytest.raises(BaselineContractError, match=message):
load_m4_baseline(path)
def test_reuse_inventory_separates_primitives_from_historical_wrappers() -> None:
document = validate_reuse_inventory(REUSE_PATH)
assert document["rules"]["bulk_legacy_migration_required"] is False