Skip to content

chore(cli): log why a word.index disk load was skipped#567

Merged
justrach merged 1 commit into
release/0.2.5825from
chore/word-index-load-logging
Jun 10, 2026
Merged

chore(cli): log why a word.index disk load was skipped#567
justrach merged 1 commit into
release/0.2.5825from
chore/word-index-load-logging

Conversation

@justrach

Copy link
Copy Markdown
Owner

Found while chasing a phantom +213MB daemon RSS jump (which turned out to be cold-page-cache mmap fault-in, not a heap leak): loadWordIndexFromDiskIfPresent disables the disk load silently on any mismatch, so a fallback to full heap rebuild has no breadcrumb. Debug-level logs now name the reason (no header / file_count mismatch / git-head mismatch / mmap+read failure) at each disable site.

No behavior change; suite green.

🤖 Generated with Claude Code

loadWordIndexFromDiskIfPresent silently disabled the disk load on any
mismatch (no header / file_count / git head / mmap+read failure),
leaving the next query to pay a full heap rebuild with no breadcrumb —
it reads as an unexplained RSS/latency spike when profiling. Debug-level
logs name the reason at each disable site.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Benchmark Regression Report

Thresholds: 10.00% and 50,000 ns absolute delta

NOISE means the percentage threshold was exceeded, but the absolute delta was too small to fail CI.

Tool Base (ns) Head (ns) Delta Abs Delta (ns) Status
codedb_bundle 106134 101197 -4.65% -4937 OK
codedb_changes 10159 10548 +3.83% +389 OK
codedb_context 1109029 1106131 -0.26% -2898 OK
codedb_deps 363 347 -4.41% -16 OK
codedb_edit 50039 48247 -3.58% -1792 OK
codedb_find 10760 9056 -15.84% -1704 OK
codedb_hot 25063 30832 +23.02% +5769 NOISE
codedb_outline 33052 34537 +4.49% +1485 OK
codedb_read 17614 15973 -9.32% -1641 OK
codedb_search 24709 24602 -0.43% -107 OK
codedb_snapshot 63461 65709 +3.54% +2248 OK
codedb_status 8756 11257 +28.56% +2501 NOISE
codedb_symbol 50517 50014 -1.00% -503 OK
codedb_tree 23331 23750 +1.80% +419 OK
codedb_word 11374 12080 +6.21% +706 OK

@justrach justrach merged commit 396b251 into release/0.2.5825 Jun 10, 2026
2 checks passed
@justrach justrach deleted the chore/word-index-load-logging branch June 10, 2026 04:22
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.

1 participant