Repository navigation
Reduce research-source validation peak allocation by 42% (no new κ) - #6156
Merged
Mister-Meeseeks merged 2 commits intoOct 28, 2026
Merged
Conversation
This was referenced Oct 28, 2026
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.
Summary
Reduce complete research-source metadata validation's peak traced allocation by about 42% on a real large-source package. This is a verifier-engineering contribution with a scoped equivalence proof and finite tests. No new κ is claimed.
The production change adds one helper and replaces one comparison. The existing stable regular-file checkout contract remains required. This contribution was produced by Nick Petalas.
Evidence
Five alternating fresh-process pairs run complete, unchanged
validatecalls onresearch/physical-gaussian-core, including its 54,548,480-byte archive input. All ten complete task/manifest results match and no validation fails. The package's scientific verifier is not run or audited.BENCHMARK.jsonretains raw samples, environment, source hashes and complete-output hashes. These measure Python traced allocation, not RSS or whole scientific replay.ac7949b52fb71417bc5d48b8a562042b8e78cf89. Read-only exported normal/optimized replays pass, with all 12 exported files unchanged./Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -W error -B -m unittest discover -s tests -p 'test_research_*.py' -v.From the repository root, set
TMPDIRto an external scratch directory and run:For the optional benchmark, materialize
research/physical-gaussian-coreandreferences/semantic-bulk/rad20first in a sparse checkout, then run:Elsewhere substitute a local CPython 3.12 interpreter. Git is needed for source metadata and the temporary test fixtures. The benchmark baseline is main
721c03822c421b7f7fcbb2598993b947c4d88419.Limitations
The pinned Git blob is still allocated in full. The 1 MiB bound covers the comparison's additional data buffer. Concurrent mutation is outside the existing checkout-stability contract. Native Windows execution, whole-process RSS and scientific/full selected replays remain unrun; mathematical, physical and supplier obligations are unchanged. The complete validator is slower in these traced measurements.
Open next questions
Can the retained pinned Git blob also be streamed while preserving blob identity, SHA256, response framing, final process status and cleanup? First specify a bounded chunk protocol and all existing consumers; the present complete-bytes
git_blobsinterface blocks that next step.Related open work
Credit Douglas Colkitt's runner; woklerx/PR1452, Arham-Tahir64/PR1595 and ywz65/PR2539 for the source-reader lineage; later path, deadline, replacement-ref and descendant-cleanup contributors; and Jose Manuel/jmbarrancoml for the unchanged benchmark package. Buffered I/O and memory views are standard methods.
CI notes
Uncertified by CI at head
ac7949b52fb71417bc5d48b8a562042b8e78cf89. In run 40725920133,planfails andreplay (research/source-comparison-memory)is skipped. The package replay did not run in CI. A maintainer re-run is needed after main is fixed.The only two failures are inherited onboarding documentation mismatches on canonical main
721c03822c421b7f7fcbb2598993b947c4d88419, the PR6030 admission committed with[skip ci]. That commit changed the selected record without matching the status and CI navigation pages:test_research_current_status.CurrentStatusTests.test_current_section_matches_selected_recordexpects standalone**0.003125804**indocs/research/current-status.md; the page bolds the larger expression0.003125804 = 781451/250000000.test_research_current_status.CurrentCiNavigationTests.test_current_ci_section_matches_selected_recordexpectsmake frontier6030-verify; the CI navigation page, read fromdocs/ci-verification.mdby the test, still names Raise conditional kappa to 0.00310045 with independent helper splits #5599 andmake frontier5599-verify.The hosted run reports
Ran 685 testsandFAILED (failures=2, skipped=23). These are the same two failures seen locally and in PR #6120's run 40691776027. Open PR #6050 targets the documentation fix. Neither failing document nor the selected record is changed here.Local normal/optimized package replay, committed-byte/source-history checks and read-only export replays remain separate evidence. No hosted package certification is claimed. Shared-runner changes select every registered package in the existing planner; no historical scientific suites were launched locally.
Merge Danger
Door: Two-way
Blast Radius: Validation
All registered package source checks use this comparison. The written proof and behavioral controls preserve exact acceptance under the existing checkout contract; the measured memory/time tradeoff is explicit.