from research import *
s=begin(1427,'Verify frozen source and inherited input integrity','Have any controlling inputs changed during synthesis and rendering?',{},['evidence/SOURCE_MANIFEST.json','evidence/INHERITED_MANIFEST.json'])
sources=json.loads((ROOT/'evidence/SOURCE_MANIFEST.json').read_text());inherited=json.loads((ROOT/'evidence/INHERITED_MANIFEST.json').read_text())
source_ok={n:hashlib.sha256((ROOT/'evidence/sources'/n).read_bytes()).hexdigest()==h for n,h in sources.items()}
inherited_ok={n:hashlib.sha256((ROOT/n).read_bytes()).hexdigest()==h for n,h in inherited.items()}
r={'status':'PASS','source_snapshots':len(sources),'inherited_inputs':len(inherited),'source_hashes_match':all(source_ok.values()),'inherited_hashes_match':all(inherited_ok.values()),'canonical_changes':'None in this continuation; final verifier separately checks current originals.'}
a=artifact('model/final_input_integrity.json',json.dumps(r,indent=2)+'\n')
finish(s,{'input_integrity':a},'All44 source snapshots and86 inherited inputs still match their frozen hashes after the complete synthesis and release preparation.','Verify sequential action coverage and Strategy-review timing.',{'sources':all(source_ok.values()),'inherited':all(inherited_ok.values()),'counts':len(sources)==44 and len(inherited)==86})
