Repository navigation
Tooling: 1.54-1.71x faster #741 complex replay by running independent pinned stages concurrently - #853
Merged
Mister-Meeseeks merged 1 commit intoOct 13, 2026
Conversation
…ependent pinned stages concurrently Adds scripts/verify_complex741_parallel.py, which executes the pinned research/complex-sw4-frame8/verify.py statement by statement and hands each run(...) call to verify.py's own run function once its prerequisite stages pass. Output-reading statements run unchanged after all stages. The stage graph is checked against a recorded per-stage file-access trace (ACCESS.json). Three same-machine replays (sequential, --jobs 8, --jobs 3) agree on all 304 files up to elapsed time and digests of timing-only files. No pinned file, kappa or check changes. Prepared with substantial AI assistance (Claude).
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.
Status: tooling improvement. No κ, construction, predicate, pinned file or selected record changes.
make frontier741-verifyis unchanged and remains the reference replay.Base:
7ee02b7c96d85f22b38d28bd7ed49bb8c1aeb261(main). Track: verification engineering (sprint seed 85).What changed
The complex half of
make frontier741-verify(874 s of 1158 s in the c290b7b receipt) runs the 22 stages ofresearch/complex-sw4-frame8/verify.pyone after another. Many are independent. For example, the fresh PR 558 ancestor replay shares nothing with the gauge44 → p6n → SW4 → frames chain, and three control stages read only the final word.scripts/verify_complex741_parallel.py(opt-inmake complex741-parallel-verify) executes the pinnedverify.pyitself, statement by statement, after checking its SHA-256 (7706065e…, the value in the packageMANIFEST.json):run(...)call goes toverify.py's ownrunfunction on a worker thread once its prerequisites inSTAGE_DEPShave passed. Command line, environment,run_portable.py, logs and failure handling are the original code.RESULT.json,RECEIPT.json) run unchanged, in their original order, after all stages pass.verify.pyor a stage list that differs from the table.Evidence
Schedule against a recorded trace.
research/complex741-parallel-replay/record_access.py --record DIRruns the unchanged sequentialverify.pyunder a Python audit hook loaded through a.pthfile, so it also covers the-Ichildren. The hook logs every open, listing, rename, delete and mkdir per stage.ACCESS.jsoncovers 83 processes. No stage writes outside the work directory except into freshtempfiledirectories. No pair of stages left unordered bySTAGE_DEPShas a write/read, write/write, write/list or mkdir/list conflict, and deferring the ancestral linkage loop conflicts with no later stage. Two independent recordings gave identical access sets. The table keeps argument-derived edges, which are stricter than the trace requires, because audit hooks do not seestat.Equivalence. Three full replays on one machine, each in the same absolute work directory:
verify.py--jobs 8(default)--jobs 3compare_replays.pychecked all 304 files of each tree pair. Sequential vs--jobs 8: 233 byte-identical, 50 JSON files differ only underseconds/elapsed_secondsor in SHA-256 digests of the same file where that file is itself accepted (checked to a fixed point), and 21 logs differ only in decimal elapsed times or such digests. Nothing else differs, and the other two pairs give the same result. Every generated word is byte-identical. Masking floats in logs is a relaxation; the JSON outputs are compared without masking. Negative control: changing the last digit of κ inglobal-replay/ASSEMBLY.jsonand one integer in a log produces exactly those two rejections.The parallel time equals the dependency chain gauge44 → … →
all-native-phase-edges→ global admission, so more workers cannot shorten it. Applying that chain to the Linux stage times in c290b7b gives 457 of 874 s. That is an estimate, not a measurement.Reproduce
(
SEQ_DIRandPAR_DIRmust be replays made at the same path, one after the other.)Scope and limits
tune/verify.sh, needs C++17 and Boost) could not be run here and is unchanged. Running it beside this driver would hide most of its 284 s; I leave that for someone who can test it.verify.py; the SHA-256 pin forces re-derivation after any package change.Credit and overlap
Replays chafreaky's PR 741 package and the contributors credited in its
PROVENANCE.md. eumemic's PR 154 proposed concurrent execution of themake verifygroups; this applies the idea inside the selected complex replay, with a recorded trace. It does not overlap #824 (stage-pair audit), PR 818 (R420 RREF) or PR 838 (binding audit).Prepared by navinor (Aaron Wang) with substantial AI assistance (Claude) in design, code, measurement and prose.