conformance/statute-aware.json (vendored as mas_conformance/statute_aware.json) covers the 6.3 stand-in table, resource_id_case equivalence and the 12.1 destination results and refusals; mas test runs it. Misread refusals now name the field that would change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: opus Assistant-Process: 5787@bnt-lap001 Assistant-Session: 5db26b82-138b-40cc-9856-4d5eb0f752fd
41 lines
1.2 KiB
Python
41 lines
1.2 KiB
Python
"""MAS v0.1 conformance corpus.
|
|
|
|
`addresses.json` is vendored unchanged from the spec bundle
|
|
(`mas-v0.1-spec/conformance/addresses.json`) and is normative.
|
|
`properties.json` adds implementation-independent property and boundary
|
|
cases. `statutes/` holds statute validation cases. `statute_aware.json` is
|
|
vendored unchanged from the v0.2 draft bundle
|
|
(`mas-v0.2-spec/conformance/statute-aware.json`). Every language
|
|
implementation should consume these files unchanged.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
from importlib import resources
|
|
|
|
|
|
def _load(name: str):
|
|
return json.loads(resources.files(__name__).joinpath(name).read_text(encoding="utf-8"))
|
|
|
|
|
|
def address_fixtures() -> list[dict]:
|
|
return _load("addresses.json")
|
|
|
|
|
|
def property_fixtures() -> list[dict]:
|
|
return _load("properties.json")
|
|
|
|
|
|
def statute_cases() -> list[dict]:
|
|
"""Each case: {id, file, host, expect: "valid"|"schema"|"semantic", codes?}."""
|
|
return _load("statutes/cases.json")
|
|
|
|
|
|
def statute_document(file: str) -> dict:
|
|
return _load(f"statutes/{file}")
|
|
|
|
|
|
def statute_aware_fixtures() -> dict:
|
|
"""v0.2: {statutes, interpretation, equivalence, destination}."""
|
|
return _load("statute_aware.json")
|