feat(detection-core): migrate test and operational consumers

This commit is contained in:
Marius Ciepluch
2026-11-04 08:53:21 +01:00
parent 11059c4cd4
commit 10e93e09b7
27 changed files with 5971 additions and 1407 deletions
+12 -2
View File
@@ -138,6 +138,16 @@ def test_legacy_decoder_has_no_compatibility_or_v2_domain_dependency() -> None:
def test_legacy_reader_is_not_reexported_from_the_public_core_api() -> None:
import openultrasast.core as core
path = REPO / "src/openultrasast/core/__init__.py"
content = path.read_bytes()
assert content, "the public-boundary instrument must read nonzero package bytes"
tree = ast.parse(content, filename=str(path.relative_to(REPO)))
exported = {
value.value
for node in ast.walk(tree)
if isinstance(node, ast.Assign)
for value in ast.walk(node.value)
if isinstance(value, ast.Constant) and isinstance(value.value, str)
}
assert not ({"LegacyArtifact", "decode_legacy_artifact", "read_legacy_artifact"} & set(core.__all__))
assert not ({"LegacyArtifact", "decode_legacy_artifact", "read_legacy_artifact"} & exported)