Bind checker to accepted v0.8 and preserve provenance distinctions
Assistant: codex Assistant-Model: gpt-6.1-sol Assistant-Session: 01a126e1-76f8-7643-8cf3-e93336539ade Assistant-Process: 8340@bnt-lap001
This commit is contained in:
parent
363e8160a4
commit
79ea443d9c
4 changed files with 98 additions and 35 deletions
|
|
@ -148,7 +148,7 @@ def test_no_version_anywhere_in_either_declaration():
|
|||
{"companion": "net-kingdom/v0.2/SECURITY-COMPANION.md"},
|
||||
{"companion_version": "0.2"},
|
||||
{"standard_version": "0.7"},
|
||||
{"framework": "netkingdom-security-layer-model 0.8"},
|
||||
{"standard": ["netkingdom-security-layer-model 0.8"]},
|
||||
],
|
||||
)
|
||||
def test_checker_catches_a_version_beyond_the_key_name(declaration):
|
||||
|
|
|
|||
42
tests/test_layer_v08_convergence.py
Normal file
42
tests/test_layer_v08_convergence.py
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
"""Accepted A12 r3 semantics, retaining local contact scanners and scope."""
|
||||
import importlib.util
|
||||
from pathlib import Path
|
||||
import pytest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
SCRIPT = ROOT / "scripts/check_layer_conformance.py"
|
||||
|
||||
def checker():
|
||||
spec = importlib.util.spec_from_file_location("v08_checker", SCRIPT)
|
||||
module = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(module)
|
||||
return module
|
||||
|
||||
@pytest.mark.parametrize("value,pinned", [
|
||||
({"intent_version": "0.3"}, False),
|
||||
({"spec_version": "0.7"}, False),
|
||||
({"note": "per v0.6 section 13"}, False),
|
||||
({"note": "revised 0.7 wording"}, False),
|
||||
({"schema_version": "0.1"}, False),
|
||||
({"standard": "security-layer-model 0.8"}, True),
|
||||
({"STANDARD": ["security-layer-model v0.8"]}, True),
|
||||
({"companion": [["SECURITY-COMPANION v0.3"]]}, True),
|
||||
({"nested": {"standard_version": "0.8"}}, True),
|
||||
({"nested": {"companion_version": "0.3"}}, True),
|
||||
({"references": ["security-layer-model@0.8"]}, True),
|
||||
({"references": ["security-layer-model_v0.7.md"]}, True),
|
||||
])
|
||||
def test_reference_pin_provenance_semantics(value, pinned):
|
||||
module = checker()
|
||||
assert bool(module.version_findings(value, "test")) is pinned
|
||||
|
||||
def test_run_names_exact_accepted_standard_and_scope():
|
||||
module = checker()
|
||||
assert "security-layer-model_v0.8.md" in module.VALIDATED_AGAINST
|
||||
assert "3d8298560069ef471fba28d2b1245fb2309328f231dad1a667cdf0ce5a5a7c8b" in module.VALIDATED_AGAINST
|
||||
assert "INTENT.md" in module.SCOPE
|
||||
|
||||
def test_ascii_fold_never_discards_non_ascii_characters():
|
||||
module = checker()
|
||||
assert module._fold("Enginée") not in module.LAYER_VOCABULARY
|
||||
assert module._fold("ENGINE") == "engine"
|
||||
Loading…
Add table
Add a link
Reference in a new issue