from research import *
s=begin(627,'Audit source identity and inherited controls','Are the frozen sources unchanged, and are all inherited scope decisions retained?',{'snapshots':28,'primary_File52c':'a5ea84562101158b60d0cf296765d6eff38e7a2abda4e74ad1b353dfd13b9530'},['SOURCE_MANIFEST.json; current originals; C531 source controls'])
r=json.loads((ROOT/'prep/CURRENT_SOURCE_AUDIT.json').read_text());m=json.loads((ROOT/'evidence/SOURCE_MANIFEST.json').read_text());snapshot_ok=all(hashlib.sha256((ROOT/'evidence/sources'/name).read_bytes()).hexdigest()==h for name,h in m.items())
controls={'primary':'latest File52c','second_decimal_inversion':'deferred','primers':'Moses and1876 quarantined;1486 not reopened','Gear':'Noah/Shem/Flood only','LXX':'182/753 main;777 appendix;188 nonoperative;native Cainan ON','Cainan_units':'regular130 versus cumulative460','SP':'653 inclusive;53rd year52 completed;minus1 companion local','crossings':'civil BC+AD−1;rounded BC+AD−2;no year zero','source_files':'unchanged','statistics':'no new tally'}
meta=artifact('model/FROZEN_CONTROLS.json',json.dumps(controls,indent=2,ensure_ascii=False)+'\n')
finish(s,{'source_audit':r,'controls':meta},'All28 snapshots and29 available original copies match their frozen identities, including the latest File52c and C531 predecessor. The control register retains all inherited source, phase, Gear, primer and inversion decisions.','Complete final editorial and visual review before writing the continuation checkpoint.',{'snapshots':snapshot_ok,'current_sources':r['all_hashes_match'] and r['current_copies']==29 and not r['missing'],'primary':r['primary_File52c']==s['inputs']['primary_File52c']})
