Repository navigation
Conversation
…producibility Two members of make verify crash on non-UTF-8 hosts (ranked-pair-check, machine-transfer-check: locale-dependent decoding of UTF-8 Lean sources), and every scripts/ generator wrote certificates with CRLF translation on Windows, so regenerated artifacts were byte-different from the tracked bytes. - Makefile: export PYTHONUTF8=1 for all recipes (machine-transfer-verification is byte-frozen by its publication manifest and cannot be edited). - ranked-pair-verification/verify.py: explicit encoding='utf-8' on text reads. - scripts/: encoding='utf-8', newline='\\n' on 139 text writes in 126 files, applied mechanically by research/agent-08-verifeng-seed85/pin_text_writes.py (frontier- and receipt-frozen scripts skipped; three first-pass edits reverted where a frozen receipt pins the source bytes). - 27 certificates regenerated; diffs are recorded source digests only. - tests/test_locale_reproducibility.py: four regression guards. No mathematical content, certificate value, or the selected frontier changes. Evidence and scope: research/agent-08-verifeng-seed85/. Prepared with help from opencode.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tooling: cross-platform byte/codec reproducibility of the
make verifysurfaceStatus: tooling improvement (verification reproducibility). Track 85–94 (verification engineering), OS random seed 85. Base commit
91a2094f2e022930069e8cfdc810a3ea1b81cd09. No new kappa; no mathematical claim, certificate value, patch payload, or the selected frontier changes. Prepared with help from opencode.Findings at the base commit (Windows 11, CPython 3.13.15, cp1252)
ranked-pair-checkcrashes:research/ranked-pair-verification/verify.pydecodedlean/CappedMass.lean/lean/ConcreteAssembly.leanwithPath.read_text()and noencoding=, so the locale codec applied (UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d). The check passed on UTF-8 hosts and crashed elsewhere — an outcome that depended on the host locale.machine-transfer-checkcrashes: same root cause inresearch/machine-transfer-verification/next-proof/analytic/check.py(row_region.count("⟨")counted 0 against cp1252 mojibake →Unexpected literal row constructors). The 240-file package is byte-frozen by its ownpublication-manifest.json, so its sources cannot be edited without invalidating the reviewed publication bytes.scripts/generators wrote certificates through unpinned text writes, so'\n'was translated toos.linesep. 39 certificates regenerated by the audited checks differed from their tracked bytes in every line, while being equal after newline normalization (39/39 verified). Byte-level receipts (sha256 of a regenerated artifact) diverge from the Linux reference this way.A static inventory found 7157 locale-dependent text I/O sites repo-wide at the base commit; 150 write sites are in the
scripts/make surface (recorded inresearch/agent-08-verifeng-seed85/evidence/locale-sites.json).Change
Makefile:export PYTHONUTF8=1for all recipes. Identical behavior on Linux; this is what letsmachine-transfer-checkpass without touching its publication-frozen sources.research/ranked-pair-verification/verify.py: explicitencoding='utf-8'on its three text reads (not hash-pinned anywhere), so direct invocation also works.scripts/:encoding='utf-8', newline='\n'on 139 text writes across 126 files, applied mechanically by the committed ast codemodresearch/agent-08-verifeng-seed85/pin_text_writes.py --fix(one keyword pair per call; nothing else changes).tests/test_locale_reproducibility.py: four regression guards.Frozen sources are not touched
The codemod refuses to modify a script named by path in
certificates/selected-result.json,certificates/checkpoints/*.json, orSELECTED-SOURCE.json(9 frontier drivers), or whose sha256 appears in a frozendocs/research/*.jsonreceipt. The second rule caught three first-pass edits, which were reverted:scripts/audit_community_candidate.py(pinned bydocs/research/community-followup-arithmetic.json, whichaudit_followup_candidate.py --checkcompares against — the check failed until the revert) andscripts/verify_frontier617.py/verify_frontier617_bindings.py(tested-source digests indocs/research/community-cold617-integration.json). 43 scripts are skipped as frozen in total.docs/research/preserved-research-manifest.jsonrecordsoriginal_sha256— bytes as of its historicalbase_commit— and does not freeze current sources.Reproduce and verify
Expected:
Ran 4 tests ... OK. The guards runranked-pair-checkunder a hostile locale (LC_ALL=C, no UTF-8 mode) and requirePASS ranked pair; runmachine-transfer-checkthe waymakedoes (UTF-8 mode pinned) and requirePASS machine-transfer offline checkpointplus the Makefile pin; regeneratecertificates/cube-core-family.jsonwith a real generator (scripts/audit_cube_cores.py) and require byte identity; and requirepin_text_writes.py --checkto report0 unpinned text writes.Measured before/after (same host, same inputs)
ranked-pair-check(hostile locale)UnicodeDecodeErrorPASS ranked pair(1.3 s)machine-transfer-check(PYTHONUTF8=1)Unexpected literal row constructorsPASS machine-transfer offline checkpointsource_sha256of edited generators); 0 content, 0 newline differencesTiming evidence for the audited checks is in
research/agent-08-verifeng-seed85/evidence/(survey-baseline.jsonpre-fix,survey-after-fix.jsonpost-fix;regeneration-receipt.jsonrecords the diff analysis and commands).Scope and unresolved obligations
machine-transfer-checkinvoked directly (bypassing the Makefile) still fails on non-UTF-8 hosts: its checker sources are frozen bypublication-manifest.json.make verifyruns it correctly.open()calls inscripts/with non-literal modes (reported, left alone), the 43 frozen scripts, andresearch/-side package generators, which can still emit CRLF-translated output on Windows. The repo-wide inventory lists the sites.gen4-bank-verify, thefrontier741/799-verifychains,prime_field_networkandaudit_positive_skip_exact(compile C++ producers), Lean builds, and the 15 environmental Windows test modules (e.g.resourceimports). None of their bytes changed.Overlap and predecessor work
Surveyed 716 open PRs before submission; none targets locale/codec/newline reproducibility (the closest, PR 819, makes one gzip artifact portable by a different method on a different object). Concurrent tooling PR 849/#853/PR 903/#921 and the earlier PR 752/PR 778/PR 808/#824 accelerate other checks and do not touch these surfaces; PR #921's benchmark evidence supplies the base failing set compared against here (credit: Aaron Wang), and the doctrine follows Maxime Fleury's gzip-container reproducibility audit ("compare canonical payloads across environments"). The repository's verification suite, generators and frozen packages are the predecessors; this change only pins how their text is decoded and encoded.
Prepared for the coordinated research sprint by agent-08, with help from opencode. Apache-2.0. No independent human review is claimed. Finite tooling checks do not discharge the inherited all-size/compiler, hosting, precision/tape and analytic hypotheses, and no full Lean multiplication theorem is claimed.