Repository navigation
perf(research): cut overlap query wall time by 48.7% - #6161
Merged
Mister-Meeseeks merged 1 commit 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
Empirical tooling improvement with a scoped equivalence proof and finite regression evidence. The complete offline
joint-query-controlleroverlap command takes 48.7% less wall time, median 1.015105 s → 0.521243 s, on the recorded workload. No new kappa or selected-frontier change.numeric-reference lookup + if its mandatory literal number is absent, return no match otherwise run the unchanged boundary-aware regexEvery accepted regex match contains the escaped literal number. The new rejection is therefore exact; present numbers still receive the original boundary checks and offsets. Explicit literal queries keep their original path. Matches, scores, excerpts, ordering, coverage and warnings are preserved.
Produced by Nick Petalas. Credit Douglas Colkitt's overlap helper, Nick Petalas's #3002 numeric-reference rules, Ali Romman's #5736 Unicode excerpt handling and retained contributors. Literal prefiltering is standard; this contribution is its integration, complete-command measurement and controls. Advance CLAIM.
Evidence
searched_at. Baseline range 0.994940–1.087073 s; candidate range 0.510642–0.535762 s. Both sides include interpreter startup, imports, local inventory, cached parsing, search and JSON output. Separate profiles identify regex scans as the removed cost.BENCHMARK.json.1278601c6832bbecb47c2207240eede23f99a2fe. Official eleven-file export integrity passes. Normal and optimized Git-free replays with empty PATH and read-only files pass, preserving all twelve exported file hashes.Exact reproduction from the repository root, CPython 3.12 and standard library only:
Expected correctness markers are
PASS_OVERLAP_REFERENCE_PREFILTER,PASS_REGISTERED_RESEARCH_PACKAGEandPASS_RESEARCH_COMMIT_BYTES. Another CPython 3.12 installation may replace the local interpreter path. The optional benchmark needs Git and the pinned reachable main history.Limitations and unrun obligations
Timing is workload-specific. The historical public cache is hash-identified but not vendored, so the exact timing cannot be reconstructed from this package alone after that cache is removed. The harness accepts an external cache and checks all output fields on that workload. The deterministic verifier and CLI tests need no historical cache. No universal speedup is claimed for reference-dense corpora or other checkout layouts.
No supplier mathematics, native operator, full multiplier, selected cold replay, Lean or Docker is audited or run. Independent human and formal proof-kernel review are unclaimed. All of this package's registered commands ran locally; none is deferred to CI.
Open next questions
Does the same gain hold for other cards and a complete checkout? Run the unchanged harness on the intended immutable cache before optimizing a different mechanism. The first verified improvement is shipped here.
Related open work
The completion refresh read this account's fifteen open PRs created since the CLAIM at 2026-10-28T16:15:54Z. No other submission changes this numeric-reference predicate or reports its complete overlap-command timing. These submissions also change shared verifier tooling under the same
replay-runtimecard:scripts/check_research_commit.py. It measures publication byte/history checking; this PR measures overlap search. Their timings are not compared or combined.scripts/check_research_commit.py. It removes duplicate Git reads in a different command; no combined speedup is claimed.scripts/research_package.py. That module is a shared dependency of the overlap tool, but this PR retains the baseline module and claims no combined memory or timing benefit.The other refreshed submissions study different constructions or quantities. No additional computations were run to compare their results.
CI notes
Uncertified by CI at head
1278601c6832bbecb47c2207240eede23f99a2fe. In run 40726915850, plan failed and replay was skipped. The package replay did not run in CI. A maintainer re-run is needed after main is fixed.The onboarding job reports
FAILED (failures=2, skipped=23). Its only two failures are the existing documentation mismatches on canonical main721c03822c421b7f7fcbb2598993b947c4d88419, the PR6030 kappa admission pushed with[skip ci]. That commit changed the selected record without matching the status marker and CI navigation:test_research_current_status.CurrentStatusTests.test_current_section_matches_selected_recordexpects standalone**0.003125804**indocs/research/current-status.md. Main instead bolds the larger expression0.003125804 = 781451/250000000.test_research_current_status.CurrentCiNavigationTests.test_current_ci_section_matches_selected_recordexpectsmake frontier6030-verify. The test readsdocs/ci-verification.md; its current CI section still names Raise conditional kappa to 0.00310045 with independent helper splits #5599 andmake frontier5599-verify.PR #6120 run 40691776027 fails the same two tests. Open PR #6050 targets the documentation fix. The edits to
scripts/find_overlap.pyand its test introduced no additional failure in this onboarding step. This does not certify the skipped package replay. No code or documentation was pushed after the CI failure.Local evidence remains separate: all three registered commands, normal/optimized direct checks, the 37 focused overlap tests, committed-byte/history/mode preflight, export integrity and Git-free replays pass. The broad local onboarding run initially had sparse-fixture errors; after materializing the omitted paths, all ten descendant-source-role tests and all fourteen queue-group tests pass. The complete local suite was not repeated after those targeted reruns.
Replay planning selects this package and three existing dependents.
overlap-discussion-batchingandreplay-input-head-spellingpass their registered replays locally.overlap-path-indexstops atsource blob provenance mismatch: scripts/find_overlap.py. Its manifest is byte-identical to main and declares blob34677253e224a8a2df51113dcd82b48f8826f81c, while its declared base contains2668844310ea52bb4fe3c4561dd4ee16fcdd20cc. This pre-existing provenance inconsistency is preserved. That dependent's downstream replay is unrun after the metadata failure.Merge Danger
Door: two-way.
Blast Radius: coordination. Four shared-script lines, one regression test and one isolated research package. Existing source notices, frozen evidence and the selected frontier are preserved.