Skip to content

Tooling: selected final stage reruns byte-for-byte on CPython 3.10-3.14, reproducing the certificate bytes (no new kappa) - #1824

Merged
Mister-Meeseeks merged 3 commits into
CrocSwap:mainfrom
JosieElliston:research/final-stage-interpreter-matrix
Oct 14, 2026
Merged

Mister-Meeseeks merged 3 commits into
CrocSwap:mainfrom
JosieElliston:research/final-stage-interpreter-matrix

Conversation

@JosieElliston

Copy link
Copy Markdown
Contributor

Verifier engineering: the selected final stage reruns byte-for-byte on CPython 3.10–3.14 (no new kappa)

Card: portable-replay (verifier-engineering, priority revision 3, chooser seed e95bc9807d1d236e2d6d663b2945e09b). The scope is refined to one stage and one comparison. CLAIM in #1472. Base 0b1cccf8. This PR adds only research/selected-final-stage-portability/ (README, TASK, SOURCES, VERIFY, verify.py, compare_payloads.py). It uses only the standard library and runs in about 20 s. No selected, pinned, frozen or upstream/ file changes.

Question

The selected #1094 replay has one stage after its #1042 baseline: research/complex-t16-rare-pattern-exchanges/verify.py. That README says "Python 3.12+", and the selected-replay CI pins 3.12. This PR asks two things:

  • Does the stage pass on other CPython versions?
  • Is the output the same as the reviewed run archived in community-frontier1094-audit/selected-replay.tar.gz? Here "the same" is checked by bytes, then by canonical payload (JSON parsed, .gz decompressed).

Result

I reran the stage from the committed #1042 slots/local. All 10 files match the #1042 receipt hashes. The setup was macOS 26.6.2 arm64 with uv-managed CPython. Every run passed with kappa 0.001672660197076918:

  • Interpreters: 3.10.21, 3.11.16, 3.12.14, 3.13.15 and 3.14.7.
  • PYTHONHASHSEED: random on all five interpreters, plus 0, 1 and 4242 on 3.12, and 0 and 987654321 on 3.14.

Every run's 105 output files compare with the reviewed run as follows:

Class Files Difference
byte-identical 102 none: all 22 .gz (gzip containers included), 69/72 .json, all 11 inner stage logs
json-relocated 1 INDEPENDENT-T16.json: only the absolute-path keys of input_sha256 differ; all 6 digests agree
volatile 2 REPLAY.json, STAGES.json: only the 11 per-stage seconds; every inner log_sha256 agrees

Verifier and controls

verify.py runs these checks:

  1. It binds the input to the Conditional κ = 0.001672188119205421: improved T16 owner packing on the seven-slot k8 word #1042 receipt.
  2. It binds the archived output to the committed Conditional kappa 0.001672660197076918: rare-pattern T16 exchanges #1094 RESULT.json, STAGES.json, REPLAY.json, assembly_sha256 and stage-script hash.
  3. It reruns the stage and requires the exact classification above, plus the certificate bytes.
  4. It runs seven negative controls on copies of the rerun:
    • Five must be flagged proof-relevant-candidate:
      • a changed proof value;
      • a changed kappa alongside volatile seconds;
      • a changed inner log_sha256;
      • a changed gzip payload;
      • a path outside the mapped roots.
    • A missing file must be reported missing.
    • A gzip re-compressed at a different level and mtime must be accepted as gzip-container.

compare_payloads.py can be reused on any two replay trees. It lists the JSON paths that differ. It treats only seconds as volatile by default, and --volatile-key adds more.

Commands run (all pass, 2026-10-14 ~06:57 EDT)

python3 scripts/research_package.py --package research/selected-final-stage-portability --check-only
python3.12 scripts/research_package.py --package research/selected-final-stage-portability   # ~20 s
for v in 3.10 3.11 3.12 3.13 3.14; do python$v -B research/selected-final-stage-portability/verify.py; done
python3.12 -B -m unittest discover -s tests -p 'test_research_*.py'   # 42 tests OK

Not checked

Open next questions

The README and TASK.json give the first steps and blockers. In short:

  1. Does the same byte agreement hold on Ubuntu CI (Python 3.12) and on Windows?
  2. Should the Conditional kappa 0.001672660197076918: rare-pattern T16 exchanges #1094 receipt drop or annotate the non-reproducible outer log_sha256? That needs a maintainer decision about the selected script.
  3. Are the Conditional κ = 0.001672188119205421: improved T16 owner packing on the seven-slot k8 word #1042 stages' 457 bound artifacts byte-deterministic too? If so, reuse mode could be checked across machines.

Credit

Prepared by JosieElliston's donated Claude Code session 26 with substantial AI assistance (Claude Opus 5.5). It is self-reviewed only, with no independent review. Apache-2.0. No merge, closure or frontier change is requested.

🤖 Generated with Claude Code

JosieElliston and others added 3 commits October 14, 2026 06:48
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… selected final stage (no new kappa)

Reruns research/complex-t16-rare-pattern-exchanges/verify.py from the
hash-bound archived CrocSwap#1042 slots/local and compares every output with the
reviewed CrocSwap#1094 archive: 102/105 byte-identical, one relocated path map,
two files differing only in wall-clock seconds, on CPython 3.10-3.14.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ytes; inner log-digest control

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

Copy link
Copy Markdown
Contributor

Batch review at ad5b1248f25a71983b20617e2f3a80be22f03990.

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

Reviewed scope: Pinned final selected stage replays on reviewer CPython3.12 with102 identical files, one path-relocated JSON and two timing-only JSON differences; assembly bytes match. Mutation/gzip controls reviewed. Author3.10–3.14 matrix retained as author evidence, not independently rerun here; earlier cold stages excluded.

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.

Mister-Meeseeks pushed a commit that referenced this pull request Oct 15, 2026
…mparator

On the pinned PR1094 final-stage replay corpus (105 files), PR #1824's
reusable comparator classifies 39 mutations as mere formatting or
relocation: 25 Boolean/integer substitutions in three receipts, 12
input-path alias cases, one duplicate key and one exact decimal change.
A new opt-in comparator (typed exact JSON, injective tagged paths,
explicitly declared timing fields) rejects all 39 and still accepts the
105 unchanged files, 22 recompressions, 72 reformats and a complete valid
relocation fixture. No frozen caller is rewired; no kappa claim.

Adds research/strict-replay-payload-comparison/ only.

Submitted by @commdata2338 with substantial AI assistance (OpenAI Codex
research and implementation; packaged with Claude Code).
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