from pathlib import Path import hashlib ROOT=Path(__file__).resolve().parent.parent def run(load,check): summaries=[];main=auth=0 for n in range(394,403): c=load(f'C{n}_CERTIFICATE.json');d=load(f'C{n}_DATA.json');r=load(f'C{n}_RESULTS.json');nxt=load(f'C{n}_NEXT_STEP.json') check(f'C{n} completed',c['step']==d['step']==f'C{n}' and c['status']=='completed' and r['status']=='passed') for key,name in [('data_sha256',f'C{n}_DATA.json'),('results_sha256',f'C{n}_RESULTS.json'),('next_step_decision_sha256',f'C{n}_NEXT_STEP.json')]:check(f'C{n} '+key,hashlib.sha256((ROOT/'sources'/name).read_bytes()).hexdigest()==c[key]) check(f'C{n} next decision',nxt['next_proposed_step']==f'C{n+1}' and not nxt['executed'] and bool(nxt['reason_selected_after_current_result'])) prev='C393_CERTIFICATE.json' if n==394 else f'C{n-1}_CERTIFICATE.json' check(f'C{n} predecessor certificate',c['previous_certificate_sha256']==hashlib.sha256((ROOT/'sources'/prev).read_bytes()).hexdigest()) main+=r['assertions_passed'];auth+=r['source_checks_passed'];summaries.append({'step':f'C{n}','title':c['title'],'main_result':c['main_result'],'checks':r['assertions_passed'],'source_checks':r['source_checks_passed']}) check('C393 baseline binding',hashlib.sha256((ROOT/'sources/C393_DATA.json').read_bytes()).hexdigest()==load('C393_CERTIFICATE.json')['data_sha256']) audit=load('PRE_C403_ARCHIVE_AUDIT.json');check('nine sealed predecessor packets',audit['status']=='passed' and audit['totals']['packets']==9 and audit['totals']['main_output_comparisons']==18 and audit['totals']['successful_publications']==27) check('primitive reverse J loops',load('C394_DATA.json')['counts']=={'primitive_E_edges':2,'orientation_operator_trials':8,'sourced_required_pivots':2,'forward_P_J_realizations':0,'reverse_J_realizations':2,'reverse_P_realizations':0,'complete_cumulative_reflections':0}) check('affine loops and biography limits',load('C395_DATA.json')['counts']=={'source_endpoint_loops':2,'affine_loop_maps':4,'phase_assignments':32,'matched_component_loops':4,'whole950_biography_passes':0}) check('unfiltered source family census',load('C396_DATA.json')['counts']=={'families':32,'labelled_trials':4096,'source_labelled_E_J_loops':12,'coordinate_E_J_loops':6,'labelled_Flood_close_loops':2,'coordinate_E_P_J_loops':2,'coordinate_J_only_loops':4}) check('commuting complete circuits',load('C397_DATA.json')['counts']=={'three_operator_source_graphs':2,'source_vertices':4,'loop_generators':8,'closed_word_trials':56,'commuting_generator_pairs':4}) check('original17K branch E obstruction',load('C398_DATA.json')['counts']=={'translated_common_P_J_edges':2,'sourced_translated_E_pivots':0,'complete_translated_E_P_J_loops':0,'phase_pivot_trials':8,'phase_pivot_hits':0}) check('all common P J return closure',load('C399_DATA.json')['counts']=={'common_coordinate_edges':10,'cumulative_edges':6,'regular_edges':4,'admitted_return_E_pivots':2,'complete_cumulative_loops':0,'complete_regular_loops':2}) check('shared source three point graph',load('C400_DATA.json')['counts']=={'source_vertices':3,'source_operator_edges':6,'paths_through_six_edges':402,'affine_classes_with_typed_endpoints':78,'central_cross_segment_circuit_equalities':2}) check('all circuit source domain obstruction',load('C401_DATA.json')['counts']=={'unique_circuit_generators':6,'regular_coordinate_trials':2238,'source_preserving_inputs_across_maps':6,'nonfixed_source_images':0,'preserved2K_or17K_spans':0}) check('direct source reconstruction and warrant',load('C402_DATA.json')['counts']=={'source_excerpt_cards':10,'labelled_source_loop_cases':12,'source_record_slots_reconstructed':52,'new_source_endpoints':0,'new_source_protocol_prescriptions_established':0}) sec=load('ROOT_SECOND_METHOD_RESULTS.json') check('alternate root verification',sec['status']=='passed' and sec['check_count']==266 and not sec['new_independent_agent_review'] and sec['source_labelled_E_J_loops']==12 and sec['coordinate_E_J_loops']==6 and sec['coordinate_E_P_J_loops']==2 and sec['integer_DP_path_count']==402 and sec['integer_DP_affine_classes']==78 and sec['nonfixed_circuit_source_images']==0 and sec['source_record_slots_reconstructed']==52 and not sec['C404_executed']) for name,want in [('File_18.md','68301ab760bfbe2e874aedc5c8d943ced7a6219d34bc2859332a70713f9630d5'),('File_09.md','45851004c5864229ebf6a896f9099819a08d8926715d3e97e4bc3985c4a3876e'),('C265_CERTIFICATE.json','112bdcdd23e7580512f6b6a1c4222f746e6552f71b92755932397dbd25dce2de')]:check('source bytes '+name,hashlib.sha256((ROOT/'sources'/name).read_bytes()).hexdigest()==want) for name in ['File_02.md','File_46.md','C365_DATA.json']:check('retained source unchanged '+name,hashlib.sha256((ROOT/'sources'/name).read_bytes()).hexdigest()==load('C393_SOURCE_MANIFEST.json')[name]['sha256']) check('File11 source binding',hashlib.sha256((ROOT/'sources/File_11.md').read_bytes()).hexdigest()==load('C402_SOURCE_MANIFEST.json')['File_11.md']['sha256']) check('C265 checkpoint readable','C265' in (ROOT/'sources/C265_CHECKPOINT.md').read_text()) check('authorization boundary',load('AUTHORIZATION.json')['authorized_steps']==[f'C{n}' for n in range(394,404)] and not load('AUTHORIZATION.json')['C404_authorized']) summary='C394–C403 complete. The two primitive source E23→25 Noah comparisons have exact J return arrows at existing Flood pivots, but not P returns. A4096-trial coherent-family census, without529 or prior-PJ preselection, finds12 labelled E/J loops at six coordinate configurations. Two MT configurations also admit P returns and coincide with the lower-full430 common P/J repairs. Their shared G2 Noah source joins the two graphs into three vertices3031,3033,3035 and six operator arrows. Every admitted path fromu tov has affine formF(t)=v+E^e P^p J^j(t−u), with(v−u)/2=p+j−e. The402 paths through six arrows yield78 classes with endpoints retained as part of the classification; an algebraic proof gives the normal form for every finite admitted path. At each source vertex, complete P–E and J–E circuits commute with independent multipliers1750/(3K) and7500/(13K), K529. Individual E/P/J operators do not commute. The original17K branch obtained by+215 translation lacks required E pivots3271/3273. All ten common P/J source edges were checked: exactly the two lower regular edges admit an E return; no cumulative edge does. Across2238 circuit-generator/input trials in373 regular coordinates, only the fixed source point survives each circuit. Reduced denominators prove this for every nonempty positive circuit, excluding a global529-preserving chronology action. Source-table and variant reconstruction confirms all52 labelled record slots across12 loops. Endpoints, variants and scalar ratios are sourced; the new affine path grammar is a derived comparison, not an established prescription in the reviewed source passages. Whole950 biographies and a single physical seasonal action are not preserved. No new source endpoint, pivot, Gear scope or canonical graph edit was introduced.' restart='Latest completed C403; C404 is unexecuted and outside this completed authorization. Use the C403 compact restart kit as the active packet; read synthesis/checkpoint then locator. C396 provides the unfiltered six-coordinate/twelve-label E/J loop census; C397 the two complete E/P/J loop graphs and same-center commuting circuits; C398 the absent3271/3273 E pivots on the original17K branch; C399 the complete ten-edge return-pivot closure; C400 the shared-source three-vertex path normal form; C401 the whole-source-domain and529-lattice obstruction; C402 the direct52-slot source reconstruction and warrant limits. The first complete graph has MT Noah3031 and3033, held E Noah3056, J Flood2433 and P Flood2893. The second adds2 to all these coordinates. E returns higher Noah to lower; P and J carry lower to higher. The central3033 is the identical MT G2 record, not a numerical alias. Closed-circuit multipliers are1750/1587 and7500/6877; only the fixed source basepoint remains in the373-coordinate regular menu under any nonempty positive circuit. No global2K/17K-preserving E/P/J action is established. Keep12 source labels distinct from six coordinate configurations, and preserve operator/pivot histories even when their affine maps coincide. LXX moving native CainanON and held theoreticalOFF must be stated per record; SP companion loops use the independent Flood-close boundary. Retain C393 source E/J Noah-to-Shem squares and finite strips, absent transported P pivots, and conditional500/600 to529 equivalence; C383 moving-P/J conditionD230h and17K+4 paired drift; C373 commonP/J source repair; C367 nativeNoah950 translation by19K; C343 Noah-held1058→1150→1250 and C363 source500/600 qualifications. K529,E25/23,P70/69; File02 J300/299 is gap conversion, not Residue Protocol or permission to transform dates globally. Global paired MirrorJanuaryAD1; local junctionJanuaryAD2; no civil yearzero. Regular Gears Noah/Shem/Flood only; no cumulative or upstream Gear. SP minus-one person companions remain local; Flood close is independent. SP primary Noah death retains inclusive/harmonic qualification;500/100 and502/98 remain valid. No added endpoint, phase, fitted anchor, global axis, primer reopening, canonical or graph edit. Corrected LXX8464 supplement is awareness only:1564→1700,2484→2700,920→1000; AD3746/2300 superseded. Original unprefixed reports, Engine reports and C-series are distinct. The earlier incompleteSeptember17 ZIP differs from the later verified intact original. Verification counts, labels, replays and coincident coordinates are not independent historical witnesses. Proposed C404 compares the new return-loop grammar with the already sourced C385–C388 Noah-to-Shem E/J strips, using only existing endpoints, pivots, contexts and phases; it has not been executed.' return {'step':'C403','completed_steps':[f'C{n}' for n in range(394,404)],'predecessor_summaries':summaries,'predecessor_main_checks':main,'predecessor_authentication_checks':auth,'predecessor_sealed_audit_totals':audit['totals'],'root_second_method_checks':sec['check_count'],'reading_index_summary':summary,'restart_checkpoint':restart,'source_access':{'File_18':'actual bytes match retained SHA256','File_09':'actual bytes match retained SHA256','File_02_File_46_C365':'actual bytes match C393 frozen manifest','File_11':'actual bytes match C402 frozen manifest','C265':'checkpoint readable; certificate matches retained hash'},'new_independent_agent_review':False,'C404_executed':False,'canonical_or_graph_edits':False}