def run(load,check): points=load('C298_DATA.json')['matches'];reg=load('C286_DATA.json')['target_register'] sp=[t for t in reg if t['tradition']=='SP' and (t['Cainan'],t['Terah60'],t['full430'])==(0,0,1)] cs=sorted({p['C'] for p in points});rows=[] for C in cs: flood=[t for t in sp if t['role'] in ['Flood start','Flood close'] and C+t['center']==8395] noah=[t for t in sp if t['role']=='Noah birth' and C+t['center']==8993] rows.append({'cumulative_BC':C,'LXX_OFF_index_if_admitted':5290-C if 0<=5290-C<=7 else None,'MT_Flood_BC':C-2832,'cross_bridge_source_labels':[p for p in points if p['C']==C],'SP_Flood_8395_matches':flood,'SP_Noah_17K_matches':noah,'required_SP_Flood':8395-C,'required_SP_Noah':8993-C}) common=[r for r in rows if r['SP_Flood_8395_matches'] and r['SP_Noah_17K_matches']] rect=load('C287_DATA.json')['rows'];complete_i=[r['i'] for r in rect if r['complete']] joined=sorted(r['LXX_OFF_index_if_admitted'] for r in rows if r['LXX_OFF_index_if_admitted'] in complete_i) check('six coordinate Flood comparisons',len(rows)==6 and cs==list(range(5287,5293))) check('four8395 matches',sum(len(r['SP_Flood_8395_matches']) for r in rows)==4) check('two17K matches',sum(len(r['SP_Noah_17K_matches']) for r in rows)==2) check('both source routes only5287/5288',[r['cumulative_BC'] for r in common]==[5287,5288]) check('all stored comparison gaps fixed',all(r['cumulative_BC']-r['MT_Flood_BC']==2832 for r in rows)) check('full rectangle joint offsets2and3',joined==[2,3]) check('8395 minus17K counterpart difference598',all(r['SP_Noah_17K_matches'][0]['center']-r['SP_Flood_8395_matches'][0]['center']==598 for r in common)) check('Noah selectors remain companion andprimary',sorted(r['SP_Noah_17K_matches'][0]['rail'] for r in common)==['companion','primary']) return {'six_comparison_rows':rows,'joint_8395_17K_rows':common,'full_C287_rectangle_joint_offsets':joined,'source_widths':{'fixed_comparison_offset':2832,'Flood_source_width':8395,'Noah_source_width':8993,'Noah_minus_Flood_source_width':598},'new_stored_path_claimed':False}