Repository navigation
Reduce complete publication preflight time by 34.2% (no new κ) - #6164
Merged
Mister-Meeseeks merged 1 commit intoOct 28, 2026
Merged
Mister-Meeseeks merged 1 commit into
Mister-Meeseeks merged 1 commit into
Conversation
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
An opt-in publication preflight takes 34.2% less complete-command time on a real five-source package, with identical receipts. Claim type: verifier-engineering improvement, scoped equivalence proof for completed Git queries on a stable graph, and empirical timing certificate. No new kappa.
The command is
research/joint-source-ancestry/preflight.py. It delegates byte/mode comparison to the existing checker and supplies the joint history path. All nine changed files are in this new package. The original shared scripts, tests, frozen inputs and selected record retain their base bytes.This contribution was produced by Nick Petalas. Credit ywz65's publication comparator, Nick Petalas's earlier source-history preflight, roger-sato's immutable-source isolation, Arham Tahir, Douglas Colkitt and the retained reader contributors. Conorholds's root-swap mathematics is not audited; its existing file/history inventory is the timing fixture.
Evidence
Before: median 0.242574458 s, range 0.237719458–0.246062083 s. After: median 0.159678750 s, range 0.154625000–0.204321792 s. Seven alternating fresh-process pairs on CPython 3.12.15/macOS arm64 all succeed and produce byte-identical complete receipts for 14 files and five source commits. Timings include interpreter startup, imports, inventory, byte comparison and history checks. Separate diagnostic profiles explain the reduction from 13 source-history Git calls to five. The generated
BENCHMARK.jsonbinds every sample, environment, complete receipt and implementation hashes.All 18 contract tests pass normally and optimized, including the real adapter CLI's success/rejection, merged incomparable sources, duplicates, foreign/missing/noncommit pins, first-error ordering, shallow history, replacement/graft isolation, resource bounds, malformed responses, errors and timeouts. Registered checks took 6.50 s and 6.83 s, each against a 120-second limit. Metadata/pins, direct verification, syntax/strict-warning checks and exact committed bytes, modes and source-history ancestry pass. The publication preflight checks 26 package/input files at
7d02e668a6dfdd3afb8fa9af663a09ecc854b275.From the repository root:
Elsewhere use CPython 3.12. The optional benchmark requires an existing external scratch directory, full history and the materialized
research/e8-d0-root-swapsfixture. It authenticates the baseline at721c03822c421b7f7fcbb2598993b947c4d88419; neither side runs that fixture's mathematical verifier. Advance CLAIM.Limitations and unrun obligations
This is one warm-filesystem, five-source workload. No universal speedup, second-host or Windows performance, combined optimization gain, scientific supplier replay, formal-kernel proof, complete multiplier or kappa improvement is established. Rejection can add up to two Git commands. A larger joint traversal may be slower or time out when separate commit-graph queries would finish. The single-source path keeps the original algorithm. Git and the stable-checkout contract remain required; a Git-free export is not supplied. Independent human and formal proof-kernel review are unclaimed.
Open next questions
Measure complete preflights on representative real publications with 32–256 distinct source commits and much larger histories. Keep alternating samples, exact receipts and rejection controls. Such a fixture and a separate measurement budget are needed before claiming a broader benefit.
Related open work
This account's open PRs created since the advance CLAIM were refreshed before DONE. The related preflight changes are #6155 and #6162; #6156 and #6161 concern adjacent verifier work. Their workloads differ from this fourteen-file, five-source fixture, so no same-instance number or combined gain is asserted.
CI notes
Uncertified by CI at head
7d02e668a6dfdd3afb8fa9af663a09ecc854b275. In run 40728523354,planfailed andreplay (research/joint-source-ancestry)was skipped. The package replay did not run in CI. A maintainer re-run is required after main is fixed.The onboarding job ran 678 tests and reported
FAILED (failures=2, skipped=23). Its only two failures are documentation mismatches inherited from canonical main721c03822c421b7f7fcbb2598993b947c4d88419. That PR6030 kappa-admission commit was pushed with[skip ci]and changed the selected record without updating the status formatting and CI navigation to match: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, whose current section still describes Raise conditional kappa to 0.00310045 with independent helper splits #5599 andmake frontier5599-verify.PR #6120's run 40691776027 has the same two failures. Both failed logs were read, and six local navigation tests reproduced these assertions. Open PR #6050 targets the documentation fix. This contribution changes only its new research package and caused no additional failure in the onboarding job. No code or documentation was pushed after the CI failure.
The package's normal/optimized registered and direct replays, metadata/pins and committed-byte/mode/source-history checks passed locally. Those local results are separate from hosted certification. The wider local onboarding attempt also hit omitted sparse inputs; after materializing them, all ten descendant-source-role tests and fourteen queue tests passed. A second complete local onboarding run after that materialization was not performed.
Merge Danger
Door: two-way. Blast Radius: isolated. Adoption requires explicitly invoking the new command. The positive ancestry shortcut and negative fallback have bounded source counts and existing per-command timeouts; production helpers remain unchanged.