Implement canon conformance and maintenance optimizations
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 3s

Assistant: codex
Assistant-Model: gpt-6-astra
Assistant-Session: 01a06e82-3e08-7042-a79d-438ac6eed8db
This commit is contained in:
tegwick 2026-09-05 00:50:09 +02:00
parent a2e7f22d8d
commit b081d39da1
64 changed files with 4491 additions and 373 deletions

View file

@ -113,6 +113,21 @@ def build_parser() -> argparse.ArgumentParser:
capability_review.add_argument("record")
capability_review.set_defaults(handler=_capability_review)
emission = sub.add_parser("emission-review", help="Validate a source-owned YAML/JSON cadence declaration")
emission.add_argument("record")
emission.set_defaults(handler=_emission_review)
coverage = sub.add_parser("validation-coverage", help="List implemented checks and explicit limits")
coverage.set_defaults(handler=_coverage)
freshness = sub.add_parser("check-generated", help="Check projections without changing source files")
freshness.set_defaults(handler=_check_generated)
inventory = sub.add_parser("scope-inventory", help="Derive scope counts from the artifact registry")
inventory.set_defaults(handler=_scope_inventory)
bundle = sub.add_parser("export-emission-contract", help="Export a content-addressed contract tar")
bundle.add_argument("destination")
bundle.set_defaults(handler=_export_emission)
benchmark = sub.add_parser("benchmark-reads", help="Measure ten uncached inspect calls")
benchmark.set_defaults(handler=_benchmark_reads)
api = sub.add_parser("api", help="Run the read-only local API")
api.add_argument("--host", default="127.0.0.1")
api.add_argument("--port", type=int, default=8765)
@ -207,6 +222,41 @@ def _capability_review(args: argparse.Namespace) -> dict[str, Any]:
return review_capability_record(args.record, _root(args))
def _emission_review(args):
from .contracts import review_emission
return review_emission(args.record, _root(args))
def _coverage(args):
from .contracts import coverage
from .service import load_context
return coverage(load_context(_root(args)))
def _check_generated(args):
from .maintenance import check_generated
from .service import load_context
return check_generated(load_context(_root(args)))
def _scope_inventory(args):
from .maintenance import scope_inventory
from .service import load_context
return dict(scope_inventory(load_context(_root(args))), ok=True)
def _export_emission(args):
from .maintenance import export_emission_bundle
from .paths import infospace_root
return export_emission_bundle(infospace_root(_root(args)), Path(args.destination))
def _benchmark_reads(args):
from .maintenance import benchmark_reads
from .paths import infospace_root
return benchmark_reads(infospace_root(_root(args)))
def _profile_inspect(args: argparse.Namespace) -> dict[str, Any]:
return profile_inspect(args.profile, _root(args))