from pathlib import Path
from fractions import Fraction as F
import json,hashlib,re
root=Path('/workspace/scratch/1b40da62dcbd')
src=root/'project_sources/24-File_70.Genesis_Toledot_Atonement_Weave-10-1-.md'
out=root/'c632_c731/prep'
text=src.read_text()
lines=text.splitlines()
sections={}
for i,line in enumerate(lines):
if re.match(r'^#{2,3} ',line):sections[line.lstrip('# ')]=i
selected=['A.1 *Toledot* count registers','A.2 First–middle–last scale palindrome','A.3 Creation rails','A.4 Jacob bridal/service field','A.5 Jacob burial-day / Machpelah calibration','A.6 Joseph final-*toledot* chronology','A.7 Noah Gear-2 bridge','A.13.1 Creation–Shem–Jacob–restoration spine','A.13.2 Shem/Flood–Jacob/Conquest square','A.13.3 Shem-to-restoration `4900` partitions','A.13.4 Jacob/restoration `1400` and inherited `14000` scale','A.13.5 First-to-last vector and cumulative final-*toledot* state']
tables={}
for name in selected:
i=sections[name];j=next((j for j in range(i+1,len(lines)) if lines[j].startswith('#')),len(lines))
rows=[]
for k in range(i+1,j):
line=lines[k]
if not re.match(r'^\| `[A-Z][A-Z0-9_]*` \|',line):continue
cells=[s.strip().strip('`') for s in line.split('|')[1:-1]]
if len(cells)<5:raise ValueError((k+1,cells))
# Some source role descriptions print an unescaped partition bar; retain it literally.
cells=cells[:4]+['|'.join(cells[4:])]
rows.append(dict(zip(['id','weight','literal_equation','disposition','argument_role'],cells))|{'line':k+1,'raw_source_line':line})
tables[name]={'heading_line':i+1,'rows':rows}
families={
'outer_poles':{'source':'§§2.2–2.4; A.2–A.4,A.6','rows':[
{'name':'standard_Creation','center':4114,'radius':7,'coordinates':[4121,4114,4107],'state':'source regular MT'},
{'name':'restored_Cainan_Creation','center':4244,'radius':7,'coordinates':[4251,4244,4237],'state':'source comparison; no new Gear transport'},
{'name':'Terah','center':2226,'radius':70,'coordinates':[2296,2226,2156],'state':'mixed role Terah/Abram/Sarah packet'},
{'name':'Jacob_bridal','center':1922,'radius':7,'coordinates':[1929,1922,1915],'state':'regular Jacob/Joseph'},
{'name':'Joseph_economy','center':1878,'radius':7,'coordinates':[1885,1878,1871],'state':'regular Joseph Plenty/Famine'}]},
'five_node_refinement':{'source':'§3.2 and §§2.3,4.2; A.2–A.3','rows':[
{'name':'standard_Creation','coordinates':[4121,4115,4114,4108,4107],'center':4114,'unit':1},
{'name':'restored_Cainan_Creation','coordinates':[4251,4245,4244,4238,4237],'center':4244,'unit':1},
{'name':'Terah','coordinates':[2296,2236,2226,2166,2156],'center':2226,'unit':10}],
'source_role_order':['upper head','first six-part completion','central hinge','second six-part completion','lower close'],
'normalized_offset_candidate':[7,1,0,-6,-7],
'candidate_status':'derived representation to test; coordinates literal source data'},
'jacob_service':{'source':'§5.1; A.4','coordinates':[1929,1922,1915,1909],'components':[7,7,6],'role_order':['Haran call','wedding','Joseph birth','return']},
'jacob_biography':{'source':'§5.3; A.5 JB001–JB016','coordinates':[2006,1936,1929,1859],'components':[70,7,70],'death':1859,'bilateral_coordinates':[1936,1929,1859,1789,1782],'bilateral_components':[7,70,70,7],
'later_inner_node_status':'1789 Judah traditional comparison; source secondary','later_outer_node_status':'1782 Levi controlled regular death','ritual_stations_days':[70,7],'elapsed_77_days_claim':False},
'jacob_secondary_month_embalming':{'source':'§5.4; A.5 JM001–JM009,SM001–SM010','status':'conditional secondary','anchors':{'Haran':1929,'Jacob_death':1859,'Sarah_death':2029,'Isaac_marriage':2026},'month_schematic_days':30,'embalming_days':40,'mourning_horizon_days':70,'source_projection_coordinates':[1959,1929,1899,1859,1819],'source_generated_seam':1899,'29_day_counterexample':1900,'17_year_residence':[1876,1859],'Machpelah_span':[2029,1859]},
'joseph':{'source':'§§5.5–5.6; A.6','birth':1915,'age_nodes':[{'age':17,'coordinate':1898,'role':'descent'},{'age':30,'coordinate':1885,'role':'elevation'},{'age':37,'coordinate':1878,'role':'famine hinge'},{'age':44,'coordinate':1871,'role':'famine close'}],'descent_path':[1898,1885,1878,1871],'components':[13,7,7],'entry':1876,'completed_famine_years_at_entry':2,'Creation_comparison':[13,1],'Joseph_regrouped':[13,14]},
'noah_local_gear_bridge':{'source':'§§4.3–4.5; A.7','noah_G1_death_variant_row':[2296,2236,2166,2106],'noah_G2_death_variant_row':[2298,2238,2168,2108],'shem_G1_death_variant_row':[2146,2086,2016,1956],'within_row_components':[60,70,60],'Joseph_age17':1898,'G2_appended_component':210,'G2_full_components':[60,70,60,210],'G2_outer_span':400,'event_identity_with_Affliction':False},
'macro_spine':{'source':'§§1.4,5.8,9.1A; A.13.1; E.5A','coordinates':[14011,5436,1936,536],'roles':['cumulative Creation upper','cumulative Shem upper','cumulative Jacob-death/Levi-birth whole-year display','restoration'],'components':[8575,3500,1400],'Abrahamic_unit':175,'component_coefficients':[49,20,8],'total':13475,'total_coefficients':{'175':77,'49':275},'matched_Creation_Shem_lower':[14004,5429],'matched_upper':[14011,5436]},
'macro_4900_cuts':{'source':'§9.1A; A.13.3; E.5A','head':5436,'terminal':536,'unit':70,'total':4900,'cuts':[
{'node':606,'role':'captivity head','components':[4830,70],'unit_counts':[69,1]},
{'node':2006,'role':'regular Jacob birth','components':[3430,1470],'unit_counts':[49,21]},
{'node':1936,'role':'cumulative Jacob-death/Levi-birth whole-year display','components':[3500,1400],'unit_counts':[50,20]}]},
'jacob_captivity_square':{'source':'§9.1A; A.13.3–A.13.4; E.5A','rows':[[2006,606],[1936,536]],'horizontal_span':1400,'vertical_span':70,'lower_Exodus_partition':[1936,1446,536],'lower_components':[490,910],'unit_counts_70':[7,13]},
'first_to_last_vector':{'source':'§5.8; A.13.5 CM035–CM046','upper_triple':[14011,14004,13997],'lower_triple':[1936,1929,1922],'shift':12075,'factorizations':{'483':25,'175':69},'P':'70/69','P_output':12250,'P_gain':175,'week_to_Exodus_ladder':[483,'973/2',490],'ladder_source_states':['1929−1446','1933n−1446.5','1937t−1447t']},
'cumulative_Jacob_Jubilees':{'source':'§5.8; A.13.5 CM047; A.5 JB012–JB015','path':[2083,1936,1446],'components':[147,490],'unit':49,'unit_counts':[3,10],'total':637,'total_count':13,'Joseph_birth_co_registration':[1936,1915,21],'Joseph_age17_co_registration':[1933,1898,35]},
'literary_count_registers':{'source':'§2.1; A.1','major_sections':10,'formula_occurrences':11,'Terah_index':6,'exact_center_partition':[5,1,5],'heading_dates_assigned':False},
}
data={'status':'Preparation only; literal inputs with candidate representations. No C632–C731 steps completed by this agent.',
'source':{'path':str(src),'sha256':hashlib.sha256(src.read_bytes()).hexdigest(),'lines':len(lines)},
'scope':'File70 §§1–5, primary cumulative macro §9.1A,A.13.1–5,E.5A. No SKL or later appendix promotion.',
'literal_manifest_tables':tables,'families':families,
'inherited_do_not_repeat_as_new':['C532–C6313430 square','C532–C631989 bridge','clutch reconstruction','12075=25×483 scalar and P output12250 already known; new macro roles may be tested'],
'controls':['Gear operations only Noah/Shem/Flood; source Creation coordinates are retained static inputs, not permission for upstream Gear transport','Moses/1876 primers and1486 deferred','Second decimal inversion deferred','Whole-year1936 differs from exact1936.5 and lower1933','No headings assigned BC dates','No interrupted ritual stations summed as uninterrupted elapsed time','No change to canonical source; no target fitting']}
out.mkdir(parents=True,exist_ok=True)
(out/'file70_primary_inputs.json').write_text(json.dumps(data,indent=2,ensure_ascii=False)+'\n')
print(json.dumps({'source_sha256':data['source']['sha256'],'families':len(families),'literal_manifest_rows':sum(len(v['rows']) for v in tables.values()),'tables':len(tables)},indent=2))
Evidence
extract file70 primary.py
Linked sources and evidence
Edition and provenance
extract_file70_primary.py
SHA-256 a62a30c78edf75ae8848e7ba6f5896a1a3eae587d6bf455243e27b6dd9d2312d
C480–C1634/Research_Cycles/C0632_C0731/prep/extract_file70_primary.py