- mas_core: P2-maximal parser with required_profile, generator, statute schema + semantic lint + defaults-only inheritance, exact-host discovery with typed failures and same-origin redirects, pure policy resolver - mas_conformance: vendored spec fixtures (drift-tested) + property and statute cases - mas CLI: parse / explain / discover / lint-statute / test - mas-gateway: generic mail -> MAS event -> HTTP (MTA pipe + webhook) - examples: static great-service.example statute, reference ticket service - docs/experiment-review.md: first-pass findings; live MTA test still open Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: opus Assistant-Process: 623586@bnt-lap001 Assistant-Session: 10b30928-5b3b-4c11-9934-5ecca07367d8
34 lines
941 B
Python
34 lines
941 B
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. 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}")
|