from research import *
s=begin(872,'Freeze the complete operator-domain packet','Which grids and whole source fields will test the Keys?',{},['Strategy §§5C,5E,5F','File12','File46','File51a','File63'])
p=json.loads((ROOT/'prep/operator_inputs.json').read_text())
bindings=json.loads((ROOT/'evidence/SOURCE_BINDINGS.json').read_text())
for key,v in p['sources'].items():
 names=[n for n,path in bindings.items() if path==v['path']]
 assert len(names)==1
 assert hashlib.sha256((ROOT/'evidence/sources'/names[0]).read_bytes()).hexdigest()==v['sha256']
a=artifact('model/operator_inputs.json',json.dumps(p,indent=2,ensure_ascii=False)+'\n')
finish(s,{'packet':a,'sources':len(p['sources']),'quarter_rows':len(p['file63_literal_quarter_ladder'])},'The finite test uses integer, Rounded five-year and exact quarter-year grids, the complete File46 head field and the complete File63 multiplier ladder. Formal diagnostic compositions remain distinguished from source-authorized routes.','Derive the one-Key theorem for any declared lattice.',{'sources':len(p['sources'])==7,'complete_quarter':len(p['file63_literal_quarter_ladder'])==5})
