Skip to content

Tooling: opt-in parallel U8 layer-end controls, byte-identical receipt, 3.0x on 10 cores (no new kappa) - #1059

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
thakrarsagar:tooling/u8-layer-end-controls-parallel
Oct 13, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
thakrarsagar:tooling/u8-layer-end-controls-parallel

Conversation

@thakrarsagar

Copy link
Copy Markdown
Contributor

Status: tooling improvement (verification engineering). No new κ, and no check is changed or weakened.

Track 85–94 (verification engineering), assignment seed 85 (OS CSPRNG via Python secrets). Base commit 2921874911956718fcaaaf9396fe8267b3cfa9f0.

What it speeds up

In the selected T37 replay, the u8-native stage spends 77.0 s in layer-end-controls. That step is PR870's layers_p6n/layer_end_controls.py: 96 independent hpe_audit_and_transport.run audits (the unmutated U8 word plus 95 mutants), each rejected for a pinned reason.

research/layer-end-controls-parallel/controls_parallel.py takes the same arguments. It parallelizes the audits without editing or re-implementing the pinned script:

  1. Record. The pinned script runs with a stand-in audit module that records the exact gzip bytes of every trial word. As each word is recorded, its real audit starts in a worker.
  2. Evaluate. The real, digest-pinned audit evaluates every distinct word in worker processes.
  3. Replay. The unchanged pinned script runs again. Its stand-in returns or raises the precomputed real outcome for the identical bytes. The script's own assertions check every pinned reason and write the receipt, and the trial-word sequence must equal the recorded one.

The record pass's placeholder answers never reach any decision.

Benchmark (same pinned inputs, one machine: macOS arm64, 10 cores, Python 3.14.8)

Runner Wall time Speedup
pinned layer_end_controls.py 49.2 s standalone (52.5 s in the harness) 1×
--jobs 10 16.4 s standalone (19.9 s in the harness) 3.0×
--jobs 4 23.3 s 2.1×

The remaining serial cost is the pinned script's own mutant construction, which runs once per pass by design.

Equivalence evidence

  • COLD-END-CONTROLS.json is byte-identical to the pinned script's receipt for the same arguments (99a17435…), and the printed control lines are identical.
  • The 95 rejected controls equal the selected replay's archived receipt, in order.
  • Control C1: a corrupted unmutated word fails at the pinned script's own assertion, "unmutated cold-end word must pass", in the replay pass, and no receipt is written.

Reproduce

make layer-end-controls-parallel-verify      # ~35 s: parallel run, archived-receipt match, C1, 3 tests
make layer-end-controls-parallel-benchmark   # ~80 s: adds the pinned serial reference and byte comparison

Expected: PASS_LAYER_END_CONTROLS_PARALLEL. Standard-library Python 3.10+, no network. The input word comes from the pinned T37 archive and is checked against PR870's RECIPE-U8.json.

Scope

  • This is opt-in. Nothing is wired into reproduce_barch.py or scripts/verify_frontier942.py, and no pinned file is modified.
  • It complements PR1041, the opt-in phase-recipe runner for the 154 s step of the same stage. Together the two would bring u8-native from about 254 s to about a minute on the recorded machine.
  • It discharges no mathematical obligation, and the timings are local measurements.

Credit

  • DreamingOfClouds: layer_end_controls.py, adapted from PR635's cold-end controls.
  • PR635's authors: the transport audit.
  • Jeremy Kothe and NewBArch: PR869/PR870.
  • Jonathan Capalbo: the PR942 replay.
  • navinor: PR853/PR921, prior concurrency tooling.

Prepared by Sagar Thakrar with substantial AI assistance from Claude (Anthropic) via Claude Code. New material is Apache-2.0.

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