from pathlib import Path from collections import Counter def run(load,check): raw=[r for r in load('C266_ENDPOINTS.json') if not r['reflection_after_translation']] cum=[{'profile':r['profile'],'role':r['source_role'],'index':r['source_index'],'BC':r['source_BC_base'],'provenance':'retained C266 source record'} for r in raw] cum +=[{'profile':r['profile'],'role':'Noah','index':r['source_index'],'BC':r['source_BC_base']+950,'provenance':'derived sequential predecessor of retained Shem by cumulative Noah lifespan950'} for r in raw if r['source_role']=='Shem'] text=(Path(__file__).resolve().parent.parent/'sources/FILE_18.md').read_text();axis=(Path(__file__).resolve().parent.parent/'sources/AXIS_REPORT.md').read_text() check('cumulative Noah950 canonical row','| Noah | 950 | 6381 BC | 6384.5 BC | 6386–6379 BC |' in text) check('MT ON Noah opening canonical counterpart',next(r['BC'] for r in cum if(r['profile'],r['role'],r['index'])==('MT_ON','Noah',0))==6846 and '6847t/6846n' in axis) check('LXX native Noah anchor source','8053 − 753 = 8077 − 777 = 7300' in text and next(r['BC'] for r in cum if(r['profile'],r['role'],r['index'])==('LXX_OFF','Noah',0))+460==7300) reg=[r for r in load('C01_RESULTS.json')['events'] if r['tradition']=='MT'];check('72 cumulative18 regular',len(cum)==72 and len(reg)==18) hits=[];requirements=[] for e in reg: target=e['BC_Nisan']+2832;matches=[c for c in cum if c['BC']==target] requirements.append({'regular':e,'required_cumulative_BC':target,'matches':matches}) hits.extend({'regular':e,'cumulative':c,'gap':8464-e['BC_Nisan']-6} for c in matches) check('twelve labeled hits',len(hits)==12) check('only supported roles',{h['regular']['role'] for h in hits}=={'Noah birth','Flood start','Flood close'}) check('nine regular endpoint identities covered',sum(bool(r['matches']) for r in requirements)==9) check('Noah cumulative field has no match',not any(h['cumulative']['role']=='Noah' for h in hits)) return {'cumulative_register':cum,'regular_requirements':requirements,'all_matches':hits,'comparison_count':len(cum)*len(reg),'role_counts':dict(Counter(h['regular']['role'] for h in hits)),'biography_extension':'partial; no MT Shem birth/death or Noah death counterpart in these fields','all_Noah_fields_derived_and_labeled':True}