feat(perception): seal detector replay evidence
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user