from research import *
s=begin(1274,'Match all three regular inverse input words','Do the reconstructedsourcecuts reproduce theexistingadmittedpartitiondomain?',{},['C1273','inherited/model/completed_path_inputs.json'])
nodes=json.loads((ROOT/'model/Moses_inverse_interface_nodes.json').read_text())['nodes'];paths={'regular_Flood':['Nativity','Conquest','Flood','Creation'],'regular_Noah':['Nativity','Conquest','Noah','Creation'],'regular_Flood_Noah':['Nativity','Conquest','Flood','Noah','Creation']};old=json.loads((ROOT/'inherited/model/completed_path_inputs.json').read_text());out=[]
for name,word in paths.items():
 coords=[nodes[n]['BC'] for n in word];spans=[b-a for a,b in zip(coords,coords[1:])];out.append({'path':name,'node_word':word,'coordinates_BC':coords,'original_spans':spans,'inherited_spans':old['original_paths'][name]})
a=artifact('model/Moses_inverse_source_word_match.json',json.dumps({'paths':out,'claim':'Completefiniteinputinterface verification; sourcepartitionpermissions inherited.'},indent=2)+'\n')
finish(s,{'source_words':a,'paths':len(out)},'Allthreeoriginalwords match exactly:1400|1050|1650,1400|1650|1050 and1400|1050|600|1050. This certifies theconnection from thecompletegenealogy to theexistinginverse domain withoutselecting newcuts.','Reuse theinheritedone-pass outputs while keepingthisinterfacecheckdistinctfromanewinversecalculation.',{'threepaths':len(out)==3,'allwords':all(x['original_spans']==x['inherited_spans'] for x in out),'original_total':all(sum(x['original_spans'])==4100 for x in out)})
