feat(perception): add dual evidence replay threat
This commit is contained in:
@@ -52,6 +52,20 @@ TEMPORAL_RUNTIME_MODULES = (
|
||||
"temporal_replay.py",
|
||||
"temporal_replay_cli.py",
|
||||
)
|
||||
THREAT_RUNTIME_MODULES = (
|
||||
"contracts.py",
|
||||
"detector_replay_contracts.py",
|
||||
"detector_replay_result.py",
|
||||
"geometry.py",
|
||||
"geometry_math.py",
|
||||
"geometry_replay.py",
|
||||
"providers.py",
|
||||
"recorded_source.py",
|
||||
"temporal_replay.py",
|
||||
"threat.py",
|
||||
"threat_replay.py",
|
||||
"threat_replay_cli.py",
|
||||
)
|
||||
|
||||
|
||||
def _imports(path: Path) -> set[str]:
|
||||
@@ -224,6 +238,25 @@ def test_temporal_runtime_closure_imports_no_legacy_compute_or_device_package()
|
||||
assert {name: modules for name, modules in violations.items() if modules} == {}
|
||||
|
||||
|
||||
def test_threat_runtime_closure_imports_no_legacy_compute_device_lab_or_web_package() -> None:
|
||||
violations = {
|
||||
name: sorted(
|
||||
module
|
||||
for module in _imports(PERCEPTION_ROOT / name)
|
||||
if module.startswith(
|
||||
(
|
||||
"k1link.compute",
|
||||
"k1link.device_plugins",
|
||||
"k1link.laboratory",
|
||||
"k1link.web",
|
||||
)
|
||||
)
|
||||
)
|
||||
for name in THREAT_RUNTIME_MODULES
|
||||
}
|
||||
assert {name: modules for name, modules in violations.items() if modules} == {}
|
||||
|
||||
|
||||
def test_new_perception_boundary_has_no_experiment_specific_imports() -> None:
|
||||
violations: dict[str, str] = {}
|
||||
for path in PERCEPTION_ROOT.glob("*.py"):
|
||||
|
||||
Reference in New Issue
Block a user