Fix profiled cold-index and warm-restart costs - #771
Conversation
|
Pushed both CI corrections: The first separates ordinary That fix is verified on Windows: the entire SQLite package passed (276.482s), including both originally failing tests and all four new regressions. Other checks on The second, test-only correction retries only transient checkout-busy responses for up to 10 seconds. Every attempt still requires an error result and no handler execution; the final assertion still requires Local checks are green: full SQLite normal/race (61.077s/1024.217s), broader checkout race (41.575s), full MCP normal (266.889s, 5,846 passing test/subtest events, zero failures), and lint. No CI timeout was increased. Fresh Windows CI on |
Summary
Fixes the four findings from isolated cold-index / warm-restart profiling:
Regression coverage includes fresh index→reopen parity, policy/size changes, failed/cancelled publication and retry, Merkle preservation, Windows identity capture, shared-ID metadata, opaque adapters, sibling generations, real structural reparse/derived dispatch, retained FTS and transaction rollback.
Validation and provenance
Final source: 5b17b56 (27 atomic commits, pushed); final clean-VCS binary SHA256:
54464ea1c6402328a5543cd01ff8848b9308656ad64792de39340a4f90fc8df3.Measured tradeoff and remaining costs
All 40 serial microbenchmark samples passed on dc84927: scalar loader median 68.926→0.969 ms (allocated 54.240→0.604 MB/op); no-op backfill 9.016→0.053 ms; absent eviction 9.670→0.148 ms;
tiny eviction 113.304→78.436 ms; recount 852.449→0.996 ms. 100k-node insertion costs 2.170→2.337 s (+7.67%). These are fixture-level results, not startup gains: scalar loader has no owners; maintenance compares current-code index availability; insertion has no edges. Five samples per loader variant, three for the other variants.
The earlier 29-repository checkpoint measured cold queryable/full 468.999 / 1122.688 s, warm1 22.298 /31.666 s. It still spent warm 11.038 s in reconciliation, 6.555 s rehydrating contracts and 5.123 s seeding enrichment. Cold index/finalization 289.608 s, enrichment 236.219 s, end-batch 205.479 s (framework 126.377 s nested), and resolver tail 210.011 s remain material costs—not all proven waste or LSP startup. Do not double-count nested/overlapping timers or infer a historical causal speedup.
Explicit validation gap and compatibility limits
The dc84927 real-config cold→warm1 comparison found exactly 2 added census entries and 4 removed co-change edges; all 609,749 node payloads and 3,478,038 retained edge payloads were equal. This was not parity. The final policy fix covers the reproduced receipt loss in passing regression tests.
Final targeted real replay was NOT RUN: its preflight exited before daemon launch because free space was below the unchanged 20 GiB safety gate. No gate relaxation or evidence deletion was used. Therefore no final real-config cold/warm parity or final targeted timing is claimed. The earlier stable-input measurement also qualifies 1,644 unfollowed symlink targets.
Empty repo scope remains exact, never global; backfills remain fill-only. Opaque adapters omit ambiguous scalars; overwritten/never-persisted legacy fields cannot be reconstructed. Dependency contracts retain sparse cold single-writer payloads. The historical exact bridge split remains incompletely attributed.
PR merge-ref CI: results pending. GitHub checks will provide integration results; Windows runtime validation is distinct from local macOS execution.