run_vertical_band_window_039.py VOYNICH RESEARCH ARCHIVE | 16 SEPTEMBER 2026 2 qnew=p[p.qualifies==1] if len(p) else p;passed=all(s['gain']>0 and s['circular_shift_p']<.05 for s in summ) and len(qnew)>=1 expanded=pd.concat([old,qnew.rename(columns={'key':'keys','jaccard':'multiset_jaccard','lcs':'ordered_l cs_ratio'})[['folio','zl_line','gc_line','keys','zl_residual','gc_residual','multiset_jaccard','ordered_ lcs_ratio']].assign(record_id=lambda x:x.folio+':'+x.zl_line.astype(str)+'/'+x.gc_line.astype(str))],ign ore_index=True) if len(qnew) else old expanded.to_csv(OUT/'expanded_band_ledger.csv',index=False);d.to_csv(OUT/'query_results.csv',index=Fals e);p.to_csv(OUT/'paired_band_records.csv',index=False);qnew.to_csv(OUT/'new_qualifying_records.csv',inde x=False);pd.DataFrame(nullrows).to_csv(OUT/'circular_shift_null.csv',index=False) summary={'test':'VERTICAL-BAND-WINDOW-039','band_size_lines':K,'results':summ,'new_qualifying_physical_ records':len(qnew),'ledger_records_after':len(expanded),'pass':passed,'boundary':'Anonymous record-band retrieval only; no plaintext or semantics.'};(OUT/'summary.json').write_text(json.dumps(summary,indent=2 )) report=['# VERTICAL-BAND-WINDOW-039','',('**PASS — BOTTLENECK BROKEN**' if passed else '**FAIL / NOT PROMOTED**'),'','Geometry first retrieves the three nearest prose lines. Only inside that frozen band may exact key recurrence select a record line.',''] for s in summ:report += [f"- {s['witness']}: recall@3 {s['recall_at_3']:.3f}; expected {s['random_expected']:.3f}; gain {s['gain']:+.3f}; p {s['circular_shift_p']:.6f}"] report += [f"- New qualifying physical records: {len(qnew)}",f"- Ledger records after: {len(expanded)}",'','## Rule audit','',('EDGE HANDOFF strengthens from point retrieval to band retrieval; six rules remain.' if passed else 'No rule change; six remain.')] (OUT/'report.md').write_text('\n'.join(report));files=sorted(x for x in OUT.iterdir() if x.is_file() and x.name!='SHA256SUMS.txt');(OUT/'SHA256SUMS.txt').write_text('\n'.join(f'{hashlib.sha256(x.read_bytes ()).hexdigest()} {x.name}' for x in files)+'\n');print(json.dumps(summary,indent=2)) if __name__=='__main__':main()