Skip to content

Reduce current task-picker startup time by 4.66% (no new κ) - #6179

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
petalas:research/w12-1029a-frontier-obstruction
Oct 29, 2026
Merged

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

Conversation

@petalas

@petalas petalas commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The current task-picker CLI executes the frozen picker in the parent before launching the same source in a child. Defer the parent load until historical route validation needs it. Current cards keep the same complete output with less startup work.

 current picker
-  load legacy validation definitions
   run unchanged legacy subprocess
   resolve successful JSON
+    load validation definitions only for historical routes

Claim type: empirical tooling improvement, with a scoped equivalence argument and finite conformance evidence. The recorded complete-command median falls from 104.461 ms to 99.598 ms, 4.66% less wall time. No mathematical bound, supplier admission, new kappa or selected-frontier change is claimed. This contribution was produced by Nick Petalas.

Only one implementation line moves. The separate research package supplies the exact-source checker, benchmark driver, generated timing receipt, provenance, limitations and next question. The first improving implementation is frozen.

Evidence

  • Before: the parent loads validation definitions even when every emitted command is current. After: that branch returns without the unused load; a historical route still loads the same source before validation or card mutation. The legacy subprocess and frozen picker bytes are unchanged.
  • Nine alternating paired batches contain ten complete CLI commands per side. All 180 timed commands succeed and every (status, stdout, stderr) triple agrees. The independent direct-CLI control agrees. Every paired batch improves. Batch-average ranges are 103.434–110.213 ms before and 93.962–105.575 ms after; paired decreases range from 3.769 to 9.565 ms. Raw ranges overlap, so the paired observations and host-specific scope matter.
  • CPython 3.12.15, macOS 27.0.1 arm64, 18 logical CPUs. The complete baseline profile attributes about 4 ms to the removed parent load; the unchanged child startup and catalogue checks remain dominant. Both sides use fresh interpreters and the same source-execution launcher, retaining the legacy child and Git queries. Timings include capture, JSON decoding and exact output checks. The generated BENCHMARK.json binds both source versions and the benchmark driver by SHA256.
  • The package checks all 22 live first-step cards, two historical route shapes and seven source/route rejection controls. It reconstructs and authenticates the exact original wrapper rather than substituting a model. Recorded timing counts, hashes and summaries are checked on replay.
  • Warning-strict normal and optimized direct/registered package checks pass. Each registered command took 0.158 s and 0.210 s locally, below its 120-second timeout.
  • Existing tests pass: 12 current-routing tests in each of normal and optimized modes, 16 historical assignment tests and 27 onboarding tests. The routing suite retains help/error propagation, exact command matching, sparse/deleted/staged reference rejection, atomic failures and frozen historical output checks.
  • At head 637a0513b0ca75053fc62ddb99d1ac43eb1cb333, package metadata/replay, committed bytes/modes and declared source ancestry pass. The committed-diff planner selects only this package. The official ten-file export passes integrity checks; its optimized read-only Git-free replay passes with all eleven extracted file payloads unchanged, including the export receipt.

Exact reproduction from the repository root:

/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -B research/current-picker-lazy-validation/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -O -W error -B research/current-picker-lazy-validation/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/current-picker-lazy-validation
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/current-picker-lazy-validation --check-source-history --check-modes
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -W error -B -m unittest discover -s tests -p test_research_current_assignment.py -v

Any CPython 3.12 executable can replace the local path. Expected markers are PASS_CURRENT_PICKER_LAZY_VALIDATION, PASS_REGISTERED_RESEARCH_PACKAGE and PASS_RESEARCH_COMMIT_BYTES. To repeat timings, choose a scratch directory and a new receipt path:

/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -W error -B research/current-picker-lazy-validation/benchmark.py --pairs 9 --repetitions 10 --scratch /tmp --write /tmp/new-picker-timings.json

Limitations and credit

This changes the replay-runtime card from scientific replay to research onboarding startup. The ratio is an empirical result for the recorded source-executed CLI, with a common launcher on both sides. It is not a cross-host speed guarantee or an acceleration of the selected scientific replay. Historical mapped routes still need validation and have no performance claim. Arbitrary side-effectful replacement modules, external consumers of the removed incidental module global and concurrent source edits are outside the equivalence argument. No public helper API is documented for that global.

No native/selected cold replay, broad historical scientific suite, Lean, Docker, independent human review or proof-kernel acceptance was run or claimed. No mathematical proof obligation is presented as discharged. Python-managed allocation and authenticated source execution are bounded, documented Power of Ten deviations in the package.

Credit Ali Romman / #5378 for the wrapper, Mihir Srivastava / #4906 and #5520 for startup guidance and historical routing, and Douglas Colkitt and the retained sparse-reference contributors for the frozen picker and validation. Deferred initialization is standard programming practice; this contribution is its measured application at this CLI boundary.

Advance CLAIM. Canonical main refreshed unchanged at 3f0152a32eeebac0df11946dbd50cabe5a7f7839, priority revision 8. Cached overlap covered 319 open PRs and 5,871 Discussion records with complete remote pagination. Its sparse local scan covered only 91 of 8,567 note paths; separate main-tree and merged-PR searches covered the candidate terms. These are bounded overlap checks, not proof of novelty.

Open next questions

Does startup loading still matter for historical mapped routes? Profile those complete commands before changing their execution boundary. The next change must preserve child failure propagation, source freshness and sparse-reference rejection. No broader startup change is included here.

Related open work

  • #6177 reduces repeated path-ancestor checks during complete replay planning. This PR defers unused validation loading in the current task-picker CLI. The commands, source files and workloads differ; their timing ratios are neither compared nor claimed additive.

Completion refresh inspected the eleven other open PRs created by this account since the advance CLAIM at 2026-10-29T13:09:45Z. None computes this current-picker startup quantity. The other contributions cover diagnostic/certificate capabilities and mathematical constructions or obstructions. No additional scientific computations were run to compare their results.

CI notes

At head 637a0513b0ca75053fc62ddb99d1ac43eb1cb333, run 40880971198 passed both hosted checks: plan and replay (research/current-picker-lazy-validation). The completed checks were read once and the PR head matches this commit. Hosted replay certifies the registered bounded normal/optimized correctness checks and recorded measurement bindings; it does not repeat or independently certify the timing ratio. The 4.66% reduction remains the recorded local empirical result. Independent human and formal proof-kernel review are unclaimed.

Merge danger

Door: two-way.

Blast radius: onboarding.

The current-command wrapper and one isolated opt-in package change. Existing route and source checks remain in place, and the historical picker, catalogue, frozen evidence and selected frontier retain their bytes.

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