Repository navigation
Tooling: exact opt-in 2.3x acceleration of the transport audit behind the control suites (no new kappa) - #1156
thakrarsagar wants to merge 1 commit into
Conversation
…nd the control suites (no new kappa) An import hook lets each unchanged control script select hpe_audit_and_transport.py by its own rule, executes it from the hashed bytes, and for the validated sha256 rebinds five exact primitives (Q, apply, copy, basis, state_maps); run() and every assertion stay pinned. Four archived suites (384 audits): receipts, logs and all per-audit outcomes identical across direct, pinned-wrapper and accelerated runs. 2.29x per audit, 2.26x suite CPU. Adversarially reviewed; the found recursion-depth and module-substitution issues are fixed and covered by tests.
|
100-PR batch review at This remains open after scoped triage. Next review step: Exactness tests passed with both Fraction constructors. The full run completed t37-u8-layer-end, 799-x4-layer-end and 741-p6n-layer-end (96 audits each), but hit the 900-second batch limit before 741-inherited-cold-end and the final EXPECTED comparison completed. Finish and retain the fourth-suite comparison plus the full deterministic-field check; no default checker change is admitted. This is a specific continuation point, not a rejection or a request to redo already recorded checks. Completed local evidence is retained separately from outstanding whole-head obligations. Batch review, attribution and evidence. Thank you for the contribution. |
Status: tooling improvement (verification engineering). No new κ. No mathematical check is changed, skipped or weakened, and no pinned file or orchestrator is edited.
Track 85–94, OS-random seed 87. Base: current main
ce7ad1b6. The work started on29218749, and every pinned input is unchanged between the two. Onlyresearch/fast-transport-audit-seed87/is added.What it speeds up
PR635's
hpe_audit_and_transport.run(shac9a05ff2…) is the per-trial cost of every negative-control suite in the cold chain. Each suite runs 96 full audits:layer_end_controls_leaver.pyruns that the selected Conditional kappa 0.001672660197076918: rare-pattern T16 exchanges #1094 lineage rebuilds.fast_controls.pyis a drop-in forpython3 <control script> <args>. An import hook lets the script selecthpe_audit_and_transport.pyby its own rule and executes it from the hashed bytes, never a.pyc. Only for the validated sha256 does it rebind five exact primitives:Q: integral values asint;apply: integer and ±1 fast paths, with the same assertion order, lazy row access and zero-dropping;copy: structural copy of flat gate records only;basis: memoised on all-intinputs;state_maps: scaled-integer dyadic P and P⁻¹, falling back to the pinned code for anything else.run()and every assertion and message remain the pinned code objects. An unvalidated module runs unaccelerated, or exits non-zero under--require-fast.Evidence
Expected final line:
PASS_FAST_HPE_TRANSPORT suites=4 audits=384 identical_receipts_logs_outcomes cpu=…. Deterministic fields are compared withEXPECTED.json. An independent--quickrerun and a clean sparse clone of this branch both reproduced it.Four archived suites, 384 audits. Inputs, receipts and logs are read from the repo's own evidence tarballs. Each unchanged script runs directly, through
--pinned, and through--require-fast:COLD-END-CONTROLS.jsonis byte-identical across the three runs and matches the archived receipt apart from its absolutewordpath;repr(args)andrun()line, or receipt text plus both output-word hashes).Differential tests, under both Fraction constructors. Each primitive is compared with the pinned function on value, key order and exception type and message:
apply: 4,000 programs, including malformed gates;state_maps: 300 programs (227 take the dyadic path) and the real 12,913-gate prefix;basis: 3,000 inputs, including non-int and cached calls;run()on two module instances, for the honest word plus four deep-nesting variants;$PR635_CODE) and the hash guard.Negative controls: a sabotaged
applyis detected, and a zero-coefficient gate matches the pinned code.Current frontier. On the Conditional kappa 0.001672660197076918: rare-pattern T16 exchanges #1094 lineage's final k8 word,
layer_end_controls_leaver.pyproduced a byte-identical receipt (95 rejected plus 2 declared not-applicable substitutes) and identical stdout; user CPU fell 50.6 → 24.6 s. This was recorded manually because that word isn't archived.Adversarial review
Three reviewer subagents tried to break the claim: a primitive fuzzer (~600k
applygates), a word mutator (201 new corrupted U8 words, run in fresh processes), and a harness reviewer. They reproduced one real divergence: an earlier copy used one frame per nesting level, so a gate nested about 500–1,000 deep made the pinned audit raiseRecursionErrorwhile the accelerated one passed. The copy now handles only flat records.They also found that pre-importing from
$PR635_CODEcould substitute a different module for scripts that import a sibling; about 17 directories hold another version. That is why the import hook now leaves the choice to the script. Smaller fixes:run()line;.pyccan no longer bypass the hash guard;sys.path;--is passed through to the script.Each of these cases is now a test.
Measurements
macOS arm64, CPython 3.14.8, concurrent load 8–22:
Cumulative ablation: Q/apply 1.72×, +copy 1.72×, +basis 2.07×, +state_maps 2.29×. The copy step is roughly neutral now and can be dropped.
Scope
7829187b…, input not archived) was not run.run(). Helpers returnintafter installation, and behaviour within one frame of the recursion limit is not claimed identical.Credit
Prepared by Sagar Thakrar with substantial assistance from Anthropic Claude (Claude Code), including the explorer, judge and reviewer subagents.