diff --git a/docs/ci-verification.md b/docs/ci-verification.md index 63ba3e9aa8..52b62d0481 100644 --- a/docs/ci-verification.md +++ b/docs/ci-verification.md @@ -1,8 +1,25 @@ # CI verification -## Current selected-family replay: #6030 +## Current selected-family replay: #7000 with #7001 The [selected record](../certificates/selected-result.json) binds conditional +κ = 0.00363005817 to the [application review](research/pr-intake-evidence/pr7000-application/PROOF-REVIEW.md), +[validation receipts](research/pr-intake-evidence/pr7000-application/VALIDATION.json), +and [explicit source closure](../certificates/frontier7000-source.json). +`make frontier7000-verify` follows that exact-source selected replay. The review +reuses eleven authenticated preceding executions and records seven fresh serial +application, scalar and complete native-catalogue executions. The earlier +monolithic timeout is retained separately and is not completed coverage. +Consult the receipts for exact commands, source heads and limits. + +The five inherited framework assumptions remain. No complete uniform word, +literal multiplier execution, independent human proof or formal-kernel proof +is asserted. Routine research submissions do not need to rerun this +selected-family replay. The sections below preserve historical checkpoints. + +## Historical selected-family replay: #6030 + +The [historical checkpoint](../certificates/checkpoints/frontier6030.json) binds conditional κ = 0.003125804 to the [proof review](research/pr-intake-evidence/pr6030-audit/PROOF-REVIEW.md), [validation receipts](research/pr-intake-evidence/pr6030-audit/VALIDATION.json), and [explicit source closure](../certificates/frontier6030-source.json). diff --git a/research/cocharted-rank9-helper-split/README.md b/research/cocharted-rank9-helper-split/README.md new file mode 100644 index 0000000000..597e221d97 --- /dev/null +++ b/research/cocharted-rank9-helper-split/README.md @@ -0,0 +1,44 @@ +# Cocharted rank-nine helper split on the signed certificate + +Conditional κ = **0.003636447857731** versus **0.003635479112372** in [#7109](https://github.com/CrocSwap/integer-mult-bounds/pull/7109) at head `ae3f9d6a944ade32267fe5a94af853914a99d6aa`. The absolute gain is exactly `968745359/10^15 = 0.000000968745359`. The relative gain is exactly `(24218633975/908869778093)%`, approximately `0.026646979093%`. The independent directed interval for the new complex crossing is + +```text +(0.00363644785773120955770150093800963, + 0.00363644785773120955770150093800964) +``` + +The previous upper endpoint is `0.00363547911237276261060913791895827`. The paired E-free BIT pin remains `0.00376669`. + +## Exact construction + +Helper 1285 crosses from chart 3 to chart 127. Before source event 35903 it is already in chart 117. Retain 1285 with boundary 3→117 and give fresh helper 1482 the boundary 117→127. These ranks are five and four. The emitter shifts owned labels by one, rebinds ten suffix contacts, and adds twelve scalar events. The normalized word has 71,265 events, 1,483 public fields, and SHA-256 `3d500210240a340b865e2df8ce93cd53ad797537c1f6297508d2bd6a9b863d78`. + +For the normalized prefix P and suffix S, the witness checks + +```text +a = -2e1285* - 2e1286* + 2e1287* + e1289* +b = -e1285/2 +c = 2e1285* - 2e1286* +d = e1285/2 +aP = c, Sb = d, ab = cd = 1 +``` + +The boundary basis G has pivot row c and Gd = e1285. The cut basis J has pivot row a and Jb = e1285. Both pivot axes of the old endpoint T = SP are identity and `(c−e1285*)T = c−e1285*`, so GT = TG. Freezing the pivot after J retains the old input. Rebinding the suffix to fresh input z adds `(z−x1285)b` to the normalized cut state. The suffix and output basis send that difference only to the successor. The proof holds on every chart column. + +The complete paid profile P is unchanged. The productive profile changes by +18 at rank four, +18 at rank five, and −18 at rank nine. Its signed moment gain is strictly positive by concavity. The rank surplus remains 1,520 and there are zero empty root credits. The signed caller is unchanged. + +## Clean replay + +```sh +python3.12 -B scripts/research_package.py --package research/cocharted-rank9-helper-split +``` + +The archive rebuilds the #7109 predecessor and emits the candidate from the exact witness. Replay checks the complete normalized endpoints independently, the physical endpoint probe, both changed maps on all 512 columns with wrong-phase controls, the signed caller and its 32 physical requests, the common grid, modeled ordinary work, the attributed precision envelope, and two directed price engines. The predecessor rejects the new claim and a corrupted scalar fails reverse replay. + +The same native all-column, owned ascent and erasure, uniform compiler, exact child, precision and fixed-tape, analytic recovery, LAMBDA, one-field idle, per-port caller, paired BIT and modeled ordinary tariff premises apply. The physical fixed-tape realization, total rounded provider and #6998 tariff bridge remain open. + +Credit to the #7109 and #7107 lineages, Ali Romman and CubeJerry for the helper-split construction, and the signed-caller and P104 contributors. OpenAI Codex assisted discovery, construction and verification. + +## Open next questions + +Can the fixed-tape provider and common-volume tariff bridge be certified on the retained source contract? The next source-bound check is to reconcile the #6998 conversion and A6 trace under one tape width model. diff --git a/research/cocharted-rank9-helper-split/REPLAY.tar.gz b/research/cocharted-rank9-helper-split/REPLAY.tar.gz new file mode 100644 index 0000000000..88f20e78c8 Binary files /dev/null and b/research/cocharted-rank9-helper-split/REPLAY.tar.gz differ diff --git a/research/cocharted-rank9-helper-split/RESULT.json b/research/cocharted-rank9-helper-split/RESULT.json new file mode 100644 index 0000000000..22769d9c48 --- /dev/null +++ b/research/cocharted-rank9-helper-split/RESULT.json @@ -0,0 +1 @@ +{"caller": {"bad_outputs": [], "caller_denominator_height_bound": 431, "caller_mass_bound": "2031778024781380738667307850969872261300825114412066667930609010754885615256246771273722516797028373875488084463456734932931819440254377992064287155336455679722182496470290893143689397339193405421398373633/137438953472", "caller_mass_ceiling_bits": 642, "max_terms": 3998}, "caller_sha256": "9557f713ab4ffb91ede05e8a6d5668c694b9940fc16f2f2d657e2f2b2cac2d3f", "gate": {"BIT_margin": "13024214226893/100000000000000000", "BIT_pin": "376669/100000000", "H": "16472800000000000000000", "alpha": [0.9999999999999998, 0.9999999999999998], "claim": "3636447857731/1000000000000000", "compiler_gap": "1/100000000000000000", "delta": [0.8772726304707504, 0.8772726304707504], "derivative_upper": -407876.5910652963, "gamma": [0.9499598114345539, 0.9499598114345539], "input_lift": {"derivative_upper_on_required_interval": "-2299831290525933154178526076272396899996972093654613095735772838275432653960006518819/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "interval_kappa_cap": "376669/100000000", "margins": {"3636447857731/1000000000000000": ["31020098040296427973135953984229448955417981738330514165529330154280107535409/25000000000000000000000000000000000000000000000000000000000000000000000000000000", "24816078432237142378508763187383559164334385390664411332423464123424086028711/20000000000000000000000000000000000000000000000000000000000000000000000000000000"], "363644785773107/100000000000000000": ["124080392161187998725009684940243064878844248227395141163872261091883008973591/100000000000000000000000000000000000000000000000000000000000000000000000000000000", "31020098040296999681252421235060766219711062056848785290968065272970752243887/25000000000000000000000000000000000000000000000000000000000000000000000000000000"]}, "source_BIT_wide_crude_bound_would_be": "-2299831290525933154178526076272396899996972093654613095735772838275432653960006518819/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}, "minimum_log_power": 2231, "moment_margin_float": {"142048744442625373347714880391/39062500000000000000000000000000": [1.4507404609825787e-29, 1.4507404609825787e-29], "363644785773107/100000000000000000": [5.789483987749959e-11, 5.789483987749959e-11], "36364478577312095577015009380097/10000000000000000000000000000000000": [-2.697711344603403e-29, -2.697711344603403e-29]}, "moment_margins": {"142048744442625373347714880391/39062500000000000000000000000000": ["725370230491289293636635396144760780497993370412271/50000000000000000000000000000000000000000000000000000000000000000000000000000000", "725370230491289293636635396144760780497993391393843/50000000000000000000000000000000000000000000000000000000000000000000000000000000"], "363644785773107/100000000000000000": ["115789679754999175009406153596219377319716312465892844630226508402801/2000000000000000000000000000000000000000000000000000000000000000000000000000000", "2894741993874979375235153839905484432992907811647321115755662731134107/50000000000000000000000000000000000000000000000000000000000000000000000000000000"], "36364478577312095577015009380097/10000000000000000000000000000000000": ["-1348855672301701388026720169458315281584430448420291/50000000000000000000000000000000000000000000000000000000000000000000000000000000", "-337213918075425347006680042364578820396107606875121/12500000000000000000000000000000000000000000000000000000000000000000000000000000"]}, "outer": {"BIT_just_below_effective_rejected": true, "functional_count": 4, "minimum_margin": "1/1000000000000000000", "strict_count": 54}, "raw_bracket": ["142048744442625373347714880391/39062500000000000000000000000000", "36364478577312095577015009380097/10000000000000000000000000000000000"], "tested": "363644785773107/100000000000000000", "written_log_power": 2232}, "invoice": {"P": {"1": 72888, "2": 15174, "3": 14706, "4": 4266, "5": 5886, "6": 288, "7": 216, "8": 780, "9": 32, "16": 416, "24": 416, "32": 416, "40": 416, "48": 416, "56": 416, "64": 416}, "S": 1520, "T": {"1": 252, "2": 324, "3": 810, "4": 3888, "5": 1260, "6": 738, "7": 324, "8": 1008, "9": 11306, "17": 416, "25": 416, "33": 416, "41": 416, "49": 416, "57": 416, "65": 416, "73": 416, "145": 208}, "empty_root_credits": 0, "no_E_credit_crossing": "0.0036364478577312095577015009380096349706475806016290411328966748555", "raw_crossing": "0.0036364478577312095577015009380096349706475806016290411328966748555"}, "mutation_bad_inputs": [1286], "native": {"bad_inputs": [], "events": 71265, "helpers": {"1": 14, "2": 18, "3": 45, "4": 216, "5": 70, "6": 41, "7": 18, "8": 56, "9": 605}, "lifetimes": 54, "owned_peak": 43, "paid": {"1": 4028, "2": 843, "3": 817, "4": 237, "5": 327, "6": 16, "7": 12, "8": 6}, "public": 1483, "rises": {"1": 10, "2": 4, "3": 1, "4": 6, "5": 1, "6": 1}}, "ordinary": {"caller_items": {"A": {"envelope": 124674048, "field_boundary": 94848, "fused_routes": 0, "idle_routes": 185472000, "output_routes": 229056000, "query_routes": 1152000, "thin": 6144}, "B": {"envelope": 39515136, "field_boundary": 7904, "fused_routes": 1168000, "idle_routes": 19552000, "output_routes": 19088000, "query_routes": 0, "thin": 0}}, "caller_total": 619786080, "conservative_total": 847350304, "extra_B_scalar_surcharge": 784256, "init_clear_allowance": 216, "lambda_paid_rank1_would_reduce_S_by": 14384, "lambda_second_charge": 14384000, "margin_to_billion": 152649696, "odd_divisions": {"ADD": 4079, "SCALE": 64}, "per_input_conversion": 2776176, "raw_upper": 829405872, "route_items": {"first_main_adapter": 416, "first_main_boundary": 208, "helper_boundary": 2166, "moves": 6286, "owned_lifetime": 216, "second_main_adapter": 384, "second_main_boundary": 192}, "routing": 9868000, "scalar_upper": 1777544}, "precision": {"Kstar_bits": 14093, "caller": {"denominator_height": 431, "maximum_mass": "2031778024781380738667307850969872261300825114412066667930609010754885615256246771273722516797028373875488084463456734932931819440254377992064287155336455679722182496470290893143689397339193405421398373633/137438953472", "pre_joint_height": 426, "pre_joint_mass": "766527916529583301313228867197686200815349463045311717713050641430930492401493758087731346459407655106441982454343595473292801327075604294093436993244143470221321807686760749419510412771973080166736111/17179869184"}, "context_c": 1342, "context_height": 450, "context_mass_bits": 671, "rounded_caller": {"bounds": {"E_joint_entrance": {"exact": "165292444343760323401155772441945289487094522487328722024200966101122272523027193523150707686849312800218630107891075997101638616814187596693367427896379196396139375939545027622653652645241588970968003449551901741111599923100072250069260288367525910897475622778689918763945407765323543999762572851/5013657159105790113341453107200000000000000000", "strict_power_of_two": 833, "witness": {"cut": 4982, "event": 4982, "factor": "1", "kind": "stored", "register": 39}}, "Gamma_context": {"exact": "106523384590479908258662662982765471447154933561246509970866347743557488169298359628123130008426540764899831043863348961835648800839419127777945763322925701518401899727104090992222220586609266666890467062386503814699278347726235527148258791315382627535883134825014274822255809699595332548020636715591/24065554363707792544038974914560000000000000000", "strict_power_of_two": 840, "witness": {"cut": 5112, "factor": "1", "kind": "public-return", "register": 75}}, "M_caller": {"exact": "71139049377586862629418871698937610393019572652137611543732392122728862032234875850426792200611955874649536689056011773263916935707559511365401032013880904413645069177668118198332454710167691/32768", "strict_power_of_two": 619, "witness": {"cut": 5076, "event": 5075, "factor": "1", "kind": "stored", "register": 75}}, "M_context": {"exact": "63921626028290110772001115880013082473800456370255458651755279435135268075345307113117360171483441248439132806692585371377061257862089033582150884920369895653682867231606512172347231885623916342770085186559644593931969339157045691239723790498049595618904300847919246206782869673650581873997177415596941/28522138505135161533675822120960000000000000000", "strict_power_of_two": 849, "witness": {"cut": 4983, "event": 4982, "factor": "1", "kind": "stored", "register": null}}, "M_joint_entrance": {"exact": "66231921216838714175335242310174311625441766070329537281095337280001689425837300045521194678022507207573740758259597518292006513594483309822197449388620837179777160688120985448681075810705/4096", "strict_power_of_two": 612, "witness": {"cut": 4982, "event": 4982, "factor": "1", "kind": "stored", "register": 39}}, "Sigma_caller": {"exact": "106523384590479908258662662982765471447154933561246509970866347743557488169298359628123130008426540764899831043863348961835648800839419127777945763322925701518401899727104090992222220586609266666890467062386503814699278347726235527148258791315382627535883134825014274822255809699595332548020636715591/24065554363707792544038974914560000000000000000", "strict_power_of_two": 840, "witness": {"cut": 5098, "event": 5097, "factor": "1", "kind": "stored", "register": 75}}, "Sigma_context": {"exact": "2392900949842350196704387514131272103055986472350871126241844486921649052732505176113743143994017051501548926477993077902348915404586603147105347115827141415864253850210532104721050593013848141478965240611272521132461443462405268249338656458605643322878560369289565096780881856879347273263995370383407871782861959576455957018891790689533467555182845094611678770914495542857394298542024119374390093741913768186953/523682460605265458317141398184019716339716009408677806080000000000000000000000000000000000", "strict_power_of_two": 1069, "witness": {"cut": 4983, "event": 4982, "factor": "1", "kind": "stored", "register": null}}}, "fresh_arbitrary_helpers": 19494, "helper_allocation_premise": "distinct (stage, helper) public inputs as in frozen caller proof", "independent_adjoint": {"E_joint_entrance": {"entrance_mass": "66231921216838714175335242310174311625441766070329537281095337280001689425837300045521194678022507207573740758259597518292006513594483309822197449388620837179777160688120985448681075810705/4096", "joint_coefficient": "3341262452763736608333208973454412950850413153418406702391448781717870354386212730465850137279766193453853839111325961239001898880600732238129365028446669327062277635590277335176110963/4096", "primitive_coefficient": "97386365324171280012900240624596584740208335418838768849197300645798627964098858911945347609583363839763283834626254278123625524137460265198827318958269714035256037492260512470970582090841/16384", "residual_mass": "165292444343760323401155772441945289487094522487328722024200966101122272523027193523150707686849312800218630107891075997101638616814187596693367427896379196396139375939545027622653652645241588970968003449551901741111599923100072250069260288367525910897475622778689918763945407765323543999762572851/5013657159105790113341453107200000000000000000"}, "Gamma_context": {"entrance_mass": "71139049377586862629418871698937610393019572652137611543732392122728862032234875850426792200611955874649536689056011773263916935707559511365401032013880904413645069177668118198332454710167691/32768", "joint_coefficient": "3588816846070975662189139150385916018049768310935423284247506919489598097879366381598784768436344948623399851427080856173768395141863135887379886323692161717893814936281078874126758254305/32768", "primitive_coefficient": "104601728656160061800829059188189517089489205649710398563826603344774845615386975930430446869514605732253126838851071709850611632285445276658068751933727423823199247050168422471008254528236067/131072", "residual_mass": "106523384590479908258662662982765471447154933561246509970866347743557488169298359628123130008426540764899831043863348961835648800839419127777945763322925701518401899727104090992222220586609266666890467062386503814699278347726235527148258791315382627535883134825014274822255809699595332548020636715591/24065554363707792544038974914560000000000000000"}, "M_caller": {"entrance_mass": "71139049377586862629418871698937610393019572652137611543732392122728862032234875850426792200611955874649536689056011773263916935707559511365401032013880904413645069177668118198332454710167691/32768", "joint_coefficient": "3588816846070975662189139150385916018049768310935423284247506919489598097879366381598784768436344948623399851427080856173768395141863135887379886323692161717893814936281078874126758254305/32768", "primitive_coefficient": "104601728656160061800829059188189517089489205649710398563826603344774845615386975930430446869514605732253126838851071709850611632285445276658068751933727423823199247050168422471008254528104995/131072", "residual_mass": "106523384590479908258662662982765471447154933561246509970866347743557488169298359628123130008426540764899831043863348961835648800839419127777945763322925701518401899727104090992222220586609266666890467062386503814699278347726235527148258791315382627535859069270650567029711770724680772548020636715591/24065554363707792544038974914560000000000000000"}, "M_joint_entrance": {"entrance_mass": "66231921216838714175335242310174311625441766070329537281095337280001689425837300045521194678022507207573740758259597518292006513594483309822197449388620837179777160688120985448681075810705/4096", "joint_coefficient": "3341262452763736608333208973454412950850413153418406702391448781717870354386212730465850137279766193453853839111325961239001898880600732238129365028446669327062277635590277335176110963/4096", "primitive_coefficient": "97386365324171280012900240624596584740208335418838768849197300645798627964098858911945347609583363839763283834626254278123625524137460265198827318958269714035256037492260512470970582090841/16384", "residual_mass": "165292444343760323401155772441945289487094522487328722024200966101122272523027193523150707686849312800218630107891075997101638616814187596693367427896379196396139375939545027622653652645241588970968003449551901741111599923100072250069260288367525910897475622778689918763945407765323543999762572851/5013657159105790113341453107200000000000000000"}, "Sigma_caller": {"entrance_mass": "71139049377586862629418871698937610393019572652137611543732392122728862032234875850426792200611955874649536689056011773263916935707559511365401032013880904413645069177668118198332454710167691/32768", "joint_coefficient": "3588816846070975662189139150385916018049768310935423284247506919489598097879366381598784768436344948623399851427080856173768395141863135887379886323692161717893814936281078874126758254305/32768", "primitive_coefficient": "104601728656160061800829059188189517089489205649710398563826603344774845615386975930430446869514605732253126838851071709850611632285445276658068751933727423823199247050168422471008254528236067/131072", "residual_mass": "106523384590479908258662662982765471447154933561246509970866347743557488169298359628123130008426540764899831043863348961835648800839419127777945763322925701518401899727104090992222220586609266666890467062386503814699278347726235527148258791315382627535883134825014274822255809699595332548020636715591/24065554363707792544038974914560000000000000000"}}, "joint_entries": [{"entrance_defect": "4384", "entrance_mass": "23859/2", "event": 49, "stage": 1}, {"entrance_defect": "20945275888205216822136770170857843781306468692431882013791677394534447241497093606133067634897208600537366569184636961/918028044269859029542502400000000000000000", "entrance_mass": "44760984243/4", "event": 144, "stage": 2}, {"entrance_defect": "60040728145823720028850295795863180331245435801728778217238066290557148922337505072307089748597010109690251584641494756241065219/58753794833270977890720153600000000000000000", "entrance_mass": "8019347752894898813/16", "event": 275, "stage": 3}, {"entrance_defect": "774818034974189018742045333182641258311544778363216064512595534476252512609257032919801193204730410673057902138880460049924615608616463/2937689741663548894536007680000000000000000", "entrance_mass": "258721681913211409397548013/2", "event": 435, "stage": 4}, {"entrance_defect": "2752126279812842911614517363846364263857241936355540137009899438461308143059846343325842127994827727236572032027276536282120748990234064041419111/19584598277756992630240051200000000000000000", "entrance_mass": "1102764325780487636837595009524032653/16", "event": 627, "stage": 5}, {"entrance_defect": "4939143639019253425648287425523177264276835389628095659102892518289043038083076727970598932124466058334947697064909265002636078508210289546411705494440033/14688448708317744472680038400000000000000000", "entrance_mass": "659697369868562418053848749577901431896032551/4", "event": 848, "stage": 6}, {"entrance_defect": "74896342606975926138251364169613869145845263509172406942951397008247839220694145832422911256245435800493831297010552508755040907964223342392960755550571140660032767/94006071733233564625152245760000000000000000", "entrance_mass": "50017699262951285012300223375874644326538714050483088723/128", "event": 1101, "stage": 7}, {"entrance_defect": "309114130159718082974645585114062354532507754102539809184502906764571450238805046625765949468917056096886679419140091912130868497667886089556830230822553419049637447536443009/39169196555513985260480102400000000000000000", "entrance_mass": "123860608372223676361208276303474840021608894935793894644443117475/32", "event": 1383, "stage": 8}, {"entrance_defect": "3345884442466797853932151974466734415141282876809563551901382632333478089812689686424366834601763983018110625823843212898270951304865865336721309863261244235895838654880025252544095281/235015179333083911562880614400000000000000000", "entrance_mass": "446893495694686287960280473450842802655971489871616126572592413520841719161/64", "event": 1662, "stage": 9}, {"entrance_defect": "96026662966673039292447998707102193663891960878638771705681719496786411786846177086439726298824621383663370044593952462296057850773015275549415436238458647989247492013892954104928346141367190403260429325683849827358903254941633/58753794833270977890720153600000000000000000", "entrance_mass": "1603226733879417057855793968966209778425632456862348198524030211565823693253398434234475406089669867705587698766845597/2", "event": 3203, "stage": 10}, {"entrance_defect": "1197848086574183049821071854148575314524964636216808982087359516800634998105246537705098284570243555951401513342020461559956567932794925802826893207572443444732555878809467433587938345427248834811057949096431578902847901757608172553830687/940060717332335646251522457600000000000000000", "entrance_mass": "159990737255009044304340266028013949411590186711547802615104749842798991699729693917477577741470706009608765481680513095697397863/256", "event": 3526, "stage": 11}, {"entrance_defect": "5341832345878048201213523997072168054301900648618756678958678164846954106258778987929405235765621505475641473979896611527199183018737742240977250410164467690534000820455102496513616060223138095186059964722764281297918923294434818965928463186621047/3760242869329342585006089830400000000000000000", "entrance_mass": "713482539972112811302498126039122556478474335397824876612540289480809876975347015211250548661355667282704396311981650378099911649135840063/1024", "event": 3821, "stage": 12}, {"entrance_defect": "574524412326790829036983079562715713571694021281879324065816667659285585110600798054699173200371933921084587178228652698910699081633102444796501581211361006318225831100834707260918435667773783829655137360027410053598062996391502773217320530308291013698813/417804763258815842778454425600000000000000000", "entrance_mass": "690627858377635566118234917748020783796286454330854789097666289598705747090709204201800639258908872647850357504982405971722609074791401430947671165/1024", "event": 4088, "stage": 13}, {"entrance_defect": "3525358863923151993891566544247083013341815906089589453588776784236270112449114893194245211690030306086025307292183926292327215583153770976691216624815319003597024471032734964037724076725847083228243186895416941765145724607746003267352415479725456753490650856639119/7520485738658685170012179660800000000000000000", "entrance_mass": "470865020405587123936906066570155601953174646068287322382245101819760273515813542612024822098129182481570490831889396523550001544922531326945370763196989399/2048", "event": 4324, "stage": 14}, {"entrance_defect": "347887716484709323893252779573134434571674408341809400936701649315046680413908075212011279569378909744957309856152835857095125543210261026237949182545963993149353381405220773711279051459830871744539713255544579457638907053625385720958728090478503203918384623432004330593617/3760242869329342585006089830400000000000000000", "entrance_mass": "46465668615402712050475352820015987705766128000689019237904160504542353131957951954454381327545881694314550682714483945959032017848349099581053150524269011108711881/1024", "event": 4532, "stage": 15}, {"entrance_defect": "169944890697424776849213739726098371825197745757247881892781318565648968011910482638315559682083250625574188312315358819798132393501881998021103587686445659344647961807507252199686392210752166800478156480369822583034902620737814591486738566497971116728619524063371262831983369137943/30081942954634740680048718643200000000000000000", "entrance_mass": "22698711681515933658235268009935719580127806482189476469420786919611768582281970304620813093468639555288906634046185136362302550495196405154606658307111274865117192668126623/8192", "event": 4709, "stage": 16}, {"entrance_defect": "350944142817531428902875331631856861383628964416925168055811999055318384218808857814423508643014198697860891754301817035208226606824788343406050325555777971876086732552631457644036283836262272275171127735224329796348250620930475660120247512949341182900319041372071541690421889421177274057/6016388590926948136009743728640000000000000000", "entrance_mass": "234369503003028720835110712559034466962392865438574454855472632480300248897620917700915501102797005900029816899906431175273180672543487679750570754841237111980601879269511857634373/8192", "event": 4858, "stage": 17}, {"entrance_defect": "165292444343760323401155772441945289487094522487328722024200966101122272523027193523150707686849312800218630107891075997101638616814187596693367427896379196396139375939545027622653652645241588970968003449551901741111599923100072250069260288367525910897475622778689918763945407765323543999762572851/5013657159105790113341453107200000000000000000", "entrance_mass": "66231921216838714175335242310174311625441766070329537281095337280001689425837300045521194678022507207573740758259597518292006513594483309822197449388620837179777160688120985448681075810705/4096", "event": 4982, "stage": 18}], "physical_main_inputs": 3952, "sites": {"ADD": 4102, "IDLE_ODD": 4, "IDLE_ONE": 96, "J": 18, "LAMBDA": 214, "QUERY": 4, "SCALE": 298, "SWAP": 376, "noninteger_scalar": 1562}}, "rounded_native": {"bounds": {"Gamma": {"exact": "148410171317465452821398347427977154426075551738681664650513901230280171913226704382356283950235003420491363124931/3672112177079436118170009600000000000000000", "strict_power_of_two": 235, "witness": {"cut": 71265, "factor": "1", "kind": "public-return", "register": 1443}}, "M": {"exact": "14476771514527370283579442105239995542285000787732093181989231556313214221075814148615789859164935429832075886528403/104451190814703960694613606400000000000000000", "strict_power_of_two": 237, "witness": {"cut": 71224, "factor": "1", "kind": "stored", "register": 1443}}, "Sigma": {"exact": "148410171317465452821398347427977154426075551738681664650513901230280171913226704382356283950235003420491363124931/3672112177079436118170009600000000000000000", "strict_power_of_two": 235, "witness": {"cut": 71224, "factor": "1", "kind": "stored", "register": 1443}}}, "census": {"denominator_bits": 19, "events": 71265, "lifetimes": 54, "max_denominator": 393216, "max_numerator": 14729531, "numerator_bits": 24, "opcodes": {"ADD": 61204, "CLEAR": 54, "COPY": 1, "INIT": 54, "MOVE": 6286, "SCALE": 3666}, "owned_labels": 51, "peak_owned": 43, "public": 1483, "scalars": {"dyadic": 60728, "integer": 38928, "noninteger": 25943, "odd": 4143}}, "independent_adjoint": {"Gamma": {"active_residual_sites": 24515, "entrance_mass": "14476771514527370283579442105239995542285000787732093181989231556313214221075814148615789859164935429832075886528403/104451190814703960694613606400000000000000000", "residual_mass": "148410171317465452821398347427977154426075551738681664650513901230280171913226704382356283950235003420491363124931/3672112177079436118170009600000000000000000"}, "M": {"active_residual_sites": 24515, "entrance_mass": "14476771514527370283579442105239995542285000787732093181989231556313214221075814148615789859164935429832075886528403/104451190814703960694613606400000000000000000", "residual_mass": "148410171317465452821398347427977154426075551738681664650513901230280171913226704382356283950235003420491363124931/3672112177079436118170009600000000000000000"}, "Sigma": {"active_residual_sites": 24515, "entrance_mass": "14476771514527370283579442105239995542285000787732093181989231556313214221075814148615789859164935429832075886528403/104451190814703960694613606400000000000000000", "residual_mass": "148410171317465452821398347427977154426075551738681664650513901230280171913226704382356283950235003420491363124931/3672112177079436118170009600000000000000000"}}}, "scope": "Exact-child grid and attributed all-fibre error envelope, with one signed unitary per fused event", "word": {"coefficient_visits": 14089300, "dyadic_height": 24, "mass_witness": [63464, "stored add"], "maximum_scaled_mass": "1636346757402225/16384", "numerator_bits": 24, "odd_scale_lcm": 1125}}, "price": {"baseline_rejects_new_claim": true, "candidate_margin_at_old_upper": ["20094007534984470721086250930996612061940151152603886964242308016714366934862333/50000000000000000000000000000000000000000000000000000000000000000000000000000000", "10047003767492235360543125465498306030970075576301943482121154008357183476758983/25000000000000000000000000000000000000000000000000000000000000000000000000000000"], "claim_decimal": "0.003636447857731", "gain": "9.68745359E-7", "gain_exact": "968745359/1000000000000000", "independent_raw_bracket": ["0.00363644785773120955770150093800963", "0.00363644785773120955770150093800964"], "previous_claim": "908869778093/250000000000000", "raw_bracket": ["0.0036364478577312095577015009380096", "0.0036364478577312095577015009380097"]}, "status": "PASS_COCHART_RANK9_SPLIT_GATES", "word_sha256": "3d500210240a340b865e2df8ce93cd53ad797537c1f6297508d2bd6a9b863d78"} diff --git a/research/cocharted-rank9-helper-split/SOURCES.json b/research/cocharted-rank9-helper-split/SOURCES.json new file mode 100644 index 0000000000..b06c2f774e --- /dev/null +++ b/research/cocharted-rank9-helper-split/SOURCES.json @@ -0,0 +1,18 @@ +{ + "schema_version": 1, + "base_commit": "17469fff78c22941280f04d39dc5a1faee09c840", + "files": [ + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81" + }, + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "d59b5035e7b4cbaa9d688a1d32dd0d6eb79c466a", + "sha256": "9b8d0eea95b3bf0dfcb7938a732a6439b87a2685dec2a5ab9e525b3b34debbfa" + } + ] +} diff --git a/research/cocharted-rank9-helper-split/TASK.json b/research/cocharted-rank9-helper-split/TASK.json new file mode 100644 index 0000000000..56213b3cfa --- /dev/null +++ b/research/cocharted-rank9-helper-split/TASK.json @@ -0,0 +1,115 @@ +{ + "schema_version": 1, + "task_id": "p104-side-correction", + "base_commit": "17469fff78c22941280f04d39dc5a1faee09c840", + "original_card": { + "id": "p104-side-correction", + "question": "Can joint helper bases and a legal causal split improve the complete P104 productive/paid invoice?", + "starting_points": [ + "docs/research/current-priorities.md", + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "research/p104-helper-subspace-splits/README.md", + "research/dyadic-helper-channel-capacity/README.md" + ], + "methods": [ + "Construct and independently check one source-bound instance of the stated first experiment.", + "Seek an exact counterexample or target-specific complete-budget obstruction to that same proposed change." + ], + "acceptance_gate": "An exact arbitrary-input identity, source/target frame availability and restoration at the chosen cut, plus the complete channel+correction+idle/hosting bill or an explicit favorable bound. The native channel alone is not a supplier. A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read revision 8, the selected review and live exact-source handoffs. Then follow this card's bounded first_experiment.", + "scope": "Source-bound orientation only, not a supplier replay or theorem proof." + }, + "first_experiment": "Start with the selected #5599 emitted word and review pending #5718 distinct input/output bases plus #5717/#5719 coverage before claiming work. Pick one uncovered source word, helper group and cut region. Prove the arbitrary-input relation and legal entry/exit corrections, then compare full target and paid profiles. Reject if completion, owned lifetimes or consumer costs repay the gain. A static pairing rank alone is not a physical split.", + "bottleneck_link": "Judge the actual current supplier contract and complete signed target/paid bill; frozen-profile ceilings require an applicability proof.", + "allowed_variations": [ + "One exact source head, helper/cut region or quantified proposition and changed hypothesis; check live handoffs first. Different seeds are not different scopes." + ], + "scope_change_triggers": [ + "Changing source head, helper/cut domain, operation alphabet or caller boundary without recording the new scope.", + "Treating an archived proposal or local numerical pass as complete supplier admission." + ], + "overlap_terms": [ + "P104", + "helper basis", + "helper split", + "5718", + "dyadic capacity" + ], + "existing_checks": [ + { + "scope": "PR #4133: literal-slot defect", + "evidence": "research/p104-literal-slot-defect/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "status": "author-checked", + "source_commit": "88666f1dee93fbd85b31fd5d6f91a219e111b5f4", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4136: uniform commutation gap", + "evidence": "research/p104-uniform-commutation-gap/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "status": "author-checked", + "source_commit": "281ce601a8be9db470de630759179c23e1dfaa88", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4140: uniform encoding gap", + "evidence": "research/p104-uniform-encoding-gap/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "status": "author-checked", + "source_commit": "de25c6525aa866962309df5d107b32d55e6e5628", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4153: source-chart shortcut exhausts its optimistic allowance", + "evidence": "research/p104-source-chart-shortcut/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "status": "author-checked", + "source_commit": "9123241fea53df77e51ffe30d9aca1625d4bf3a8", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4154: fiber-tag seam mismatch", + "evidence": "research/p104-fiber-tag-seam/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "status": "author-checked", + "source_commit": "4ffcdaee5d6255a9cea1fe53a5424435068089d0", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "Selected PR5599: complete helper-subspace construction and independent caller replay; five framework assumptions remain.", + "evidence": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "remaining": "The next experiment must identify uncovered source-specific work. Successor archive intake does not transfer this admission.", + "status": "reviewed", + "source_commit": "09dd0965711ca7eeb169057a420abab1c9052137", + "selected_record_sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5" + } + ] + }, + "scope_status": "changed", + "actual_scope": "Find a cocharted dyadic helper split on the exact #7109 signed native word and verify the complete conditional gain.", + "scope_change_reason": "A full coframe search nominated an independent split at an existing chart contact, with no paid MOVE changes.", + "bottleneck_link": "Compare the complete signed productive and paid profile on the unchanged complex supplier contract.", + "stop_rule": "Require zero exact endpoint failures, all changed chart columns and signed routes, two strict rational price engines, and clean replay.", + "outcome": "completed", + "evidence": "README.md, RESULT.json and the hash-bound REPLAY.tar.gz.", + "author": "ToikY", + "ai_assistance": "Substantial OpenAI Codex assistance with exact construction and independent verification.", + "open_questions": [ + { + "question": "Can a total physical provider and common-volume tariff bridge admit the retained odd-scalar word?", + "why_it_matters": "The exponent retains the source tariff and all-width contracts.", + "first_step": "Start from #6998 and audit the source/provider conversion and A6 trace under one tape width model.", + "blocked_by": "The fixed-tape conversion and total rounded provider are unresolved." + } + ] +} diff --git a/research/cocharted-rank9-helper-split/VERIFY.json b/research/cocharted-rank9-helper-split/VERIFY.json new file mode 100644 index 0000000000..f13d57a73c --- /dev/null +++ b/research/cocharted-rank9-helper-split/VERIFY.json @@ -0,0 +1,19 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 600, + "checks": "Clean exact normalized native and caller replay, changed chart maps and phase, precision, both directed prices and negative controls." + } + ] +} diff --git a/research/cocharted-rank9-helper-split/verify.py b/research/cocharted-rank9-helper-split/verify.py new file mode 100644 index 0000000000..f67a3445f3 --- /dev/null +++ b/research/cocharted-rank9-helper-split/verify.py @@ -0,0 +1,22 @@ +"""Replay the cocharted rank-nine helper split.""" +from hashlib import sha256 +import os +from pathlib import Path +import subprocess +import sys +import tarfile +from tempfile import TemporaryDirectory + +ARCHIVE_SHA = "7a254b76dc6050451f01331205136d1be1ddae14f085cbd54adc44518793de94" +root = Path(__file__).resolve().parent +archive = root / "REPLAY.tar.gz" +assert __debug__ and sys.version_info[:2] == (3, 12) +assert sha256(archive.read_bytes()).hexdigest() == ARCHIVE_SHA +with TemporaryDirectory(prefix="croc-cochart-package-") as temp: + source, result = Path(temp) / "source", Path(temp) / "result" + source.mkdir() + with tarfile.open(archive) as bundle: + bundle.extractall(source, filter="data") + subprocess.run(["bash", str(source / "verify.sh"), str(result)], + check=True, env=os.environ | {"RANK9_PYTHON": sys.executable}) + assert (result / "RESULT.json").read_bytes() == (root / "RESULT.json").read_bytes() diff --git a/research/historical-selected-replay-gap/README.md b/research/historical-selected-replay-gap/README.md index 55d8cc3b49..36d9a873ca 100644 --- a/research/historical-selected-replay-gap/README.md +++ b/research/historical-selected-replay-gap/README.md @@ -69,7 +69,11 @@ python3 -B scripts/research_package.py --package research/historical-selected-re The direct command prints `PASS_HISTORICAL_SELECTED_REPLAY_GAP`. A registered replay prints `PASS_REGISTERED_RESEARCH_PACKAGE`. Both require Git history -containing the two inspected commits. +containing the two inspected commits and the source and manifest objects at +`2485805a6d47f36ea83ddde6327d453ac82d44dc`. The verifier uses a temporary +sparse checkout of that commit, checks the declared source digests there, and +uses its planner and manifest inventory. The recorded rejections and selection +therefore remain reproducible after later changes to the live Makefile or CI guide. ## Open next questions diff --git a/research/historical-selected-replay-gap/SOURCES.json b/research/historical-selected-replay-gap/SOURCES.json index c1010eec95..62bb8b3950 100644 --- a/research/historical-selected-replay-gap/SOURCES.json +++ b/research/historical-selected-replay-gap/SOURCES.json @@ -4,13 +4,13 @@ "files": [ { "path": "Makefile", - "usage": "input", + "usage": "provenance", "git_blob": "0d683a06b9e7ee162496108ce9a7c5d2ee94fccf", "sha256": "4f2d4f2dcd15139ec82658a975f85ed300897385f85799218539f4c8d60567da" }, { "path": "certificates/partial-swap-network.json", - "usage": "input", + "usage": "provenance", "git_blob": "eccafa830c16170c36faf93045ddf1f638f7bcd4", "sha256": "4c0b9d37e1034b2076e30a70f8e514416298c462d9ee98bc87fe6556b14df786" }, @@ -22,7 +22,7 @@ }, { "path": "docs/ci-verification.md", - "usage": "input", + "usage": "provenance", "git_blob": "63ba3e9aa8bdc5e942b56e34244b92b16f854085", "sha256": "c7d3027e9ad8bcbff68f07aa9576b30fb2f3c76c44d876d40c7fdbf4a3e2228a" }, @@ -34,163 +34,163 @@ }, { "path": "research/clifford-state-performance/SOURCE.json", - "usage": "input", + "usage": "provenance", "git_blob": "6f98a0061a5104dfab82c9e806f819b41811f684", "sha256": "396d0f08df24952248140d5c65c51b8c902ef1c580892ff7ea182890530f67ee" }, { "path": "research/community-batch1047-audit/CONTENT-COVERAGE.json", - "usage": "input", + "usage": "provenance", "git_blob": "5e0f92af463ec12c5e1dcc3effd44081a88af647", "sha256": "07a9daeaf2bda308a92e9a4684f13d5fc766c7772d74801fceb7f4599fdab226" }, { "path": "research/community-batch1099-audit/CONTENT-COVERAGE.json", - "usage": "input", + "usage": "provenance", "git_blob": "9e13266bf85e627f1b7dc225e9530ea69fd2c7f0", "sha256": "421e1211fb1897c45621dc6801c276e53f2e6f335583c9c9049e535f87c0a3b1" }, { "path": "research/community-batch932-audit/CONTENT-COVERAGE.json", - "usage": "input", + "usage": "provenance", "git_blob": "cc4d03eb59b9ab3f952735f7e88ff18c2d15d7af", "sha256": "184629cac91a5cfaca50330a88596008b824221433867dcf8117539c913c284a" }, { "path": "research/community-batch970-audit/CONTENT-COVERAGE.json", - "usage": "input", + "usage": "provenance", "git_blob": "8b9f4111badf7de5d97684799560b55110e9da79", "sha256": "23188ed920e38a54006cb883e181585620821c63bf7e8b5e05d32719417cc37e" }, { "path": "research/community-frontier741-audit/CONTENT-COVERAGE.json", - "usage": "input", + "usage": "provenance", "git_blob": "a5300d4e7a5381a3f443fc54c768ca6f0f236d68", "sha256": "3c820fb30e1b4d9bcfc6a7ab524375e5b2abd66b940af2c509146104f0bcd79c" }, { "path": "research/community-frontier890-audit/CONTENT-COVERAGE.json", - "usage": "input", + "usage": "provenance", "git_blob": "d7ff6d777b01d69b6ce84caf25d3b7e4a4d2f211", "sha256": "6b185a9902652f893f3ebd8ada92d2f11b6de6533a9a4d11718a8a4496101128" }, { "path": "research/community-hyperplane599-audit/SOURCE.json", - "usage": "input", + "usage": "provenance", "git_blob": "546f37d326d10a99910ae8f908e71ef768524d98", "sha256": "65099d764bfcc39bda5e4d9966783611b094c3522dbdd1435cd498d657a8ef8e" }, { "path": "research/community-k492-audit/SOURCE.json", - "usage": "input", + "usage": "provenance", "git_blob": "e538481e4cb16ed936d3195f2dfb5b5a9ca0a76b", "sha256": "2c0f4fa5bc150d05658af2e7c54c4d2c337dd52b7efd3d69530ae73bcbdf452a" }, { "path": "research/community-reconciliation92-audit/MANIFEST.json", - "usage": "input", + "usage": "provenance", "git_blob": "2a2e93685173d5f13cbb5abe740f5d90352e0228", "sha256": "5f501f3c118131e7d069f30ad77186eb2ad6961f9680a0ef105f4514ed41808a" }, { "path": "research/partial-swap-digest/baseline.py", - "usage": "input", + "usage": "provenance", "git_blob": "a2f0190704db83bd8ef48e46e723c49b925804fe", "sha256": "81e9af92cdf38243a540cdcff2062778e449467848d444da37a9553c12ca4c34" }, { "path": "research/r420-two-sided-basis/SOURCES.json", - "usage": "input", + "usage": "provenance", "git_blob": "5d718e11e62f4bcadecf1e02d6b61f87dbe190b0", "sha256": "d9810b0d139c5a1211fd2c1f0d142187cc1fca30026e1e7bc4f9ecfacf1596d1" }, { "path": "research/skip-clones/SOURCE.json", - "usage": "input", + "usage": "provenance", "git_blob": "8d1bb3b9c8189e35e5d8bfdfa632d7473e8be0d5", "sha256": "0b68e63e35a97ce6b0cdb6e291b88ebaa8f2dd4afb70b2498f10ee89428258dc" }, { "path": "research/split-skip/SOURCE.json", - "usage": "input", + "usage": "provenance", "git_blob": "2ab610b6ea2edd2865fda793ef2168b0c76afb4f", "sha256": "7c2b4646a3ecfef6f881da5c43e4bd0fa9a4d1b00548b8ab458d897e16735134" }, { "path": "scripts/historical-ci-inputs/Makefile", - "usage": "input", + "usage": "provenance", "git_blob": "aff68409021c9d401a6f8013b9dfd7dbcc30f2a8", "sha256": "ea8830dd79da493e2d75baf753d733ff7efbcf2b4794afe41fae0ac8f3055646" }, { "path": "scripts/historical-ci-inputs/ledger-batch932-run_isolated_tests.py", - "usage": "input", + "usage": "provenance", "git_blob": "65db599ab0b1dea0312c4ca048e0bd0f44c3736f", "sha256": "96ea543e6c707424afe247e77bd86c82152f90fc76a0773c4232145da5cdf8d1" }, { "path": "scripts/historical-ci-inputs/ledger-batch932-test_isolated_test_runner.py", - "usage": "input", + "usage": "provenance", "git_blob": "34820a8f24678f918f4d0e7a35380d8013fc3495", "sha256": "628391b6abfbc8674ceec1751867a4392f2cc0b5b66886243e139af86cf355ac" }, { "path": "scripts/historical-ci-inputs/ledger-batch970-verify_selected_result.py", - "usage": "input", + "usage": "provenance", "git_blob": "c755b76e0d44ba4917aa94440ebe54daefce5b2a", "sha256": "d7fd929726b326aeeaf0a3996475adec88eee9aac09ae0bebeeaa0bc1fc8f199" }, { "path": "scripts/historical-ci-inputs/ledger-frontier741-ci-verification.md", - "usage": "input", + "usage": "provenance", "git_blob": "7f3c012504187917a728b9fe87043f0fc8cd006a", "sha256": "a854022e0e1d5d4db4d60e586be3ea56005013ef14a1fc06d02bc06e8529c4b0" }, { "path": "scripts/historical-ci-inputs/partial-swap-context.json", - "usage": "input", + "usage": "provenance", "git_blob": "ad65114886bf34a4fd27e79f3be502389e689faa", "sha256": "833a9642f33aeab2ffea17ec9c6b82e0a953f90192b2c82e10bef21538dccba9" }, { "path": "scripts/historical-ci-inputs/partial-swap-network.json", - "usage": "input", + "usage": "provenance", "git_blob": "52075f2463f60af5e16571347f24274fce73a1ea", "sha256": "f3c4be597b2f2136da4ae2cc80c7454f63c90aa01f84e5b8131cee4dd55de815" }, { "path": "scripts/partial_swap/shared.py", - "usage": "input", + "usage": "provenance", "git_blob": "44a0e454c70f9c4b98e258b8443612e6a119904b", "sha256": "5a0646a50b9f3e8ea55168620a78e8853b0ab810517cefc8cfb8696aedee278a" }, { "path": "scripts/replay_historical_check.py", - "usage": "input", + "usage": "provenance", "git_blob": "1e92fff2782970ef71378f594f2350d245a4db26", "sha256": "5467619c78183d3adc82b0cb55af28e5c1a01fca2b0588677816244b53e2bafd" }, { "path": "scripts/research_package.py", - "usage": "input", + "usage": "provenance", "git_blob": "091b4c8f58bac9a9580d76025b887dc5c873d05f", "sha256": "e1256016e7f51827d04fa2179255989f639ae1d97afaa9c16265f85a0c6abd70" }, { "path": "scripts/run_isolated_tests.py", - "usage": "input", + "usage": "provenance", "git_blob": "a96ab35b315ce492e7fbbfd6c5ae211aa066b541", "sha256": "49eb56dd0fc0d8d8ffdb209970a7adf2176223580646f575d5c22e59543b381c" }, { "path": "scripts/verify_selected_result.py", - "usage": "input", + "usage": "provenance", "git_blob": "6882a4700e410dec569b51ae2eaf1a19cc019195", "sha256": "d6b305eac5b9bdb8172c469ad30a1655a60fa0aceac8b1bf610e1b73f51babd8" }, { "path": "tests/test_isolated_test_runner.py", - "usage": "input", + "usage": "provenance", "git_blob": "343b24abf6719b81805eba5a84c74e57634c8288", "sha256": "3a5470d0b139828b90e19bf9583ddeafcd69f8e34f2824664eb3a2958a52e34d" } diff --git a/research/historical-selected-replay-gap/VERIFY.json b/research/historical-selected-replay-gap/VERIFY.json index 98553e72ed..ab7efa3471 100644 --- a/research/historical-selected-replay-gap/VERIFY.json +++ b/research/historical-selected-replay-gap/VERIFY.json @@ -4,36 +4,7 @@ "python": "3.12", "requirements": [], "inputs": [ - "Makefile", - "certificates/partial-swap-network.json", - "docs/ci-verification.md", - "research/clifford-state-performance/SOURCE.json", - "research/community-batch1047-audit/CONTENT-COVERAGE.json", - "research/community-batch1099-audit/CONTENT-COVERAGE.json", - "research/community-batch932-audit/CONTENT-COVERAGE.json", - "research/community-batch970-audit/CONTENT-COVERAGE.json", - "research/community-frontier741-audit/CONTENT-COVERAGE.json", - "research/community-frontier890-audit/CONTENT-COVERAGE.json", - "research/community-hyperplane599-audit/SOURCE.json", - "research/community-k492-audit/SOURCE.json", - "research/community-reconciliation92-audit/MANIFEST.json", - "research/partial-swap-digest/baseline.py", - "research/r420-two-sided-basis/SOURCES.json", - "research/skip-clones/SOURCE.json", - "research/split-skip/SOURCE.json", - "scripts/historical-ci-inputs/Makefile", - "scripts/historical-ci-inputs/ledger-batch932-run_isolated_tests.py", - "scripts/historical-ci-inputs/ledger-batch932-test_isolated_test_runner.py", - "scripts/historical-ci-inputs/ledger-batch970-verify_selected_result.py", - "scripts/historical-ci-inputs/ledger-frontier741-ci-verification.md", - "scripts/historical-ci-inputs/partial-swap-context.json", - "scripts/historical-ci-inputs/partial-swap-network.json", - "scripts/partial_swap/shared.py", - "scripts/replay_historical_check.py", - "scripts/research_package.py", - "scripts/run_isolated_tests.py", - "scripts/verify_selected_result.py", - "tests/test_isolated_test_runner.py" + "scripts/research_package.py" ], "commands": [ { diff --git a/research/historical-selected-replay-gap/verify.py b/research/historical-selected-replay-gap/verify.py index 83b995941a..9d266c5a4e 100644 --- a/research/historical-selected-replay-gap/verify.py +++ b/research/historical-selected-replay-gap/verify.py @@ -6,8 +6,10 @@ """ import hashlib import importlib.util +import json import subprocess import sys +import tempfile from pathlib import Path ROOT = Path(__file__).resolve().parents[2] @@ -61,31 +63,47 @@ def require(ok, message): raise SystemExit(message) -def load_checker(): - path = ROOT / "scripts/replay_historical_check.py" - spec = importlib.util.spec_from_file_location("historical_selected_replay_gap_checker", path) +def load_module(path): + spec = importlib.util.spec_from_file_location(path.stem, path) module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) return module +def checkout_snapshot(snapshot, sources, runner, env): + paths = [runner.canonical_relative_path(row["path"]) for row in sources["files"]] + git = ["git", "-c", "maintenance.auto=false", "-c", "gc.auto=0", + "-c", "core.autocrlf=false"] + subprocess.run([*git, "clone", "--quiet", "--shared", "--no-tags", "--no-checkout", + "--", str(ROOT), str(snapshot)], cwd=ROOT, env=env, check=True) + subprocess.run([*git, "update-ref", "--no-deref", "HEAD", INSPECTED], + cwd=snapshot, env=env, check=True) + # The pinned planner reads omitted manifests from the sparse HEAD/index. + patterns = "".join(f"/{path.as_posix()}\n" for path in paths) + subprocess.run([*git, "sparse-checkout", "set", "--no-cone", "--stdin"], + cwd=snapshot, env=env, input=patterns.encode("utf-8"), check=True) + subprocess.run([*git, "read-tree", "-mu", "HEAD"], cwd=snapshot, env=env, check=True) + for path, row in zip(paths, sources["files"], strict=True): + require(hashlib.sha256((snapshot / path).read_bytes()).hexdigest() == row["sha256"], + "historical checkout source digest changed: " + path.as_posix()) + + def entries(checker): for name, config in checker.CONFIG.items(): for entry in [config, *config.get("additional_inputs", [])]: yield name, entry -def reject(checker, entry): +def reject(root, checker, entry): try: - checker.authenticated_input(ROOT, entry) + checker.authenticated_input(root, entry) except ValueError as exc: return str(exc) raise SystemExit("historical input was admitted: " + entry["path"]) -def main(): - require(not sys.flags.optimize, "assertions must stay enabled") - checker = load_checker() +def check_snapshot(root, env): + checker = load_module(root / "scripts/replay_historical_check.py") selected = [entry for name, entry in entries(checker) if name == "tooling-ledger" and entry["path"] == SELECTED_PATH] require(len(selected) == 1, "selected-result checker overlay is not unique") @@ -94,7 +112,7 @@ def main(): require(entry["accepted_live_sha256"] == [SELECTED_ACCEPTED], "accepted selected-checker successors changed") frozen = (checker.INPUTS / entry["input"]).read_bytes() - live = (ROOT / SELECTED_PATH).read_bytes() + live = (root / SELECTED_PATH).read_bytes() require(hashlib.sha256(frozen).hexdigest() == SELECTED_PIN, "frozen selected checker bytes changed") require(hashlib.sha256(live).hexdigest() == SELECTED_LIVE, "live selected checker digest changed") require(SELECTED_LIVE not in (SELECTED_PIN, SELECTED_ACCEPTED), "live checker was already admitted") @@ -102,7 +120,7 @@ def main(): # live successor, not a broken comparison. require(SELECTED_PIN in (SELECTED_PIN, *entry["accepted_live_sha256"]), "pin membership control failed") - require(reject(checker, entry) == REJECTIONS[SELECTED_PATH][1], + require(reject(root, checker, entry) == REJECTIONS[SELECTED_PATH][1], "selected checker rejection text changed") counts = {path: 0 for path in REJECTIONS} @@ -110,7 +128,7 @@ def main(): for _name, item in entries(checker): if item["path"] not in REJECTIONS: continue - message = reject(checker, item) + message = reject(root, checker, item) counts[item["path"]] += 1 messages.setdefault(item["path"], message) for path, (count, message) in REJECTIONS.items(): @@ -118,20 +136,31 @@ def main(): require(messages[path] == message, "rejection text changed for " + path) require(sum(counts.values()) == 19, "rejection total changed") ci = [item for _name, item in entries(checker) if item["path"] == CI_PATH] - require(len(ci) == 1 and hashlib.sha256((ROOT / CI_PATH).read_bytes()).hexdigest() == CI_LIVE, + require(len(ci) == 1 and hashlib.sha256((root / CI_PATH).read_bytes()).hexdigest() == CI_LIVE, "selected CI note digest changed") diff = subprocess.check_output( - ["git", "diff", "--name-only", PARENT, INSPECTED], cwd=ROOT, text=True) + ["git", "diff", "--name-only", PARENT, INSPECTED], cwd=root, env=env, text=True) changed = sorted(name for name in diff.splitlines() if name) require(changed == CHANGED, "inspected commit diff changed") - sys.path.insert(0, str(ROOT / "scripts")) - from research_package import plan_details - details = plan_details(ROOT, set(changed)) + planner = load_module(root / "scripts/research_package.py") + details = planner.plan_details(root, set(changed)) require([row["package"] for row in details] == PLAN_PACKAGES, "helper plan selection changed") matched = {name for row in details for names in row["causes"].values() for name in names} require(sorted(set(changed) - matched) == UNMATCHED, "unmatched plan paths changed") - require(plan_details(ROOT, set()) == [], "empty change set selected a package") + require(planner.plan_details(root, set()) == [], "empty change set selected a package") + + +def main(): + require(not sys.flags.optimize, "assertions must stay enabled") + sources = json.loads(Path(__file__).with_name("SOURCES.json").read_bytes()) + require(sources["base_commit"] == INSPECTED, "historical checkout base changed") + runner = load_module(ROOT / "scripts/research_package.py") + env = runner.git_source_env() + with tempfile.TemporaryDirectory(prefix="historical-selected-replay-") as temporary: + snapshot = Path(temporary) / "snapshot" + checkout_snapshot(snapshot, sources, runner, env) + check_snapshot(snapshot, env) print("PASS_HISTORICAL_SELECTED_REPLAY_GAP") print("selected_checker_live=" + SELECTED_LIVE) print("rejections=19 distinct_paths=7 plan_packages=9")