Check accepted layer v0.8 and nested declaration pins
Assistant: codex Assistant-Model: gpt-6.1-sol Assistant-Session: 01a126e1-76f8-7643-8cf3-e93336539ade
This commit is contained in:
parent
407fa86b97
commit
b5a6f88a82
3 changed files with 85 additions and 21 deletions
37
tests/test_layer_v08_convergence.py
Normal file
37
tests/test_layer_v08_convergence.py
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
"""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 / "tools/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.declaration_versions(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
|
||||
Loading…
Add table
Add a link
Reference in a new issue