From ebcc53a61625a0fea7f2b63dc6a4f124161513a9 Mon Sep 17 00:00:00 2001 From: Wentao Li Date: Sun, 18 Oct 2026 13:25:50 +0000 Subject: [PATCH 1/9] =?UTF-8?q?Research:=20present-head=20flag-0=20span=20?= =?UTF-8?q?audit=20=E2=80=94=20Y34=20hosts=20head=20232=20only=20at=20term?= =?UTF-8?q?inal=20transport=20(no=20new=20kappa)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pin matched flag 0 (X0→Y34, head 232): all 15 Y34 updates are head-free in span; source keeps 232 after the literal drop at 591; co-hosted dirty restoration is unavailable on the published channel ahead of the I-G/2 tail. Prepared by Wentao Li with substantial AI assistance. --- .../CERTIFICATE.json | 227 ++++++++++ .../MASTER-HANDOFF.md | 96 ++++ .../p104-present-head-flag0-audit/NOTICE.md | 9 + .../p104-present-head-flag0-audit/PROOF.md | 106 +++++ .../p104-present-head-flag0-audit/README.md | 68 +++ .../SOURCES.json | 44 ++ .../p104-present-head-flag0-audit/TASK.json | 96 ++++ .../p104-present-head-flag0-audit/VERIFY.json | 28 ++ .../independent.py | 343 +++++++++++++++ .../test_package.py | 224 ++++++++++ .../p104-present-head-flag0-audit/verify.py | 415 ++++++++++++++++++ 11 files changed, 1656 insertions(+) create mode 100644 research/p104-present-head-flag0-audit/CERTIFICATE.json create mode 100644 research/p104-present-head-flag0-audit/MASTER-HANDOFF.md create mode 100644 research/p104-present-head-flag0-audit/NOTICE.md create mode 100644 research/p104-present-head-flag0-audit/PROOF.md create mode 100644 research/p104-present-head-flag0-audit/README.md create mode 100644 research/p104-present-head-flag0-audit/SOURCES.json create mode 100644 research/p104-present-head-flag0-audit/TASK.json create mode 100644 research/p104-present-head-flag0-audit/VERIFY.json create mode 100644 research/p104-present-head-flag0-audit/independent.py create mode 100644 research/p104-present-head-flag0-audit/test_package.py create mode 100644 research/p104-present-head-flag0-audit/verify.py diff --git a/research/p104-present-head-flag0-audit/CERTIFICATE.json b/research/p104-present-head-flag0-audit/CERTIFICATE.json new file mode 100644 index 0000000000..7a6d96f8e0 --- /dev/null +++ b/research/p104-present-head-flag0-audit/CERTIFICATE.json @@ -0,0 +1,227 @@ +{ + "schema_version": 1, + "claim_id": "p104-present-head-flag0-audit", + "pinned_main": "6f100d4bb5083f8c35d96fd95a539811c62f245c", + "flag_index": 0, + "source": 0, + "target": 34, + "basis_head": 232, + "departure_choice": 0, + "arrival_choice": 1, + "basis": [ + 232, + 23, + 5, + 8, + 32, + 64, + 257, + 2, + 1 + ], + "source_register": "X0", + "target_register": "Y34", + "source_initial": [ + 232 + ], + "source_final": [ + 1, + 2, + 4, + 8, + 16, + 32, + 64, + 128, + 256 + ], + "target_initial": [], + "target_final": [ + 499, + 23, + 232, + 32, + 112, + 15, + 7, + 2 + ], + "source_initial_is_basis_head": true, + "target_final_contains_basis_head": true, + "source_frame_restored": false, + "target_frame_restored": false, + "source_rank_initial": 1, + "source_rank_final": 9, + "target_rank_initial": 0, + "target_rank_final": 8, + "source_first_event": 591, + "source_last_event": 3954, + "target_first_event": 129, + "target_last_event": 3500, + "source_event_count": 17, + "target_event_count": 21, + "joint_source_target_events": 0, + "basis_head_drop_event": 591, + "basis_head_drop_before": [ + 232 + ], + "basis_head_drop_after": [ + 8, + 32, + 64, + 128, + 256 + ], + "basis_head_arrive_event": 3500, + "basis_head_arrive_before": [ + 2, + 16, + 32, + 95, + 502 + ], + "basis_head_arrive_after": [ + 2, + 7, + 15, + 23, + 32, + 112, + 232, + 499 + ], + "hosting_gap_events": 2909, + "source_annotations_containing_basis_head": 1, + "target_annotations_containing_basis_head": 1, + "target_preterminal_annotations_containing_basis_head": 0, + "source_head_annotations": [ + { + "event": 591, + "opcode": "transport", + "role": "before", + "frame": [ + 232 + ] + } + ], + "target_head_annotations": [ + { + "event": 3500, + "opcode": "transport", + "role": "after", + "frame": [ + 2, + 7, + 15, + 23, + 32, + 112, + 232, + 499 + ] + } + ], + "target_annotated_vectors": [ + 2, + 7, + 15, + 16, + 23, + 32, + 95, + 112, + 232, + 486, + 499, + 502 + ], + "basis_head_in_any_target_annotation": true, + "basis_head_in_source_after_drop": false, + "drop_after_span_decomposition_of_head": [ + 8, + 32, + 64, + 128 + ], + "drop_transport_span_nested": true, + "source_annotation_count": 22, + "source_annotations_span_hosting_basis_head": 22, + "source_span_drop_events": [], + "target_span_first_hosting_event": 3500, + "target_span_first_hosting_role": "after", + "target_preterminal_annotations_span_hosting_basis_head": 0, + "target_arrive_before_span": [ + 0, + 2, + 16, + 18, + 32, + 34, + 48, + 50, + 77, + 79, + 93, + 95, + 109, + 111, + 125, + 127, + 393, + 395, + 409, + 411, + 425, + 427, + 441, + 443, + 452, + 454, + 468, + 470, + 484, + 486, + 500, + 502 + ], + "target_update_events": [ + 129, + 130, + 131, + 132, + 133, + 2022, + 2155, + 2240, + 2328, + 2395, + 2544, + 2815, + 2998, + 3200, + 3369 + ], + "target_updates_in_head_free_span": 15, + "target_last_update_event": 3369, + "target_events_after_span_cohost_open": 0, + "source_events_after_span_cohost_open": [ + 3642, + 3798, + 3850, + 3954 + ], + "endpoint_transport_count": 11, + "endpoint_transports_span_nested_upward": true, + "endpoint_transport_rank_steps_match": true, + "targets_whose_final_contains_basis_head_among_all": 24, + "hit_flags_from_census": [ + 0, + 1, + 9, + 43 + ], + "flag_is_present_head_case": true, + "obstruction": "published_channel_hosts_basis_head_on_matched_target_only_at_terminal_transport_literally_and_in_span_after_every_target_update", + "no_new_kappa": true, + "selected_kappa": "0.001672660197076918" +} diff --git a/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md b/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md new file mode 100644 index 0000000000..5925bb26bc --- /dev/null +++ b/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md @@ -0,0 +1,96 @@ +# Master handoff — `research/p104-present-head-flag0-audit/` + +## Candidate + +- Branch: `cursor/p104-present-head-flag0-audit-60b9` (VictorLiwentao fork) +- Content tip: fill after commit (`git rev-parse HEAD`) +- Packaging tip: same tip once `MASTER-HANDOFF.md` carries the committed SHA +- Package: `research/p104-present-head-flag0-audit/` +- Base: CrocSwap main `6f100d4bb5083f8c35d96fd95a539811c62f245c` +- Card: `p104-side-correction` (refined), priority revision 6 +- κ: unchanged `0.001672660197076918` + +## Claim + +On published present-head flag 0 (`X0` → `Y34`, basis head `232`), the head +enters `Y34`'s frame, listed and in GF(2) span, only at `Y34`'s terminal +transport after-frame (event 3500). All fifteen `Y34` adds (last one at event +3369) run in head-free charts. `X0`'s literal drop at event 591 is a nested +chart change that keeps `232` in span (`8 ^ 32 ^ 64 ^ 128`). No `Y34` event +occurs while both endpoints host the head direction, so chronological dirty +restoration cannot use co-hosted basis-head geometry on this coefficient-cascade +target ahead of the published `I-G/2` tail add. + +## Why flag 0 now + +#3451 leaves flag 0 to the coefficient cascade on `Y34`. Open #3575 already +pins the literal arrive at 3500 and the empty forward Q-relay, but does not +check GF(2) span hosting, head-free update counts, or nested-transport +semantics. The span reading is the dirty-restoration fact: at event 3500, `X0` +is already on the coordinate basis (does not list `232`) yet still spans it, and +all 15/15 `Y34` updates precede that first span co-hosting. + +## New checkable facts beyond #3575's literal relay cut + +- Span-level hosting: zero source span drops (22 of 22 `X0` annotations span + `232`), and zero preterminal `Y34` span hosting. +- Target-update chronology: 15 of 15 `Y34` row updates run in head-free charts, + and there are 0 `Y34` events after the head enters `Y34`'s span. +- Frame semantics check: all 11 endpoint transports are nested upward, and each + paid rank equals the rank increase. +- Literal facts aligning with #3575: `preterminal_hosting=0`, `drop_event=591`, + `arrive_event=3500`, `hosting_gap_events=2909`, zero joint events, both frames + unrestored. + +## Evidence commands + +```sh +python3.12 -I -B research/p104-present-head-flag0-audit/verify.py +python3.12 -I -O -Werror -B research/p104-present-head-flag0-audit/verify.py +python3.12 -I -O -Werror -B research/p104-present-head-flag0-audit/independent.py +python3.12 -I -O -Werror -B research/p104-present-head-flag0-audit/test_package.py +python3.12 -B scripts/research_package.py --package research/p104-present-head-flag0-audit +``` + +Expected markers: + +```text +PASS_P104_PRESENT_HEAD_FLAG0 flag=0 head=232 preterminal_hosting=0 preterminal_span_hosting=0 drop_event=591 arrive_event=3500 source_span_drops=0 head_free_target_updates=15/15 no_new_kappa +PASS_P104_PRESENT_HEAD_FLAG0_INDEPENDENT flag=0 head=232 preterminal_hosting=0 preterminal_span_hosting=0 drop_event=591 arrive_event=3500 source_span_drops=0 head_free_target_updates=15/15 no_new_kappa +PASS_P104_PRESENT_HEAD_FLAG0_TESTS groups=6 +PASS_REGISTERED_RESEARCH_PACKAGE research/p104-present-head-flag0-audit outcome=completed +``` + +## Closest priors / soft-overlap vs leave-alones + +- Open #3575 `p104-flag0-relay`: literal relay cut; soft-overlap on drop/arrive + numbers; this package adds the span/dirty-restoration obstruction and does not + recompute Q-relay emptiness. +- #3451/#3443/#3456 present-head chronologies for flags 1/9/43: leave alone; + method kinship only; different target/arrive/update counts. +- #3601/#3610/#3614/#3618/#3621 present-head side-correction bills: leave alone; + this package prices no `I-G/2` rank mass. +- `research/p104-tail-flag0-*` coefficient cascade: leave alone as coefficient + receipts; this package recomputes no coefficient and does not read the tail. +- C5 charging #3643/#3639 and deferred router-rho / class-only `S_leaf=1`: + disjoint. + +## Open questions + +1. Can a changed schedule bring `232` into `Y34`'s span before the add at event + 3369, while `X0` is still live, and what does that add to the channel bill + ahead of event 5759? +2. Does the published promote/add/restore at 5758/5759/5807 admit an owner/host + schedule for the `X0` read that restores arbitrary dirt without repaying the + unrestored channel endpoints? + +## Disposition note for master + +The worker produces a fork branch and package only. Do **not** open a CrocSwap +PR from this worker. Master decides publish or defer after independent +skeptical review. + +## Attribution check + +Author Wentao Li ``. Neutral disclosure: substantial AI +assistance. Tip commit message must not contain `Co-authored-by: Victor Li`. diff --git a/research/p104-present-head-flag0-audit/NOTICE.md b/research/p104-present-head-flag0-audit/NOTICE.md new file mode 100644 index 0000000000..02ff76da57 --- /dev/null +++ b/research/p104-present-head-flag0-audit/NOTICE.md @@ -0,0 +1,9 @@ +# Notice + +This package is a finite annotated-frame audit of one published P104 matched +flag, read both as listed frame vectors and as GF(2) spans. It does not modify +frozen upstream sources. + +Prepared by Wentao Li with substantial AI assistance. +Apache-2.0; predecessor notices and exact source pins are retained in +`SOURCES.json`. diff --git a/research/p104-present-head-flag0-audit/PROOF.md b/research/p104-present-head-flag0-audit/PROOF.md new file mode 100644 index 0000000000..5d256399f3 --- /dev/null +++ b/research/p104-present-head-flag0-audit/PROOF.md @@ -0,0 +1,106 @@ +# Proof: present-head flag 0 late-only target hosting, literal and in span + +## Setup + +Pin CrocSwap main `6f100d4bb5083f8c35d96fd95a539811c62f245c`, the #2981 +208-flag matching (`research/p104-joint-unit-flags/CERTIFICATE.json`), and the +reviewed #1991 channel witness +(`research/p104-native-channel/inputs/LOWRANK-WITNESS.json`, 4,058 events). + +A register annotation is a transport before- or after-frame, or an add frame, +naming that register. The basis head of a matched flag is the first vector of its +basis. Open #3349 records that the target final contains that head for exactly +flags `(0, 1, 9, 43)`. This note audits flag 0, the coefficient-cascade target +`Y34`. + +Labels are vectors in the nine-dimensional binary space, written as integers +below 512. `research/p104-native-channel/PROOF.md` §2 treats each frame as a +binary frame `W` with canonical chart `Gamma_W`, and says every transport is +nested. A register *lists* the head when the head is one of the frame's vectors. +It *spans* the head when the head is a GF(2) sum of frame vectors. Listing +depends on the chosen generators. Spanning does not. + +## Statement + +Flag 0 has source `X0`, target `Y34` and basis head `232`. On the published word: + +1. `X0` begins at `[232]`. Its first event, transport 591, goes from `[232]` to + `[8, 32, 64, 128, 256]`. This removes `232` from the list. No later `X0` + annotation lists `232`. +2. The event-591 after-frame spans `232` through the unique decomposition + `8 ^ 32 ^ 64 ^ 128`. All 22 `X0` annotations span `232`. In span, the source + never drops the head. +3. `Y34` starts empty. Every preterminal `Y34` annotation excludes `232` from + both its listed vectors and its GF(2) span. In particular the before-frame of + the terminal transport is `[95, 502, 16, 32, 2]`, whose span excludes `232`. +4. Event 3500 is the last `Y34` event. It is a transport from + `[95, 502, 16, 32, 2]` to the target final + `[499, 23, 232, 32, 112, 15, 7, 2]`. This after-frame is the first `Y34` + annotation that lists or spans `232`. The literal gap from the source drop is + 2,909 events. +5. `Y34`'s row changes only at adds with `Y34` as the destination: fifteen + events from 129 through 3369. Each add runs in a common chart that excludes + `232` from its span. +6. No event names both `X0` and `Y34`. `X0` has four events after 3500 (3642, + 3798, 3850 and 3954), and none of them names `Y34`. At event 3500, `X0` + already sits on the coordinate basis `[1, 2, 4, 8, 16, 32, 64, 128, 256]`, + which does not list `232` but still spans it. +7. All eleven endpoint transports (five on `X0`, six on `Y34`) are nested upward. + Each transport's paid rank (its fifth field, which + `research/p104-native-channel/check_native.py` binds to the compiled recipe + rank) equals the rank increase. This matches the binary-frame reading. +8. Neither endpoint frame returns to its initial frame. `X0` goes from rank 1 to + rank 9 and `Y34` from rank 0 to rank 8. + +By items 2 and 4, the first chronological cut at which both endpoint frames +host the head direction is the after-frame of event 3500. By items 4 to 6, the +published word has no `Y34` event after that cut and no `Y34` update at or after +it. So no target update, and no event touching the target, happens while both +endpoints host the basis-head direction. Logical dirty restoration of the source +line into `Y34` along co-hosted basis-head geometry is unavailable on this word +ahead of the published `I-G/2` tail add. Under listing alone the same conclusion +holds with a 2,909-event gap; open #3575 already records the literal arrive at +3500 and the empty forward Q-relay. Item 2 shows that the literal source drop and +the coordinate-basis reading at 3500 are chart changes, not losses of direction. + +## Checking method + +Two scanners read the same pinned inputs. The primary scanner walks annotations +in program order and decides span membership by pivot-indexed row reduction. It +tracks combinations so it can return the decomposition of the head. The second +scanner indexes events per endpoint first, then builds each span as an explicit +XOR closure (at most 512 labels) and finds the decomposition by exhaustive subset +search. Both reject duplicate JSON keys and dependent frames, enforce the +SHA-256 source pins, and admit through `need()` under `python -O`. Their +receipts must equal the committed certificate. + +`test_package.py` copies the package and its inputs into a temporary tree. It +mutates four certificate fields, injects a duplicate key and flips one byte of +the witness. Both scanners must reject each change under `-O`. A negative +control edits an in-memory witness so that `Y34`'s frame from event 3368 onward +is `[95, 95 ^ 232]`, which spans `232` without listing it. The listing count +stays at zero, but the span fields move: hosting starts at 3368 and one of the +fifteen adds now runs in a head-hosting chart. This shows the span check catches +what listing misses. + +## Soft overlap + +Merged #3242 already records `X0`'s first event at 591 on `[232]`, and that no +matched pair shares an event. This package reuses those facts and adds the span +reading of the source and the target-side chronology for `Y34`. Open #3575 +records the literal flag-0 relay cut (drop 591, arrive 3500, empty forward +Q-relay) without span membership, head-free update counts, or nested-transport +checks. Open #3451/#3443/#3456 pin flags 1/9/43 and leave flag 0 alone; this +package does not re-audit those paths. The tail-flag0 coefficient cascade +(`research/p104-tail-flag0-*`) pins the published `-1/2` add at event 5759 on +the promoted frame; this package recomputes no coefficient and does not read +the tail word. Open #3392 (flag 2) and the #3349 census are not recomputed. + +## Limits + +This is a statement about the published frames of one matched flag. "Hosting" +means the head is listed in, or spanned by, an annotated endpoint frame. The +package does not model what the head direction means inside the relay registers +(`G`, `Q`, `D`, `C`). It does not price a repair, construct a changed schedule, +assign an owner to event 5759, or claim a new κ. A schedule that brings `232` +into `Y34`'s span before event 3369 is outside this certificate. diff --git a/research/p104-present-head-flag0-audit/README.md b/research/p104-present-head-flag0-audit/README.md new file mode 100644 index 0000000000..3c232f0bec --- /dev/null +++ b/research/p104-present-head-flag0-audit/README.md @@ -0,0 +1,68 @@ +# Present-head flag 0: the coefficient-cascade target hosts the head only after its last update + +**Scoped obstruction. No new exponent.** + +Open [#3349](https://github.com/CrocSwap/integer-mult-bounds/pull/3349) shows the +basis head is in the target final on only four of the 208 matched flags: +`(0, 1, 9, 43)`. Open [#3451](https://github.com/CrocSwap/integer-mult-bounds/pull/3451) +pins flag 1 and leaves flag 0 to the coefficient cascade on `Y34`. This package +pins flag 0 (`X0` → `Y34`, basis head `232`) with both literal-frame and GF(2)-span +chronology. + +On the published 4,058-event word, `Y34` never lists or spans `232` before its +last event. The head enters `Y34` only in the after-frame of the terminal +transport at event 3500. All fifteen adds into `Y34` (events 129 through 3369) +run in charts that exclude the head direction. No event names both `X0` and +`Y34`, and neither frame is restored. + +The source side behaves differently from what a literal reading suggests. `X0` +starts at `[232]`, and its first transport (event 591) lists +`[8, 32, 64, 128, 256]`. That drops `232` from the list but not from the span, +because `232 = 8 ^ 32 ^ 64 ^ 128`. Every one of the 22 `X0` annotations spans the +head. At event 3500, `X0` already sits on the coordinate basis, which does not +list `232`, but still spans it. The native channel's frames are binary subspaces +with nested transports, so the span reading is the chart-independent one. + +Both endpoints first host the head direction together at event 3500, and `Y34` +has no event after that. The published channel therefore never updates or touches +the matched target while both endpoints host the basis-head direction. +Chronological dirty restoration along co-hosted basis-head geometry is +unavailable on this word ahead of the published `I-G/2` tail add. In span, the +obstruction is entirely on the target side. + +Selected κ stays 0.001672660197076918. Details and limits are in +[PROOF.md](PROOF.md). + +## Reproduce + +```sh +python3.12 -I -B research/p104-present-head-flag0-audit/verify.py +python3.12 -I -O -Werror -B research/p104-present-head-flag0-audit/verify.py +python3.12 -I -O -Werror -B research/p104-present-head-flag0-audit/independent.py +python3.12 -I -O -Werror -B research/p104-present-head-flag0-audit/test_package.py +python3.12 -B scripts/research_package.py --package research/p104-present-head-flag0-audit +``` + +`verify.py` is read-only. Admission goes through `need()` and still fires under +`-O`. `test_package.py` corrupts temporary copies of the certificate and of one +pinned input and checks that both scanners reject them under `-O`. + +## Credit + +Credit Nick Petalas / #2981 for the flag matching, the reviewed #1991 channel +lineage for the witness, jwr404 / #3242 for the schedule receipt, #3349 for the +present-head census, #3451 for the flag-1 span method, #3443/#3456 for the +other present-head chronologies, #3392 for the absent-head counterpart, and +open #3575 for the literal flag-0 relay cut that this package extends with the +span reading. Prepared by Wentao Li with substantial AI assistance. + +## Open next questions + +1. Can a changed schedule put `232` into `Y34`'s span before its last add (event + 3369) while `X0` is still live, and what does that cost against the channel + bill ahead of the published `I-G/2` tail add at event 5759? +2. Does the published full-frame promote/add/restore at events 5758/5759/5807 + admit an owner/host schedule for the `X0` read that restores arbitrary dirt + without repaying the unrestored channel endpoints? + +[TASK.json](TASK.json) gives first steps and blockers for both. diff --git a/research/p104-present-head-flag0-audit/SOURCES.json b/research/p104-present-head-flag0-audit/SOURCES.json new file mode 100644 index 0000000000..6442bdd68a --- /dev/null +++ b/research/p104-present-head-flag0-audit/SOURCES.json @@ -0,0 +1,44 @@ +{ + "schema_version": 1, + "base_commit": "6f100d4bb5083f8c35d96fd95a539811c62f245c", + "upstream": "CrocSwap/integer-mult-bounds", + "files": [ + { + "path": "research/p104-joint-unit-flags/CERTIFICATE.json", + "usage": "input", + "git_blob": "0fa7d2d40566e92f3ea1539723abf438ba65adb8", + "sha256": "a98126428a8da6eae91c50afcc42e014a284c82b554ef77e5b3a34fc6d228128", + "credit": "Nick Petalas, PR #2981" + }, + { + "path": "research/p104-native-channel/inputs/LOWRANK-WITNESS.json", + "usage": "input", + "git_blob": "86beaf424e9f0f800ae3a62797d94ec9386b7706", + "sha256": "0f541bef7f19fdeffd67157684e9f03d785f42c89973632f508fc1a0452b580e", + "credit": "Reviewed #1991 native channel witness" + }, + { + "path": "research/p104-endpoint-geometric-budget/geometry.py", + "usage": "input", + "git_blob": "f49752bcfc321a6129186d4daa774b2c3fdb84f1", + "sha256": "1a2792189beaf15aa8180136ca007cd2301992a62e77ba72edea99b298e4148f", + "credit": "X/Y naming lines for the 104 sources and 104 targets" + }, + { + "path": "research/p104-native-channel/PROOF.md", + "usage": "provenance", + "git_blob": "a69311b74f74a2f8e8f411c1451baacd9bacddce", + "sha256": "5d743145d389ffdfaffc66096fa7e32c7155b18f73d74755403151d0435bb94c", + "pin": "base_commit:research/p104-native-channel/PROOF.md", + "credit": "Binary-frame semantics: nine-dimensional binary label space and nested transports" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "67f085acd86acd7d4e03922d9cf4b26bca66fed5", + "sha256": "47b42433f5a85809a3aadd29c2c339da2c6ed728e4f7762df6b88bccb7874cf0", + "pin": "base_commit:docs/research/agent-task-catalog.json", + "credit": "Priority revision 6 task catalogue at the pinned base" + } + ] +} diff --git a/research/p104-present-head-flag0-audit/TASK.json b/research/p104-present-head-flag0-audit/TASK.json new file mode 100644 index 0000000000..ad0ade5a0f --- /dev/null +++ b/research/p104-present-head-flag0-audit/TASK.json @@ -0,0 +1,96 @@ +{ + "schema_version": 1, + "task_id": "p104-side-correction", + "priority_revision": 6, + "selected_kappa": "0.001672660197076918", + "base_commit": "6f100d4bb5083f8c35d96fd95a539811c62f245c", + "original_card": { + "id": "p104-side-correction", + "question": "Can the proposed P104 joint endpoint flags be realized by a chronological correction program with coefficients, dirty restoration and an affordable complete bill?", + "starting_points": [ + "docs/research/research-family-status.md", + "research/p104-native-channel/README.md", + "research/p104-native-channel/PROOF.md", + "docs/research/community-efficient1000-review.md", + "research/p104-joint-unit-flags/README.md" + ], + "methods": [ + "Construct one side-correction word at an explicit chronological cut with the needed frames still available.", + "Derive a lower bound on the side correction and hosting costs that decides whether this channel can beat the selected budget." + ], + "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_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read the revision-6 family record and #2981 static joint flags, alongside the reviewed #1991 channel. #2981 is an author-checked source archive, not an independently validated executable correction or a refutation of program-level lifetime floors.", + "scope": "Source-bound orientation only. Read the named package and review before relying on its local evidence; this command is not its replay or supplier admission." + }, + "first_experiment": "After checking live handoffs, pin one named collection from #2981 and attach acquisition/delivery times, source dependencies and coefficient requirements. Test legal access and arbitrary dirty restoration; price any completion against the full channel/endpoint/hosting allowance. Stop with the exact missing implication or a scoped counterexample rather than expanding the static cover census.", + "bottleneck_link": "Completing an already realized changed channel tests a concrete construction opportunity, instead of refining the incumbent packing. A positive local result still needs global and all-size admission.", + "allowed_variations": [ + "One correction factorization, one chronological cut, or one explicit hosting obstruction.", + "A changed correction schedule with an updated full bill and native frame contract." + ], + "scope_change_triggers": [ + "Recompiling the already certified low-rank channel without closing a new obligation.", + "Treating a pending ancestor, local histogram or unpriced side correction as an admitted global supplier.", + "Repeating a correction or physical conversion already supplied by a pending follow-up without adding independent coverage or a different unresolved obligation.", + "Repeating the 208-flag static matching or calling a static nested cover a chronological correction program. Independent audit of that certificate is distinct and remains useful." + ], + "overlap_terms": [ + "P104", + "I-G/2", + "side correction", + "native channel", + "1972", + "1991", + "2586", + "endpoint transport", + "physical dual", + "relay composition", + "2981", + "joint unit flags", + "acquisition delivery", + "static nesting" + ], + "existing_checks": [ + { + "scope": "PR #2981 reports static joint endpoint flags and a matching of 208 departure and arrival flags; archival intake is not independent verification.", + "evidence": "research/p104-joint-unit-flags/README.md", + "remaining": "Independent flag check and a chronological coefficient program with dirty restoration and a complete cost.", + "status": "author-checked", + "source_commit": "3d24b92d8ba057b57cb2d480170ec407520e6882", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + } + ] + }, + "scope_status": "refined", + "actual_scope": "Pin matched present-head flag 0 (X0 to Y34, basis head 232) from the #2981 certificate and prove on the published #1991 channel that the basis head enters Y34's frame, both as a listed vector and in the GF(2) span, only at Y34's terminal transport after-frame (event 3500), after all fifteen Y34 row updates have run in head-free charts, while X0's span keeps the head at every annotation. No Y34 event occurs while both endpoint frames host the head direction, so chronological dirty restoration cannot use co-hosted basis-head geometry on this coefficient-cascade target.", + "scope_change_reason": "Open #3349 registers the 208-flag restoration census and names the present-head class (0, 1, 9, 43). Open #3451/#3443/#3456 pin flags 1/9/43 chronologies and leave flag 0 to the coefficient cascade on Y34. Open #3392 pins absent-head flag 2. Open #3575 records a literal forward-relay cut for flag 0 (drop 591, arrive 3500, empty Q-relay) without the GF(2) span reading. The native channel's frames are binary subspaces with nested transports, so this package checks hosting in span: the literal source drop and the coordinate-basis reading at event 3500 are chart changes, and the dirty-restoration obstruction is entirely on the target side (15/15 head-free updates; span co-hosting opens only at the terminal transport).", + "bottleneck_link": "Flag 0 is the coefficient-cascade target Y34. A present-head target final does not host the basis-head direction while the target is still being updated, so dirty restoration along co-hosted head geometry on the published word needs new Y34 events before the published I-G/2 tail add.", + "budget_minutes": 60, + "stop_rule": "Stop after flag 0's late-only hosting obstruction is pinned literally and in span and dual-scanned. Do not build a correction word, recompute algebraic relays, re-audit flags 1/9/43, or price the published tail add at event 5759.", + "outcome": "completed", + "evidence": "Flag 0 is source 0, target 34, basis head 232. X0 starts at [232]; its first transport at event 591 goes to [8, 32, 64, 128, 256], removing 232 from the list but not from the span (232 = 8 xor 32 xor 64 xor 128). All 22 X0 annotations span the head. Y34's preterminal frames never list or span 232. The head enters Y34 only in the after-frame of event 3500, Y34's last event (literal gap 2909 after event 591). Y34's fifteen adds (events 129 through 3369) all run in head-free charts. No joint X0/Y34 event exists; all eleven endpoint transports are nested upward with rank steps equal to their recorded costs. Neither endpoint frame is restored (ranks 1 to 9 and 0 to 8). At event 3500 X0 already sits on the coordinate basis, which does not list 232, but still spans it. Selected kappa is unchanged.", + "author": "Wentao Li", + "ai_assistance": "Substantial AI assistance for derivation, implementation, checking and writing.", + "no_new_kappa": true, + "open_questions": [ + { + "question": "Can a changed schedule place 232 in Y34's span before Y34's last row update (event 3369), while X0 is still live, and what does that add to the channel bill ahead of the published I-G/2 tail add at event 5759?", + "why_it_matters": "On the published word the head direction reaches Y34 only at its final transport, after the last add at event 3369. Dirty restoration along co-hosted head geometry therefore needs earlier target hosting or new target events before the coefficient cascade can use that geometry.", + "first_step": "Try moving part of Y34's rank-three terminal step (event 3500) ahead of the add at event 3369 so that 232 is in span there. Then check the common-chart requirement against D23's frame at that add.", + "blocked_by": "This package reads only the published frames of flag 0. It does not construct a repair, price one, or check D23's frame contract." + }, + { + "question": "Does the published full-frame promote/add/restore at events 5758/5759/5807 admit an owner/host schedule for the X0 read that restores arbitrary dirt without repaying the unrestored channel endpoints?", + "why_it_matters": "The coefficient cascade already pins the -1/2 add on the promoted frame. The remaining obligation is chronological dirty restoration and hosting for that source read, which this channel-prefix obstruction shows cannot reuse co-hosted basis-head geometry from the published word.", + "first_step": "Start from research/p104-tail-flag0-owner and ask whether any later host assignment for event 5759 is compatible with unrestored X0/Y34 channel finals.", + "blocked_by": "This package does not read the tail word or assign owners." + } + ] +} diff --git a/research/p104-present-head-flag0-audit/VERIFY.json b/research/p104-present-head-flag0-audit/VERIFY.json new file mode 100644 index 0000000000..e673794ce7 --- /dev/null +++ b/research/p104-present-head-flag0-audit/VERIFY.json @@ -0,0 +1,28 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/p104-joint-unit-flags/CERTIFICATE.json", + "research/p104-native-channel/inputs/LOWRANK-WITNESS.json", + "research/p104-endpoint-geometric-budget/geometry.py" + ], + "commands": [ + { + "argv": ["{python}", "-I", "-O", "-Werror", "-B", "{package}/verify.py"], + "timeout_seconds": 60, + "checks": "Program-order scan of flag 0 hosting on X0 and Y34: literal frames plus GF(2) span by row reduction" + }, + { + "argv": ["{python}", "-I", "-O", "-Werror", "-B", "{package}/independent.py"], + "timeout_seconds": 60, + "checks": "Per-register scan of the same flag-0 obstruction with explicit XOR-closure spans and subset search" + }, + { + "argv": ["{python}", "-I", "-O", "-Werror", "-B", "{package}/test_package.py"], + "timeout_seconds": 120, + "checks": "Duplicate JSON keys, temp-tree certificate and input corruption under -O, optimized admission, span negative control, scanner agreement, read-only replay" + } + ] +} diff --git a/research/p104-present-head-flag0-audit/independent.py b/research/p104-present-head-flag0-audit/independent.py new file mode 100644 index 0000000000..1db4014003 --- /dev/null +++ b/research/p104-present-head-flag0-audit/independent.py @@ -0,0 +1,343 @@ +#!/usr/bin/env python3 +"""Second flag-0 present-head scanner. It does not import verify.py. + +Events are first indexed per endpoint register. Literal frames are frozensets; +spans are explicit XOR closures (at most 512 labels), so membership, rank and +nesting are set operations rather than row reduction. The head decomposition +is found by exhaustive subset search. Admission uses need() under -O. +""" + +import hashlib +import json +from pathlib import Path + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +MARKER = ( + "PASS_P104_PRESENT_HEAD_FLAG0_INDEPENDENT flag=0 head=232 " + "preterminal_hosting=0 preterminal_span_hosting=0 drop_event=591 " + "arrive_event=3500 source_span_drops=0 head_free_target_updates=15/15 " + "no_new_kappa" +) +INPUTS = ( + "research/p104-joint-unit-flags/CERTIFICATE.json", + "research/p104-native-channel/inputs/LOWRANK-WITNESS.json", + "research/p104-endpoint-geometric-budget/geometry.py", +) +SOURCE_LINE = "sources = [paths[f'X{s}'] for s in range(104)]" +TARGET_LINE = "targets = [paths[f'Y{t}'] for t in range(104)]" +FLAG_INDEX = 0 +HIT_FLAGS = (0, 1, 9, 43) + + +def need(ok, message): + if not ok: + raise ValueError(message) + + +def pairs_unique(pairs): + value = {} + for key, item in pairs: + need(key not in value, "duplicate JSON key") + value[key] = item + return value + + +def read_json(path): + raw = Path(path).read_bytes() + need(len(raw) <= 2_000_000, "input exceeds 2 MB") + return json.loads(raw, object_pairs_hook=pairs_unique) + + +def frame_set(frame): + need(type(frame) is list, "frame") + values = [] + for entry in frame: + need(type(entry) is int and 0 < entry < 512, "frame entry") + values.append(entry) + folded = frozenset(values) + need(len(folded) == len(values), "duplicate frame vector") + return folded + + +def closure(frame): + """Explicit GF(2) span of an independent frame.""" + span = {0} + for vector in frame_set(frame): + span = span | {vector ^ old for old in span} + need(len(span) == 1 << len(frame), "dependent frame") + return frozenset(span) + + +def dimension(frame): + return len(closure(frame)).bit_length() - 1 + + +def subset_xor(vector, frame): + found = [] + for mask in range(1 << len(frame)): + acc = 0 + chosen = [] + for position, entry in enumerate(frame): + if mask & (1 << position): + acc ^= entry + chosen.append(entry) + if acc == vector: + found.append(sorted(chosen)) + need(len(found) <= 1, "non-unique decomposition") + return found[0] if found else None + + +def index_registers(program, wanted): + table = {name: [] for name in wanted} + joint = 0 + for index, event in enumerate(program): + need(type(event) is list and 1 <= len(event) <= 8, "event shape") + present = {item for item in event if type(item) is str and item in table} + if len(present) == len(table): + joint += 1 + for name in present: + table[name].append(index) + return table, joint + + +def frames_of(event, name): + if event[0] == "transport" and event[1] == name: + return [("before", event[2]), ("after", event[3])] + if event[0] == "add" and name in (event[1], event[2]): + return [("add", event[-1])] + return [] + + +def pin_sources(): + manifest = read_json(HERE / "SOURCES.json") + rows = [row for row in manifest["files"] if row["usage"] == "input"] + need(tuple(row["path"] for row in rows) == INPUTS, "input inventory") + pinned = {} + for row in rows: + raw = (ROOT / row["path"]).read_bytes() + need(hashlib.sha256(raw).hexdigest() == row["sha256"], "source hash: " + row["path"]) + pinned[row["path"]] = raw + return pinned + + +def evaluate(): + pinned = pin_sources() + geometry = pinned[ + "research/p104-endpoint-geometric-budget/geometry.py" + ].decode("utf-8") + need(SOURCE_LINE in geometry and TARGET_LINE in geometry, "geometry naming") + helpers = json.loads( + pinned["research/p104-joint-unit-flags/CERTIFICATE.json"], + object_pairs_hook=pairs_unique, + )["helpers"] + witness = json.loads( + pinned["research/p104-native-channel/inputs/LOWRANK-WITNESS.json"], + object_pairs_hook=pairs_unique, + ) + program = witness["program"] + need(len(helpers) == 208 and len(program) == 4058, "sizes") + hits = [ + index + for index, row in enumerate(helpers) + if row["basis"][0] in witness["final_frames"][f"Y{row['target']}"] + ] + need(hits == list(HIT_FLAGS), "hit-flag census drift") + need(FLAG_INDEX in hits, "flag 0 left the present-head class") + helper = helpers[FLAG_INDEX] + head = helper["basis"][0] + source = f"X{helper['source']}" + target = f"Y{helper['target']}" + table, joint = index_registers(program, (source, target)) + source_indices = table[source] + target_indices = table[target] + need(source_indices and target_indices, "endpoint silence") + + source_hits = [] + source_frames = 0 + source_span_frames = 0 + source_span_drops = [] + transports = [] + for index in source_indices: + event = program[index] + if event[0] == "transport" and event[1] == source: + transports.append(event) + for role, frame in frames_of(event, source): + literal = frame_set(frame) + source_frames += 1 + if head in closure(frame): + source_span_frames += 1 + else: + source_span_drops.append(index) + if head in literal: + source_hits.append( + { + "event": index, + "opcode": event[0], + "role": role, + "frame": sorted(literal), + } + ) + + target_hits = [] + target_span_hits = [] + target_pool = set() + updates = [] + head_free_updates = 0 + for index in target_indices: + event = program[index] + if event[0] == "transport" and event[1] == target: + transports.append(event) + if event[0] == "add" and event[1] == target: + updates.append(index) + if head not in closure(event[-1]): + head_free_updates += 1 + for role, frame in frames_of(event, target): + literal = frame_set(frame) + target_pool |= literal + if head in closure(frame): + target_span_hits.append((index, role)) + if head in literal: + target_hits.append( + { + "event": index, + "opcode": event[0], + "role": role, + "frame": sorted(literal), + } + ) + + drop = source_indices[0] + drop_event = program[drop] + need(drop_event[0] == "transport" and drop_event[1] == source, "first source op") + drop_before = sorted(frame_set(drop_event[2])) + drop_after = sorted(frame_set(drop_event[3])) + need(drop_before == [head], "drop before") + need(head not in drop_after, "drop after") + need(len(target_hits) == 1, "unexpected target head hosting count") + arrive = target_hits[0] + need(arrive["opcode"] == "transport" and arrive["role"] == "after", "arrive shape") + need(arrive["event"] == target_indices[-1], "arrive not terminal") + arrive_event = program[arrive["event"]] + arrive_before = sorted(frame_set(arrive_event[2])) + arrive_after = sorted(frame_set(arrive_event[3])) + need(head not in arrive_before and head in arrive_after, "arrive frames") + preterminal = [row for row in target_hits if row["event"] < arrive["event"]] + need(target_span_hits, "no span hosting on target") + span_open, span_role = target_span_hits[0] + span_preterminal = [row for row in target_span_hits if row[0] < arrive["event"]] + after_drop = any( + row["event"] > drop or (row["event"] == drop and row["role"] == "after") + for row in source_hits + ) + nested = all(closure(event[2]) <= closure(event[3]) for event in transports) + steps = all( + event[4] == dimension(event[3]) - dimension(event[2]) for event in transports + ) + source_initial = witness["initial_frames"][source] + source_final = witness["final_frames"][source] + target_initial = witness["initial_frames"][target] + target_final = witness["final_frames"][target] + finals_with_head = len( + [name for name, frame in witness["final_frames"].items() + if name.startswith("Y") and head in frame] + ) + receipt = { + "schema_version": 1, + "claim_id": "p104-present-head-flag0-audit", + "pinned_main": "6f100d4bb5083f8c35d96fd95a539811c62f245c", + "flag_index": FLAG_INDEX, + "source": helper["source"], + "target": helper["target"], + "basis_head": head, + "departure_choice": helper["departure_choice"], + "arrival_choice": helper["arrival_choice"], + "basis": helper["basis"], + "source_register": source, + "target_register": target, + "source_initial": source_initial, + "source_final": source_final, + "target_initial": target_initial, + "target_final": target_final, + "source_initial_is_basis_head": source_initial == [head], + "target_final_contains_basis_head": head in target_final, + "source_frame_restored": frame_set(source_initial) == frame_set(source_final), + "target_frame_restored": frame_set(target_initial) == frame_set(target_final), + "source_rank_initial": dimension(source_initial), + "source_rank_final": dimension(source_final), + "target_rank_initial": dimension(target_initial), + "target_rank_final": dimension(target_final), + "source_first_event": source_indices[0], + "source_last_event": source_indices[-1], + "target_first_event": target_indices[0], + "target_last_event": target_indices[-1], + "source_event_count": len(source_indices), + "target_event_count": len(target_indices), + "joint_source_target_events": joint, + "basis_head_drop_event": drop, + "basis_head_drop_before": drop_before, + "basis_head_drop_after": drop_after, + "basis_head_arrive_event": arrive["event"], + "basis_head_arrive_before": arrive_before, + "basis_head_arrive_after": arrive_after, + "hosting_gap_events": arrive["event"] - drop, + "source_annotations_containing_basis_head": len(source_hits), + "target_annotations_containing_basis_head": len(target_hits), + "target_preterminal_annotations_containing_basis_head": len(preterminal), + "source_head_annotations": source_hits, + "target_head_annotations": target_hits, + "target_annotated_vectors": sorted(target_pool), + "basis_head_in_any_target_annotation": head in target_pool, + "basis_head_in_source_after_drop": after_drop, + "drop_after_span_decomposition_of_head": subset_xor(head, drop_event[3]), + "drop_transport_span_nested": closure(drop_event[2]) <= closure(drop_event[3]), + "source_annotation_count": source_frames, + "source_annotations_span_hosting_basis_head": source_span_frames, + "source_span_drop_events": source_span_drops, + "target_span_first_hosting_event": span_open, + "target_span_first_hosting_role": span_role, + "target_preterminal_annotations_span_hosting_basis_head": len(span_preterminal), + "target_arrive_before_span": sorted(closure(arrive_event[2])), + "target_update_events": updates, + "target_updates_in_head_free_span": head_free_updates, + "target_last_update_event": updates[-1], + "target_events_after_span_cohost_open": len( + [index for index in target_indices if index > span_open] + ), + "source_events_after_span_cohost_open": [ + index for index in source_indices if index > span_open + ], + "endpoint_transport_count": len(transports), + "endpoint_transports_span_nested_upward": nested, + "endpoint_transport_rank_steps_match": steps, + "targets_whose_final_contains_basis_head_among_all": finals_with_head, + "hit_flags_from_census": list(HIT_FLAGS), + "flag_is_present_head_case": True, + "obstruction": ( + "published_channel_hosts_basis_head_on_matched_target_only_at_" + "terminal_transport_literally_and_in_span_after_every_target_update" + ), + "no_new_kappa": True, + "selected_kappa": "0.001672660197076918", + } + need(receipt["target_final_contains_basis_head"] is True, "left present-head class") + need(receipt["target_preterminal_annotations_containing_basis_head"] == 0, "preterminal") + need(receipt["target_preterminal_annotations_span_hosting_basis_head"] == 0, "span preterminal") + need(receipt["source_span_drop_events"] == [], "source lost head direction") + need(receipt["target_updates_in_head_free_span"] == len(updates), "head-hosting update") + need(receipt["target_events_after_span_cohost_open"] == 0, "target event after cohost") + need(receipt["basis_head_in_source_after_drop"] is False, "source relisted head") + need(receipt["joint_source_target_events"] == 0, "joint endpoint event") + need(nested and steps, "transport semantics") + return receipt + + +def main(): + observed = evaluate() + expected = read_json(HERE / "CERTIFICATE.json") + need(observed == expected, "certificate mismatch") + print(MARKER) + + +if __name__ == "__main__": + main() diff --git a/research/p104-present-head-flag0-audit/test_package.py b/research/p104-present-head-flag0-audit/test_package.py new file mode 100644 index 0000000000..f3514a9d3a --- /dev/null +++ b/research/p104-present-head-flag0-audit/test_package.py @@ -0,0 +1,224 @@ +#!/usr/bin/env python3 +"""Admission, corruption, span-control and scanner-agreement checks. No asserts.""" + +import copy +import hashlib +import json +import shutil +import subprocess +import sys +import tempfile +from pathlib import Path + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +sys.path.insert(0, str(HERE)) +import independent +import verify + +SLUG = "research/" + HERE.name + + +def need(ok, message): + if not ok: + raise ValueError(message) + + +def tree_digest(paths): + return { + str(path): hashlib.sha256(path.read_bytes()).hexdigest() for path in paths + } + + +def watched_files(): + files = [path for path in HERE.iterdir() if path.is_file()] + files.extend(ROOT / name for name in verify.INPUTS) + return sorted(files) + + +def test_duplicate_key(): + with tempfile.TemporaryDirectory() as tmp: + path = Path(tmp) / "dup.json" + path.write_text('{"a": 1, "a": 2}\n', encoding="utf-8") + for reader in (verify.read_json, independent.read_json): + try: + reader(path) + except ValueError as exc: + need(str(exc) == "duplicate JSON key", "duplicate message") + else: + need(False, "duplicate key accepted") + + +def stage_tree(tmp): + """Copy the package and its pinned inputs into a throwaway repository root.""" + root = Path(tmp) + for name in verify.INPUTS: + destination = root / name + destination.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(ROOT / name, destination) + package = root / SLUG + package.mkdir(parents=True) + for path in HERE.iterdir(): + if path.is_file() and path.suffix in (".py", ".json"): + shutil.copyfile(path, package / path.name) + return root, package + + +def run_optimized(script): + return subprocess.run( + [sys.executable, "-I", "-O", "-B", str(script)], + check=False, + capture_output=True, + text=True, + timeout=60, + ) + + +def expect_rejection(script, needle): + done = run_optimized(script) + need(done.returncode != 0, "corruption accepted: " + script.name) + need(needle in done.stderr, "wrong rejection for " + script.name + ": " + done.stderr[-200:]) + + +def test_temp_copy_corruption(): + before = tree_digest(watched_files()) + with tempfile.TemporaryDirectory() as tmp: + root, package = stage_tree(tmp) + for name in ("verify.py", "independent.py"): + done = run_optimized(package / name) + need(done.returncode == 0, "clean temp copy failed: " + done.stderr[-200:]) + cert = package / "CERTIFICATE.json" + clean = cert.read_bytes() + mutations = ( + ("basis_head_drop_event", 0), + ("target_span_first_hosting_event", 3369), + ("source_span_drop_events", [591]), + ("target_updates_in_head_free_span", 14), + ) + for key, value in mutations: + blob = json.loads(clean) + blob[key] = value + cert.write_text(json.dumps(blob, indent=2) + "\n", encoding="utf-8") + expect_rejection(package / "verify.py", "certificate mismatch") + expect_rejection(package / "independent.py", "certificate mismatch") + text = clean.decode("utf-8").replace( + '"schema_version": 1,', '"schema_version": 1,\n "schema_version": 1,', 1 + ) + cert.write_text(text, encoding="utf-8") + expect_rejection(package / "verify.py", "duplicate JSON key") + expect_rejection(package / "independent.py", "duplicate JSON key") + cert.write_bytes(clean) + witness = root / verify.INPUTS[1] + raw = bytearray(witness.read_bytes()) + position = raw.index(b"232") + raw[position : position + 3] = b"233" + witness.write_bytes(bytes(raw)) + expect_rejection(package / "verify.py", "source hash") + expect_rejection(package / "independent.py", "source hash") + need(tree_digest(watched_files()) == before, "live files mutated by corruption test") + + +def test_optimized_admission(): + script = ( + "import sys\n" + f"sys.path.insert(0, {str(HERE)!r})\n" + "import verify, independent\n" + "verify.need(__debug__ is False, 'optimization off')\n" + "for module in (verify, independent):\n" + " try:\n" + " module.need(False, 'admission')\n" + " except ValueError as exc:\n" + " if str(exc) != 'admission':\n" + " raise SystemExit('wrong admission')\n" + " else:\n" + " raise SystemExit('admission skipped')\n" + "print('PASS_OPTIMIZED_ADMISSION')\n" + ) + done = subprocess.run( + [sys.executable, "-O", "-I", "-B", "-c", script], + check=False, + capture_output=True, + text=True, + timeout=60, + ) + need(done.returncode == 0, "optimized admission failed: " + done.stderr) + need("PASS_OPTIMIZED_ADMISSION" in done.stdout, "optimized marker") + + +def test_sample_span_geometry(): + drop = ["transport", "X0", [232], [8, 32, 64, 128, 256], 4] + frames = verify.annotated_frames(drop, "X0") + need(frames[0] == ("before", [232]), "sample before") + need(232 not in frames[1][1], "sample literal drop") + need(verify.span_combination(232, drop[3]) == [8, 32, 64, 128], "primary decomposition") + need(independent.subset_xor(232, drop[3]) == [8, 32, 64, 128], "subset decomposition") + need(8 ^ 32 ^ 64 ^ 128 == 232, "head arithmetic") + need(verify.span_contains(drop[3], drop[2]), "primary nesting") + need(independent.closure(drop[2]) <= independent.closure(drop[3]), "closure nesting") + need(verify.rank(drop[3]) - verify.rank(drop[2]) == drop[4], "rank step") + late = [95, 502, 16, 32, 2] + need(not verify.in_span(232, late), "primary late span") + need(232 not in independent.closure(late), "closure late span") + for bad in ([232, 232], [8, 32, 40]): + for check in (verify.rank, independent.dimension): + try: + check(bad) + except ValueError: + pass + else: + need(False, "dependent frame accepted") + + +def test_span_negative_control(): + pinned = verify.pin_sources() + helpers = json.loads(pinned[verify.INPUTS[0]])["helpers"] + witness = json.loads(pinned[verify.INPUTS[1]]) + clean = verify.build_receipt(witness, helpers) + need(clean["target_updates_in_head_free_span"] == 15, "clean update count") + mutated = copy.deepcopy(witness) + program = mutated["program"] + need( + program[3368][:2] == ["transport", "Y34"] + and program[3368][3] == [95, 502, 16, 32, 2], + "anchor 3368", + ) + need(program[3369][:3] == ["add", "Y34", "D23"], "anchor 3369") + need( + program[3500][:2] == ["transport", "Y34"] + and program[3500][2] == [95, 502, 16, 32, 2], + "anchor 3500", + ) + hosted = [95, 232 ^ 95] + program[3368][3] = list(hosted) + program[3369][-1] = list(hosted) + program[3500][2] = list(hosted) + shifted = verify.build_receipt(mutated, helpers) + need(shifted["target_preterminal_annotations_containing_basis_head"] == 0, "literal blind") + need(shifted["target_preterminal_annotations_span_hosting_basis_head"] == 2, "span sees head") + need(232 in shifted["target_arrive_before_span"], "arrive before now hosts head") + need(shifted["target_span_first_hosting_event"] == 3368, "span arrive moved") + need(shifted["target_updates_in_head_free_span"] == 14, "update now hosts head") + need(shifted != clean, "control did not change receipt") + + +def test_scanners_agree(): + before = tree_digest(watched_files()) + left = verify.evaluate() + right = independent.evaluate() + need(left == right, "scanner disagreement") + verify.admit(left, verify.read_json(HERE / "CERTIFICATE.json")) + need(tree_digest(watched_files()) == before, "package or input files mutated") + + +def main(): + test_duplicate_key() + test_temp_copy_corruption() + test_optimized_admission() + test_sample_span_geometry() + test_span_negative_control() + test_scanners_agree() + print("PASS_P104_PRESENT_HEAD_FLAG0_TESTS groups=6") + + +if __name__ == "__main__": + main() diff --git a/research/p104-present-head-flag0-audit/verify.py b/research/p104-present-head-flag0-audit/verify.py new file mode 100644 index 0000000000..4187dbba00 --- /dev/null +++ b/research/p104-present-head-flag0-audit/verify.py @@ -0,0 +1,415 @@ +#!/usr/bin/env python3 +"""Read-only present-head dirty-restoration audit for matched flag 0. + +Flag 0 is one of the four published flags whose target final contains the +basis head. Frames are binary subspaces of the nine-dimensional label space, +so hosting is checked both as literal frame membership and as membership in +the GF(2) span of the frame. Admission uses need() and remains active under +python -O. This module does not import independent.py or any predecessor +verifier. +""" + +import hashlib +import json +from pathlib import Path + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +MARKER = ( + "PASS_P104_PRESENT_HEAD_FLAG0 flag=0 head=232 preterminal_hosting=0 " + "preterminal_span_hosting=0 drop_event=591 arrive_event=3500 " + "source_span_drops=0 head_free_target_updates=15/15 no_new_kappa" +) +INPUTS = ( + "research/p104-joint-unit-flags/CERTIFICATE.json", + "research/p104-native-channel/inputs/LOWRANK-WITNESS.json", + "research/p104-endpoint-geometric-budget/geometry.py", +) +SOURCE_LINE = "sources = [paths[f'X{s}'] for s in range(104)]" +TARGET_LINE = "targets = [paths[f'Y{t}'] for t in range(104)]" +FLAG_INDEX = 0 +HIT_FLAGS = (0, 1, 9, 43) +LABEL_BITS = 9 + + +def need(ok, message): + if not ok: + raise ValueError(message) + + +def pairs_unique(pairs): + value = {} + for key, item in pairs: + need(key not in value, "duplicate JSON key") + value[key] = item + return value + + +def read_json(path): + raw = Path(path).read_bytes() + need(len(raw) <= 2_000_000, "input exceeds 2 MB") + return json.loads(raw, object_pairs_hook=pairs_unique) + + +def register_name(item): + if type(item) is not str or len(item) < 2 or item[0] not in "XY": + return None + if not item[1:].isdigit() or int(item[1:]) > 103: + return None + return item + + +def annotated_frames(event, name): + frames = [] + if event[0] == "transport" and event[1] == name: + need(type(event[2]) is list and type(event[3]) is list, "transport frames") + frames.append(("before", list(event[2]))) + frames.append(("after", list(event[3]))) + elif event[0] == "add" and name in (event[1], event[2]): + need(type(event[-1]) is list, "add frame") + frames.append(("add", list(event[-1]))) + return frames + + +def echelon(frame): + """Pivot-indexed GF(2) row echelon form; each row tracks its frame subset.""" + rows = {} + for vector in frame: + need(type(vector) is int and 0 < vector < (1 << LABEL_BITS), "label range") + value = vector + combo = 1 << frame.index(vector) + while value: + pivot = value.bit_length() - 1 + if pivot not in rows: + rows[pivot] = (value, combo) + break + value ^= rows[pivot][0] + combo ^= rows[pivot][1] + need(value != 0, "dependent frame vector") + return rows + + +def span_combination(vector, frame): + """Return the frame subset whose XOR is vector, or None if outside the span.""" + rows = echelon(frame) + value = vector + combo = 0 + while value: + pivot = value.bit_length() - 1 + if pivot not in rows: + return None + value ^= rows[pivot][0] + combo ^= rows[pivot][1] + return sorted(frame[i] for i in range(len(frame)) if combo >> i & 1) + + +def in_span(vector, frame): + return span_combination(vector, frame) is not None + + +def rank(frame): + return len(echelon(frame)) + + +def span_elements(frame): + rows = [row for row, _ in echelon(frame).values()] + out = [] + for mask in range(1 << len(rows)): + value = 0 + for i, row in enumerate(rows): + if mask >> i & 1: + value ^= row + out.append(value) + return sorted(out) + + +def span_contains(big, small): + return all(in_span(vector, big) for vector in small) + + +def pin_sources(root=ROOT, here=HERE): + manifest = read_json(here / "SOURCES.json") + rows = manifest["files"] + inputs = [row for row in rows if row["usage"] == "input"] + need(tuple(row["path"] for row in inputs) == INPUTS, "input inventory") + pinned = {} + for row in inputs: + path = root / row["path"] + raw = path.read_bytes() + need(len(raw) <= 2_000_000, "source size") + digest = hashlib.sha256(raw).hexdigest() + need(digest == row["sha256"], "source hash: " + row["path"]) + pinned[row["path"]] = raw + return pinned + + +def hit_flag_indices(helpers, witness): + hits = [] + for index, row in enumerate(helpers): + head = row["basis"][0] + target = f"Y{row['target']}" + if head in witness["final_frames"][target]: + hits.append(index) + return hits + + +def build_receipt(witness, helpers): + need(len(helpers) == 208, "flag count") + need(len(witness["program"]) == 4058, "word length") + hits = hit_flag_indices(helpers, witness) + need(hits == list(HIT_FLAGS), "hit-flag census drift") + need(FLAG_INDEX in hits, "flag 0 left the present-head class") + helper = helpers[FLAG_INDEX] + head = helper["basis"][0] + source = f"X{helper['source']}" + target = f"Y{helper['target']}" + program = witness["program"] + source_events = [] + target_events = [] + joint = 0 + source_head = [] + target_head = [] + target_vectors = set() + source_frames = 0 + source_span_frames = 0 + source_span_drops = [] + target_span_head = [] + target_updates = [] + target_updates_head_free = [] + transports = [] + for index, event in enumerate(program): + need(type(event) is list and 1 <= len(event) <= 8, "event shape") + names = [] + for item in event: + name = register_name(item) + if name is not None: + names.append(name) + if source in names and target in names: + joint += 1 + if source in names: + source_events.append(index) + for role, frame in annotated_frames(event, source): + source_frames += 1 + if in_span(head, frame): + source_span_frames += 1 + else: + source_span_drops.append(index) + if head in frame: + source_head.append( + { + "event": index, + "opcode": event[0], + "role": role, + "frame": sorted(frame), + } + ) + if event[0] == "transport" and event[1] == source: + transports.append(event) + if target in names: + target_events.append(index) + for role, frame in annotated_frames(event, target): + target_vectors.update(frame) + if in_span(head, frame): + target_span_head.append({"event": index, "role": role}) + if head in frame: + target_head.append( + { + "event": index, + "opcode": event[0], + "role": role, + "frame": sorted(frame), + } + ) + if event[0] == "add" and event[1] == target: + target_updates.append(index) + if not in_span(head, event[-1]): + target_updates_head_free.append(index) + if event[0] == "transport" and event[1] == target: + transports.append(event) + need(source_events and target_events, "endpoint silence") + drop = source_events[0] + drop_event = program[drop] + need(drop_event[0] == "transport" and drop_event[1] == source, "first source op") + need(drop_event[2] == [head], "drop before-frame") + need(head not in drop_event[3], "drop after-frame still lists head") + after_drop = False + for row in source_head: + if row["event"] > drop: + after_drop = True + if row["event"] == drop and row["role"] == "after": + after_drop = True + need(len(target_head) == 1, "unexpected target head hosting count") + arrive = target_head[0] + need(arrive["opcode"] == "transport", "arrive opcode") + need(arrive["role"] == "after", "arrive role") + need(arrive["event"] == target_events[-1], "arrive is not terminal target event") + preterminal = [row for row in target_head if row["event"] < arrive["event"]] + need(preterminal == [], "preterminal target hosting") + arrive_event = program[arrive["event"]] + need(arrive_event[0] == "transport" and arrive_event[1] == target, "arrive transport") + need(head not in arrive_event[2], "arrive before-frame already lists head") + need(head in arrive_event[3], "arrive after-frame missing head") + hosting_gap = arrive["event"] - drop + need(hosting_gap > 0, "arrive precedes drop") + need(target_span_head, "target never span-hosts head") + span_arrive = target_span_head[0] + span_preterminal = [ + row for row in target_span_head if row["event"] < arrive["event"] + ] + nested = all(span_contains(event[3], event[2]) for event in transports) + rank_steps = all( + event[4] == rank(event[3]) - rank(event[2]) for event in transports + ) + decomposition = span_combination(head, list(drop_event[3])) + finals_with_head = sum( + 1 for index in range(104) if head in witness["final_frames"][f"Y{index}"] + ) + source_initial = witness["initial_frames"][source] + source_final = witness["final_frames"][source] + target_initial = witness["initial_frames"][target] + target_final = witness["final_frames"][target] + cohost_open = span_arrive["event"] + return { + "schema_version": 1, + "claim_id": "p104-present-head-flag0-audit", + "pinned_main": "6f100d4bb5083f8c35d96fd95a539811c62f245c", + "flag_index": FLAG_INDEX, + "source": helper["source"], + "target": helper["target"], + "basis_head": head, + "departure_choice": helper["departure_choice"], + "arrival_choice": helper["arrival_choice"], + "basis": helper["basis"], + "source_register": source, + "target_register": target, + "source_initial": source_initial, + "source_final": source_final, + "target_initial": target_initial, + "target_final": target_final, + "source_initial_is_basis_head": source_initial == [head], + "target_final_contains_basis_head": head in target_final, + "source_frame_restored": sorted(source_initial) == sorted(source_final), + "target_frame_restored": sorted(target_initial) == sorted(target_final), + "source_rank_initial": rank(source_initial), + "source_rank_final": rank(source_final), + "target_rank_initial": rank(target_initial), + "target_rank_final": rank(target_final), + "source_first_event": source_events[0], + "source_last_event": source_events[-1], + "target_first_event": target_events[0], + "target_last_event": target_events[-1], + "source_event_count": len(source_events), + "target_event_count": len(target_events), + "joint_source_target_events": joint, + "basis_head_drop_event": drop, + "basis_head_drop_before": sorted(drop_event[2]), + "basis_head_drop_after": sorted(drop_event[3]), + "basis_head_arrive_event": arrive["event"], + "basis_head_arrive_before": sorted(arrive_event[2]), + "basis_head_arrive_after": sorted(arrive_event[3]), + "hosting_gap_events": hosting_gap, + "source_annotations_containing_basis_head": len(source_head), + "target_annotations_containing_basis_head": len(target_head), + "target_preterminal_annotations_containing_basis_head": len(preterminal), + "source_head_annotations": source_head, + "target_head_annotations": target_head, + "target_annotated_vectors": sorted(target_vectors), + "basis_head_in_any_target_annotation": head in target_vectors, + "basis_head_in_source_after_drop": after_drop, + "drop_after_span_decomposition_of_head": decomposition, + "drop_transport_span_nested": span_contains(drop_event[3], drop_event[2]), + "source_annotation_count": source_frames, + "source_annotations_span_hosting_basis_head": source_span_frames, + "source_span_drop_events": source_span_drops, + "target_span_first_hosting_event": span_arrive["event"], + "target_span_first_hosting_role": span_arrive["role"], + "target_preterminal_annotations_span_hosting_basis_head": len(span_preterminal), + "target_arrive_before_span": span_elements(list(arrive_event[2])), + "target_update_events": target_updates, + "target_updates_in_head_free_span": len(target_updates_head_free), + "target_last_update_event": target_updates[-1], + "target_events_after_span_cohost_open": sum( + 1 for index in target_events if index > cohost_open + ), + "source_events_after_span_cohost_open": [ + index for index in source_events if index > cohost_open + ], + "endpoint_transport_count": len(transports), + "endpoint_transports_span_nested_upward": nested, + "endpoint_transport_rank_steps_match": rank_steps, + "targets_whose_final_contains_basis_head_among_all": finals_with_head, + "hit_flags_from_census": list(HIT_FLAGS), + "flag_is_present_head_case": True, + "obstruction": ( + "published_channel_hosts_basis_head_on_matched_target_only_at_" + "terminal_transport_literally_and_in_span_after_every_target_update" + ), + "no_new_kappa": True, + "selected_kappa": "0.001672660197076918", + } + + +def evaluate(root=ROOT, here=HERE): + pinned = pin_sources(root, here) + geometry = pinned[ + "research/p104-endpoint-geometric-budget/geometry.py" + ].decode("utf-8") + need(SOURCE_LINE in geometry, "source naming left the geometry") + need(TARGET_LINE in geometry, "target naming left the geometry") + certificate = json.loads( + pinned["research/p104-joint-unit-flags/CERTIFICATE.json"], + object_pairs_hook=pairs_unique, + ) + witness = json.loads( + pinned["research/p104-native-channel/inputs/LOWRANK-WITNESS.json"], + object_pairs_hook=pairs_unique, + ) + receipt = build_receipt(witness, certificate["helpers"]) + need(receipt["target_final_contains_basis_head"] is True, "left present-head class") + need(receipt["target_preterminal_annotations_containing_basis_head"] == 0, "preterminal") + need(receipt["target_annotations_containing_basis_head"] == 1, "target hosting count") + need(receipt["basis_head_drop_event"] == 591, "drop event drift") + need(receipt["basis_head_arrive_event"] == 3500, "arrive event drift") + need(receipt["hosting_gap_events"] == 2909, "gap drift") + need(receipt["basis_head_in_source_after_drop"] is False, "source relisted head") + need(receipt["joint_source_target_events"] == 0, "joint endpoint event") + need(receipt["source_frame_restored"] is False, "source restored") + need(receipt["target_frame_restored"] is False, "target restored") + need(receipt["source_span_drop_events"] == [], "source lost head direction") + need( + receipt["source_annotations_span_hosting_basis_head"] + == receipt["source_annotation_count"], + "source span hosting gap", + ) + need(receipt["target_span_first_hosting_event"] == 3500, "span arrive drift") + need(receipt["target_span_first_hosting_role"] == "after", "span arrive role") + need( + receipt["target_preterminal_annotations_span_hosting_basis_head"] == 0, + "preterminal span hosting", + ) + need( + receipt["target_updates_in_head_free_span"] + == len(receipt["target_update_events"]) + == 15, + "target update in head-hosting chart", + ) + need(receipt["target_events_after_span_cohost_open"] == 0, "target event after cohost") + need(receipt["endpoint_transports_span_nested_upward"] is True, "non-nested transport") + need(receipt["endpoint_transport_rank_steps_match"] is True, "rank step mismatch") + need(receipt["no_new_kappa"] is True, "kappa claim crept in") + return receipt + + +def admit(observed, expected): + need(observed == expected, "certificate mismatch") + + +def main(): + observed = evaluate() + expected = read_json(HERE / "CERTIFICATE.json") + admit(observed, expected) + print(MARKER) + + +if __name__ == "__main__": + main() From 7b2111c77fb3ff1ae976dd693b91866160a2d3f3 Mon Sep 17 00:00:00 2001 From: Wentao Li Date: Sun, 18 Oct 2026 13:26:38 +0000 Subject: [PATCH 2/9] Record tip SHA and PASS lines for present-head flag-0 audit handoff Prepared by Wentao Li with substantial AI assistance. --- .../MASTER-HANDOFF.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md b/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md index 5925bb26bc..5daca2d1b5 100644 --- a/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md +++ b/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md @@ -94,3 +94,17 @@ skeptical review. Author Wentao Li ``. Neutral disclosure: substantial AI assistance. Tip commit message must not contain `Co-authored-by: Victor Li`. + +## Verified PASS lines (this tip's parent content; final tip records them) + +Replay on tip (content commit before this handoff rewrite): + + + +Attribution: Research: present-head flag-0 span audit — Y34 hosts head 232 only at terminal transport (no new kappa) + +Pin matched flag 0 (X0→Y34, head 232): all 15 Y34 updates are head-free in +span; source keeps 232 after the literal drop at 591; co-hosted dirty +restoration is unavailable on the published channel ahead of the I-G/2 tail. + +Prepared by Wentao Li with substantial AI assistance. has no . Author Wentao Li . From ab4aafae19b8f670473af0f6f37fc445d313214e Mon Sep 17 00:00:00 2001 From: Wentao Li Date: Sun, 18 Oct 2026 13:26:38 +0000 Subject: [PATCH 3/9] Finalize MASTER-HANDOFF packaging tip SHA for flag-0 present-head audit Prepared by Wentao Li with substantial AI assistance. --- research/p104-present-head-flag0-audit/MASTER-HANDOFF.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md b/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md index 5daca2d1b5..b7f701c86a 100644 --- a/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md +++ b/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md @@ -95,7 +95,7 @@ skeptical review. Author Wentao Li ``. Neutral disclosure: substantial AI assistance. Tip commit message must not contain `Co-authored-by: Victor Li`. -## Verified PASS lines (this tip's parent content; final tip records them) +## Verified PASS lines (packaging tip `7b2111c77fb3ff1ae976dd693b91866160a2d3f3`) Replay on tip (content commit before this handoff rewrite): From 0585e179093808211ebaada24d802652923c6a63 Mon Sep 17 00:00:00 2001 From: Wentao Li Date: Sun, 18 Oct 2026 13:27:42 +0000 Subject: [PATCH 4/9] Repair MASTER-HANDOFF with tip SHA and verified PASS markers Prepared by Wentao Li with substantial AI assistance. --- .../MASTER-HANDOFF.md | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md b/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md index b7f701c86a..5616df2c2a 100644 --- a/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md +++ b/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md @@ -3,8 +3,8 @@ ## Candidate - Branch: `cursor/p104-present-head-flag0-audit-60b9` (VictorLiwentao fork) -- Content tip: fill after commit (`git rev-parse HEAD`) -- Packaging tip: same tip once `MASTER-HANDOFF.md` carries the committed SHA +- Content tip: `ebcc53a61625a0fea7f2b63dc6a4f124161513a9` (scientific package commit) +- Packaging tip: fill with the commit that carries this finalized handoff - Package: `research/p104-present-head-flag0-audit/` - Base: CrocSwap main `6f100d4bb5083f8c35d96fd95a539811c62f245c` - Card: `p104-side-correction` (refined), priority revision 6 @@ -95,16 +95,17 @@ skeptical review. Author Wentao Li ``. Neutral disclosure: substantial AI assistance. Tip commit message must not contain `Co-authored-by: Victor Li`. -## Verified PASS lines (packaging tip `7b2111c77fb3ff1ae976dd693b91866160a2d3f3`) +## Verified PASS lines -Replay on tip (content commit before this handoff rewrite): +Replayed on content tip `ebcc53a61625a0fea7f2b63dc6a4f124161513a9`: +```text +PASS_P104_PRESENT_HEAD_FLAG0 flag=0 head=232 preterminal_hosting=0 preterminal_span_hosting=0 drop_event=591 arrive_event=3500 source_span_drops=0 head_free_target_updates=15/15 no_new_kappa +PASS_P104_PRESENT_HEAD_FLAG0_INDEPENDENT flag=0 head=232 preterminal_hosting=0 preterminal_span_hosting=0 drop_event=591 arrive_event=3500 source_span_drops=0 head_free_target_updates=15/15 no_new_kappa +PASS_P104_PRESENT_HEAD_FLAG0_TESTS groups=6 +PASS_REGISTERED_RESEARCH_PACKAGE research/p104-present-head-flag0-audit outcome=completed +PASS_PACKAGE_METADATA_AND_PINS (not a mathematical acceptance check) +``` - -Attribution: Research: present-head flag-0 span audit — Y34 hosts head 232 only at terminal transport (no new kappa) - -Pin matched flag 0 (X0→Y34, head 232): all 15 Y34 updates are head-free in -span; source keeps 232 after the literal drop at 591; co-hosted dirty -restoration is unavailable on the published channel ahead of the I-G/2 tail. - -Prepared by Wentao Li with substantial AI assistance. has no . Author Wentao Li . +`git log -1 --format=%B` on every tip commit of this branch has no +`Co-authored-by: Victor Li`. Author Wentao Li ``. From 2e9e8a12781a568983bb1bf1c863b0eb59fccd47 Mon Sep 17 00:00:00 2001 From: Wentao Li Date: Sun, 18 Oct 2026 13:27:42 +0000 Subject: [PATCH 5/9] Set packaging tip SHA in present-head flag-0 MASTER-HANDOFF Prepared by Wentao Li with substantial AI assistance. --- research/p104-present-head-flag0-audit/MASTER-HANDOFF.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md b/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md index 5616df2c2a..e2bc8aeb52 100644 --- a/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md +++ b/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md @@ -4,7 +4,7 @@ - Branch: `cursor/p104-present-head-flag0-audit-60b9` (VictorLiwentao fork) - Content tip: `ebcc53a61625a0fea7f2b63dc6a4f124161513a9` (scientific package commit) -- Packaging tip: fill with the commit that carries this finalized handoff +- Packaging tip: branch HEAD `cursor/p104-present-head-flag0-audit-60b9` (read `git rev-parse origin/cursor/p104-present-head-flag0-audit-60b9` after push) - Package: `research/p104-present-head-flag0-audit/` - Base: CrocSwap main `6f100d4bb5083f8c35d96fd95a539811c62f245c` - Card: `p104-side-correction` (refined), priority revision 6 From 28622fe29d5d826e9ba7d95d3c59529e27f77c64 Mon Sep 17 00:00:00 2001 From: Wentao Li Date: Sun, 18 Oct 2026 13:27:43 +0000 Subject: [PATCH 6/9] Record verified PASS lines in present-head flag-0 MASTER-HANDOFF Prepared by Wentao Li with substantial AI assistance. --- research/p104-present-head-flag0-audit/MASTER-HANDOFF.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md b/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md index e2bc8aeb52..16dc5cce39 100644 --- a/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md +++ b/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md @@ -4,7 +4,7 @@ - Branch: `cursor/p104-present-head-flag0-audit-60b9` (VictorLiwentao fork) - Content tip: `ebcc53a61625a0fea7f2b63dc6a4f124161513a9` (scientific package commit) -- Packaging tip: branch HEAD `cursor/p104-present-head-flag0-audit-60b9` (read `git rev-parse origin/cursor/p104-present-head-flag0-audit-60b9` after push) +- Packaging tip: the tip of `origin/cursor/p104-present-head-flag0-audit-60b9` (read with `git rev-parse`) - Package: `research/p104-present-head-flag0-audit/` - Base: CrocSwap main `6f100d4bb5083f8c35d96fd95a539811c62f245c` - Card: `p104-side-correction` (refined), priority revision 6 @@ -109,3 +109,4 @@ PASS_PACKAGE_METADATA_AND_PINS (not a mathematical acceptance check) `git log -1 --format=%B` on every tip commit of this branch has no `Co-authored-by: Victor Li`. Author Wentao Li ``. + From fc89371532a3f1dcd0cc85391ceed8657f1c73a4 Mon Sep 17 00:00:00 2001 From: Wentao Li Date: Sun, 18 Oct 2026 13:28:08 +0000 Subject: [PATCH 7/9] Pin packaging tip SHA in present-head flag-0 MASTER-HANDOFF Prepared by Wentao Li with substantial AI assistance. --- research/p104-present-head-flag0-audit/MASTER-HANDOFF.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md b/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md index 16dc5cce39..08365b80ab 100644 --- a/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md +++ b/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md @@ -4,7 +4,7 @@ - Branch: `cursor/p104-present-head-flag0-audit-60b9` (VictorLiwentao fork) - Content tip: `ebcc53a61625a0fea7f2b63dc6a4f124161513a9` (scientific package commit) -- Packaging tip: the tip of `origin/cursor/p104-present-head-flag0-audit-60b9` (read with `git rev-parse`) +- Packaging tip: `28622fe29d5d826e9ba7d95d3c59529e27f77c64` (this branch tip at publication; content tip above) - Package: `research/p104-present-head-flag0-audit/` - Base: CrocSwap main `6f100d4bb5083f8c35d96fd95a539811c62f245c` - Card: `p104-side-correction` (refined), priority revision 6 From ccbd8e3b5f54226345d734f213efa5bc4f924d08 Mon Sep 17 00:00:00 2001 From: Wentao Li Date: Sun, 18 Oct 2026 13:28:18 +0000 Subject: [PATCH 8/9] Clarify packaging tip vs branch HEAD in flag-0 MASTER-HANDOFF Prepared by Wentao Li with substantial AI assistance. --- research/p104-present-head-flag0-audit/MASTER-HANDOFF.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md b/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md index 08365b80ab..d9ad045178 100644 --- a/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md +++ b/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md @@ -4,7 +4,7 @@ - Branch: `cursor/p104-present-head-flag0-audit-60b9` (VictorLiwentao fork) - Content tip: `ebcc53a61625a0fea7f2b63dc6a4f124161513a9` (scientific package commit) -- Packaging tip: `28622fe29d5d826e9ba7d95d3c59529e27f77c64` (this branch tip at publication; content tip above) +- Packaging tip: `28622fe29d5d826e9ba7d95d3c59529e27f77c64` (PASS-lines handoff); branch HEAD is the child pin commit - Package: `research/p104-present-head-flag0-audit/` - Base: CrocSwap main `6f100d4bb5083f8c35d96fd95a539811c62f245c` - Card: `p104-side-correction` (refined), priority revision 6 From 84288150fcaa8e3fecb128ef1feeb8ac1c63ccc6 Mon Sep 17 00:00:00 2001 From: Wentao Li Date: Sun, 18 Oct 2026 01:09:49 +0000 Subject: [PATCH 9/9] Clarify branch tip pointer in flag-0 MASTER-HANDOFF Replace the stale packaging tip SHA with git rev-parse HEAD guidance. --- research/p104-present-head-flag0-audit/MASTER-HANDOFF.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md b/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md index d9ad045178..8bd45bf5cf 100644 --- a/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md +++ b/research/p104-present-head-flag0-audit/MASTER-HANDOFF.md @@ -4,7 +4,7 @@ - Branch: `cursor/p104-present-head-flag0-audit-60b9` (VictorLiwentao fork) - Content tip: `ebcc53a61625a0fea7f2b63dc6a4f124161513a9` (scientific package commit) -- Packaging tip: `28622fe29d5d826e9ba7d95d3c59529e27f77c64` (PASS-lines handoff); branch HEAD is the child pin commit +- Branch tip: this commit on `cursor/p104-present-head-flag0-audit-60b9` (`git rev-parse HEAD`) - Package: `research/p104-present-head-flag0-audit/` - Base: CrocSwap main `6f100d4bb5083f8c35d96fd95a539811c62f245c` - Card: `p104-side-correction` (refined), priority revision 6