run_gc_segmentation_recovery_035.py VOYNICH RESEARCH ARCHIVE | 16 SEPTEMBER 2026 2 in enumerate(p)]))) pv=(1+sum(x>=obs for x in null))/(REPS+1);promoted=bool(passed and len(ledger)>=5 and obs>=.5 and pv<.05) pd.DataFrame({'replicate':range(REPS),'jaccard':null}).to_csv(OUT/'five_record_pairing_null.csv',index= False) summary={'test':'GC-SEGMENTATION-RECOVERY-035','gc_raw_atoms':atoms,'zl_token_exact_subsequence_in_gc': exact,'selected':{'ZL':{**z,'full':' | '.join(z['full']),'residual':' | '.join(z['residual'])},'GC':{**g,'full':' | '.join(g['full']),'residual':' | '.join(g['residual'])}},'new_record_jaccard':jac,'new_record_lcs_ratio':lcs,'prospective_record_pass':pa ssed,'ledger_physical_records':len(ledger),'ledger_mean_jaccard':obs,'ledger_pairing_p':pv,'five_record_ ledger_promoted':promoted,'boundary':'Anonymous records only; exact atom segmentation recovery is not phonetic or semantic translation.'};(OUT/'summary.json').write_text(json.dumps(summary,indent=2,default= lambda x:x.item())) report=['# GC-SEGMENTATION-RECOVERY-035','',('**PASS — FIVE-RECORD ANONYMOUS LEDGER PROMOTED**' if promoted else '**FAIL / NOT PROMOTED**'),'','The missing GC label was recoverable only when the ZL token was required to occur as an exact contiguous atom subsequence in the unsegmented GC label line. No fuzzy atoms or semantic information were used.','',f"- Exact GC subsequence: {exact}",f"- ZL / GC selected line: {z['selected_line']} / {g['selected_line']}",f"- Both contain key: {z['hit']} / {g['hit']}",f"- New-record Jaccard / ordered LCS: {jac:.4f} / {lcs:.4f}",f"- Physical records in ledger: {len(ledger)}",f"- Five-record mean Jaccard: {obs:.4f}",f"- Pairing permutation p: {pv:.6f}",'','## Boundary','','Promotion establishes reproducible anonymous record decompression. It does not assign words, sounds, or plaintext meanings.','', '## Rule audit','',('CORE PRESERVATION, EDGE HANDOFF, CONTEXTUAL INTERNAL REALIZATION, and REGISTER SHIFT are strengthened. Six rules remain.' if promoted else 'No promotion; six rules remain.')] (OUT/'report.md').write_text('\n'.join(report));files=sorted(q for q in OUT.iterdir() if q.is_file() and q.name!='SHA256SUMS.txt');(OUT/'SHA256SUMS.txt').write_text('\n'.join(f'{hashlib.sha256(q.read_bytes ()).hexdigest()} {q.name}' for q in files)+'\n');print(json.dumps(summary,indent=2,default=lambda x:x.item())) if __name__=='__main__':main()