Skip to content

Tooling: exact sparse phase recipes reproduce the three frontier1042 phases pins, 12x on a shared host (no new kappa) - #1646

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
JosieElliston:research/frontier1042-phase-fastpath
Oct 14, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
JosieElliston:research/frontier1042-phase-fastpath

Conversation

@JosieElliston

Copy link
Copy Markdown
Contributor

Tooling (verification engineering). No new κ. No pinned file changes, and no check is weakened.

What

A cold make frontier1094-verify runs verify_frontier1042.py as its baseline1042-cold stage. That replay calls the pinned serial phases_full.py three times, in the cells, chain and slots stages. In the maintainer's recorded run these three steps take 469 s of 1162 s (199.4 + 134.4 + 135.3). #1151 parallelised the five layer-end-control steps and states that it does not re-measure these three.

Two merged exact fast paths already exist: Ali Romman's sparse compiler (#1029, research/selected-replay-fastpath/) and thakrarsagar's parallel runner (#1041, research/phase-recipes-parallel/). Both were measured only on the PR942 U8 word. research/frontier1042-phase-fastpath/ checks them on the three k8 words of the selected chain.

Result

The three canonical words come from research/community-frontier1042-audit/selected-replay.tar.gz. Their decompressed digests equal the canonical_sha256 in LEAVER-PINS-k8, CHAIN-PINS-k8 and SLOT-PINS-k8. For each word:

  • Recipes. selected-replay-fastpath/run.py --engine sparse writes a CLIFFORD-RECIPES.json that is byte-identical to the archived maintainer recipes. Its digest is the pinned clifford_recipes_sha256: cells aab63b0a…, chain e3bfdfa2…, slots d0768f21….
  • Review. Every CLIFFORD-REVIEW.json field except seconds equals the archived review.
  • Other engines. The dense PR662 evaluator and phases_parallel.py --engine dense662 reproduce the same bytes.

Same-host timings, macOS arm64, 10 cores, Python 3.14.7. The host was shared, with load average 10–29. The receipt is BENCHMARK-macos-arm64.json.

Command cells chain slots Total wall (CPU)
maintainer recording, pinned serial (other host) 199.4 134.4 135.3 469.1
pinned serial phases_full.py via run_portable.py 80.3 82.4 88.2 250.8 (250)
run.py --engine dense (PR662) 11.7 14.2 13.8 39.8 (39)
run.py --engine sparse (PR1029) 7.9 7.8 5.0 20.7 (19)
phases_parallel.py --jobs 10 --engine dense662 (PR1041) 2.8 2.9 3.1 8.8 (70)

All times are in seconds. On this host the sparse compiler is 12× faster than the pinned serial step in wall time, and uses one core. The parallel dense runner is 29× faster but uses about 10 cores.

Controls

verify.py runs two controls on a corrupted cells word. Neither may reproduce the pin.

  • C1. One one-dimensional frame is changed to a different line. It must be rejected by an AssertionError, with no recipes written.
  • C2. One edge is redirected to a frame of a different dimension. It must compile, but to different recipes.

Both behaviours are asserted exactly.

A bit flip inside a full-rank frame keeps the span, so it is not a corruption. My first draft control did this and was replaced. -O is refused. #1029's package keeps its own controls, proof and gate tests, and this PR does not repeat them.

Wiring (maintainers' call, not done here)

Later stages consume these outputs. verify_slots.py asserts both recipe digests, and verify_t16.py copies both CLIFFORD files forward and binds them.

  • cells. reproduce_leaver.py --skip-phases works with an external run.py call and pin assertion.
  • chain. reproduce_leaver_chain.py --skip-phases fails: it ends with assert got == pins over the whole CHAIN-PINS dictionary.
  • slots. verify_slots.py has no switch.
  • The T16 provider binder asserts the review's status, digests, global-phase flag and adapter count. The fast-path review matches on all of them, and verify.py checks this.
  • All these scripts are manifest-pinned. The serial path stays the reference.

Reproduce

python3 -B research/frontier1042-phase-fastpath/verify.py              # ~20 s; PASS_FRONTIER1042_PHASE_FASTPATH
python3 scripts/research_package.py --package research/frontier1042-phase-fastpath --check-only
python3 -B research/frontier1042-phase-fastpath/bench.py NEW_DIR sparse,dense,par-dense662,pinned   # ~6 min

The package uses only the standard library. verify.py passed on Python 3.10, 3.12 and 3.14, and the registered package check passes.

Scope and limits

  • The recipes are compiled from the archived words, which the canonical pins bind. A cold rebuild that reproduces those pins feeds the lowering identical input.
  • Scalar-interface integration and the global emitted program are unchanged obligations.
  • The host was shared during the timings (load average 15–23), so the numbers are descriptive only.

Task, overlap and credit

Open next questions (also in TASK.json):

  1. Should the cold replay use the sparse compiler for these three steps? Scaling the measured 12× ratio, it would save about 430 s on the recorded machine, and with Tooling: opt-in parallel layer-end controls for the frontier1042 leaver chain, byte-identical receipts, 3.1x (extends #1059, no new kappa) #1151 the frontier1042 run would drop to roughly 300 s.
  2. Do other archived replays spend comparable time in the 23 byte-identical phases_full.py copies?

Workflow feedback: the generated TASK.json stub sets outcome to in-progress, but research_package.py rejects that value with only "declare outcome". The accepted values (partial, completed, blocked, negative-result) appear nowhere in the stub or the guide.

🤖 Generated with Claude Code

Opt-in package research/frontier1042-phase-fastpath: the merged sparse
compiler (PR1029) reproduces the three pinned k8 clifford_recipes_sha256
digests byte for byte from the archived canonical words; same-host
timings for pinned serial, dense, sparse and parallel engines. No pinned
file changes; no new kappa.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Mister-Meeseeks
Mister-Meeseeks merged commit 56210cd into CrocSwap:main Oct 14, 2026
41 of 61 checks passed
Mister-Meeseeks pushed a commit that referenced this pull request Oct 14, 2026
Exact-head retention and overlap facts for #1101, #1108, #1142, #1151,
#1277, #1361, #1509 and #1646 against main 1f7a934, with a stdlib
checker. #1142 fails on current main (stale selected-record pin) and
re-adds an earlier copy of #1108's package (add/add conflict).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Mister-Meeseeks

Copy link
Copy Markdown
Contributor

Batch review at 3f21415bd54bfc7028c3d92f047cac876bc95a91.

Merged to main, preserving the original contributor commits and package attribution.

Reviewed scope: Opt-in sparse compilation reproduces all three archived frontier1042 recipe digests and semantic review fields, with invalid-frame and redirected-edge controls. Pinned drivers remain unchanged; author speed ratios are not independently measured by this scoped replay.

The pinned scoped command passed; the batch ledger contains its command, input hashes, environment and log. This incorporates the research/tooling contribution and does not change the selected κ or discharge the inherited multiplication-theorem assumptions.

Batch review, attribution and evidence. Thank you for the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants