feat(perception): add bounded reference graph

This commit is contained in:
DCCONSTRUCTIONS
2026-08-05 13:57:27 +03:00
parent ae1e41f7fe
commit 029b486c67
11 changed files with 1979 additions and 18 deletions
+16 -1
View File
@@ -36,7 +36,7 @@ def test_m4_baseline_is_exact_and_every_local_evidence_digest_resolves() -> None
verification = verify_m4_baseline(REPOSITORY_ROOT, profile)
assert verification.source_id == "RAVNOVES00"
assert verification.session_id == "20260720T065719Z_viewer_live"
assert len(verification.verified_paths) == 6
assert len(verification.verified_paths) == 10
def test_m4_baseline_cannot_silently_select_another_source(tmp_path: Path) -> None:
@@ -82,3 +82,18 @@ def test_new_perception_boundary_has_no_experiment_specific_imports() -> None:
):
violations[path.name] = module
assert violations == {}
def test_reference_graph_imports_only_an_admitted_compute_primitive() -> None:
inventory = validate_reuse_inventory(REUSE_PATH)
admitted = {
item["module"]
for item in inventory["reusable_primitives"]
if isinstance(item, dict) and isinstance(item.get("module"), str)
}
compute_imports = {
module
for module in _imports(PERCEPTION_ROOT / "graph.py")
if module.startswith("k1link.compute")
}
assert compute_imports <= admitted