from pathlib import Path
import json, importlib.util
R=Path(__file__).resolve().parent
cases=json.loads((R/'fixtures/cases.json').read_text(encoding='utf-8'))['cases']
assert len(cases)==8
required={'budget_state','quota_state','circuit_state','retry_state','usage_evidence_state','fallback_state','final_action','reason_class'}
spec=importlib.util.spec_from_file_location('starter',R/'starter.py'); m=importlib.util.module_from_spec(spec); spec.loader.exec_module(m)
for case in cases:
    try: out=m.evaluate(case)
    except NotImplementedError: continue
    assert set(out)==required, (case['id'],set(out),required)
print('PASS fixture/schema checks; implement evaluate() to test your policy locally')
