"""Run the AICC conformance scenarios against the testbed bridge. Usage: python -m testbed.conformance The same bridge used by the server and demo is exercised here, so a green suite proves the shipped bridge is protocol-conformant. Exit code 0 when all scenarios pass, 1 otherwise. """ from __future__ import annotations import asyncio import sys from pathlib import Path from aicc.conformance import run_scenarios, summarize from testbed.bridge import build_bridge def main() -> int: if len(sys.argv) < 2: print("usage: python -m testbed.conformance ") return 2 scenario_dir = Path(sys.argv[1]).resolve() bridge = build_bridge() results = asyncio.run(run_scenarios(bridge, scenario_dir)) print(summarize(results)) return 0 if all(r.passed for r in results) else 1 if __name__ == "__main__": raise SystemExit(main())