def run(load,check): graph=load('C127_GRAPH.json')['graph'];nodes={n['id']:n for n in graph['nodes']};edges={e['id']:e for e in graph['duration_edges']};old=load('C01_RESULTS.json');rows=[] for src in load('C303_DATA.json')['joint_8395_17K_rows']: C=src['cumulative_BC'];N=src['SP_Noah_17K_matches'][0]['center'] candidates=[e for e in edges.values() if e.get('family')==17 and nodes[e['from']]['role']=='cum_LXX_OFF_Flood' and nodes[e['from']]['signed_center']==-C and nodes[e['to']]['role']=='SP_Noah_birth' and nodes[e['to']]['signed_center']==N] check('one stored direct route for'+str(C),len(candidates)==1) direct=candidates[0];b=direct['id'].split('_')[0] path=[edges[b+s] for s in ['_868','_13','_1248']] check('contiguous13K route'+b,path[0]['from']==b+'_c' and all(x['to']==y['from'] for x,y in zip(path,path[1:])) and path[-1]['to']==b+'_s') check('all inspected widths equal node differences'+b,all(nodes[e['to']]['signed_center']-nodes[e['from']]['signed_center']==e['width'] for e in path+[direct])) expansion=[edges.get(b+s) for s in ['_868','_13','_299a','_299b','_650']] has_expansion=all(e is not None for e in expansion) if has_expansion: check('expanded path contiguous'+b,all(x['to']==y['from'] for x,y in zip(expansion,expansion[1:]))) mt=nodes[b+'_f']; hypothetical_mt=mt['signed_center']+598 ordinary_MT=[e for e in old['events'] if e['tradition']=='MT' and e['role']=='Noah birth' and e['BC_Nisan']==hypothetical_mt] rows.append({'branch':b,'cumulative_BC':C,'SP_Noah':nodes[b+'_s'],'direct_edge':direct,'source_path':path,'source_path_nodes':[nodes[path[0]['from']]]+[nodes[e['to']] for e in path],'expanded299_path':expansion if has_expansion else None,'C01_interface':[v for v in old['old_Report09_interfaces'] if v['old_arc']==b],'fixed_cross_bridge_MT_BC':src['MT_Flood_BC'],'stored13K_MT_Flood':mt,'different_MT_endpoint_residual':mt['signed_center']-src['MT_Flood_BC'],'299_route_MT_Noah_requirement':hypothetical_mt,'ordinary_MT_Noah_matches':ordinary_MT}) rows.sort(key=lambda x:x['branch']) check('both N01 andN02 stored',[r['branch'] for r in rows]==['N01','N02']) check('both stored sums8993',all(sum(e['width'] for e in r['source_path'])==8993 for r in rows)) check('only N02 expanded path',[(r['branch'],r['expanded299_path'] is not None) for r in rows]==[('N01',False),('N02',True)]) check('MT endpoints differ1and3',[r['different_MT_endpoint_residual'] for r in rows]==[1,3]) check('N01 missing3055 andN02 admitted3056',rows[0]['299_route_MT_Noah_requirement']==3055 and not rows[0]['ordinary_MT_Noah_matches'] and rows[1]['299_route_MT_Noah_requirement']==3056 and len(rows[1]['ordinary_MT_Noah_matches'])==1) check('graph counts remain208/382',len(nodes)==208 and len(edges)==382) return {'stored_route_bindings':rows,'graph_node_count':len(nodes),'graph_duration_count':len(edges),'both_joint_comparisons_already_stored':True,'new_graph_paths_added':False,'C01_interface_scope':'The earlier interface list is selective; its omission of N01 does not imply graph absence.'}