Skip to content

Reduce complete publication preflight time by 34.2% (no new κ) - #6164

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
petalas:research/w12-1022ak-frontier-obstruction
Oct 28, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
petalas:research/w12-1022ak-frontier-obstruction

Conversation

@petalas

@petalas petalas commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

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.

 exact publication byte/mode check
- resolve each source pin and traverse ancestry separately
+ batch exact commit types and test their joint ancestor-set difference
  use the original sorted per-pin diagnostics on ordinary rejection

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.json binds 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:

/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/joint-source-ancestry
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -W error -B research/joint-source-ancestry/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -O -W error -B research/joint-source-ancestry/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/joint-source-ancestry --check-source-history --check-modes
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B research/joint-source-ancestry/benchmark.py --scratch /absolute/external/scratch

Elsewhere use CPython 3.12. The optional benchmark requires an existing external scratch directory, full history and the materialized research/e8-d0-root-swaps fixture. It authenticates the baseline at 721c03822c421b7f7fcbb2598993b947c4d88419; 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

  • #6161 accelerates an offline overlap-search command under the same replay-runtime card. It concerns a different command and workload; no common performance number is compared or combined.
  • #6155 removes mismatch-only hashing in the publication byte checker; this command changes per-pin history work. Its different workload's percentage is not compared or combined.
  • #6162 reuses already authenticated publication metadata; this command retains both metadata reads and replaces the separate ancestry queries. No composed speedup is claimed.
  • #6156 bounds working-source comparison memory in registered metadata validation; this package uses the existing reader and concerns publication-history latency.
  • #5721 changes Windows ownership in the shared blob reader; this adapter retains that reader interface and supplies no Windows execution evidence.
  • #6050 repairs the selected-replay documentation that currently blocks onboarding; this package does not alter those documents.

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, plan failed and replay (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 main 721c03822c421b7f7fcbb2598993b947c4d88419. 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_record expects standalone **0.003125804** in docs/research/current-status.md; main instead bolds the larger expression 0.003125804 = 781451/250000000.
  • test_research_current_status.CurrentCiNavigationTests.test_current_ci_section_matches_selected_record expects make frontier6030-verify. The test reads docs/ci-verification.md, whose current section still describes Raise conditional kappa to 0.00310045 with independent helper splits #5599 and make 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.

@Mister-Meeseeks
Mister-Meeseeks merged commit 4f46cbb into CrocSwap:main Oct 28, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants