MAS-WP-0005-T08: v0.2 stand-ins and resource_id_case in policy; lint; gateway reports canonical form
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: opus Assistant-Process: 252470@bnt-lap001 Assistant-Session: ad628c8f-4be2-4979-94c9-76c7ed6f8241
This commit is contained in:
parent
7d978f1f26
commit
eb10f54fd2
6 changed files with 165 additions and 7 deletions
|
|
@ -110,3 +110,14 @@ def test_v01_statute_rejects_v02_fields():
|
|||
doc = statute_document("valid-great-service.json")
|
||||
doc["alternate_syntax"] = {"resource": True}
|
||||
assert any(f.severity == ERROR and f.layer == "schema" for f in lint(doc, "great-service.example"))
|
||||
|
||||
|
||||
def test_stand_in_lint():
|
||||
doc = _v02(alternate_syntax={"resource": True, "interaction": True})
|
||||
doc["addresses"]["ticket--legacy"] = {"kind": "function"}
|
||||
doc["addresses"]["sales---callback"] = {"kind": "function"}
|
||||
codes = [f.code for f in lint(doc, "great-service.example") if f.severity == ERROR]
|
||||
assert codes.count("stand-in-collision") == 2
|
||||
off = _v02()
|
||||
off["addresses"]["ticket--legacy"] = {"kind": "function"}
|
||||
assert "stand-in-collision" not in {f.code for f in lint(off, "great-service.example")}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue