import json
from pathlib import Path
p=Path(__file__).parent
checks={}
for lane in 'BC':
    e=json.loads((p/f'evidence-{lane}.json').read_text())
    checks[lane+'_no_false_positive_pass']=e['positive_business_success']==0
    checks[lane+'_four_actual_scoped_requests']=len(e['cases'])==4 and e['scoped_actual_HTTP']==4
    checks[lane+'_real_method_paths']=all(c['method']=='POST' for c in e['cases'])
    checks[lane+'_unit_404_string2']=all(c['http_status']==404 and c['business_code']=='2' for c in e['cases'][:3])
    checks[lane+'_annex_column_error']=e['cases'][3]['http_status']==200 and e['cases'][3]['business_code']==1
    checks[lane+'_both_missing_columns']=e['preflight']['missing_projection_columns']==['upload_time','file_size']
    checks[lane+'_source_and_actor_unchanged']=e['final_source_audit']['fixed_scope_unchanged'] and e['final_source_audit']['actor_projection_unchanged']
checks['C_three_CLI_message_pattern_failures_preserved']=json.loads((p/'evidence-C.json').read_text())['CLI_stats']['assertions']['failed']==3
print(json.dumps({'evidence_consistency_only':checks,'passed':all(checks.values()),'business_interfaces_passed':0},indent=2))
raise SystemExit(0 if all(checks.values()) else 1)
