Skip to content

release: v0.2.5815 — consolidate 5814 max_cached wiring + main's session perf+context PRs#480

Merged
justrach merged 3 commits into
mainfrom
release/v0.2.5815
May 20, 2026
Merged

release: v0.2.5815 — consolidate 5814 max_cached wiring + main's session perf+context PRs#480
justrach merged 3 commits into
mainfrom
release/v0.2.5815

Conversation

@justrach
Copy link
Copy Markdown
Owner

Summary

Builds a release/v0.2.5815 branch off latest main (which already contains PRs #474#479 from this session) and brings in the one outstanding commit from release/v0.2.5814 that wasn't on main: PR #460's .codedbrc max_cached wiring (4433aec).

release/v0.2.5813 is fully merged into main already — nothing to bring over from it.

Branch composition

source what it contributes
main (76a3588) PR #474 codedb_status cache (9.4×), #475 word-index disk persist (2.4×), #476 max_results trim (−31% tokens), #477 codedb_context composer, #478 codedb_find arg aliases, #479 codedb_context multi-line snippets + source-over-test ranking
release/v0.2.5814 cherry-pick (4433aec) .codedbrc max_cached flows into ContentCache.init capacity (was hardcoded 16384); Explorer.init and BenchContext.init now take an explicit content_cache_capacity parameter
test fixup (85ad3b7) the 5 new test callsites I added in PRs #471/#478 now pass Explorer.DEFAULT_CONTENT_CACHE_CAPACITY

release/v0.2.5813 has 0 commits not on main — nothing to cherry-pick.

Test plan

  • zig build (ReleaseFast) passes
  • zig build test — 488/489 pass (1 pre-existing failure on main: issue-44)
  • All Explorer/BenchContext callsites in the test suite now pass the cache capacity
  • No behavior change on default install: DEFAULT_CONTENT_CACHE_CAPACITY = 16384 preserves pre-fix capacity for users without .codedbrc

Why a release PR

This is the natural cutting point for the next tagged release: it groups all the session's user-visible improvements (faster status, faster word, leaner search, new context tool, fixed find argument errors, richer context output) with the outstanding .codedbrc wiring fix.

justrach and others added 2 commits May 21, 2026 03:45
PR #208 added a CLOCK eviction cache but hardcoded its capacity to
16384, leaving .codedbrc's max_cached parsed-and-forgotten. Thread
the configured value through Explorer.init and the MCP ProjectCache
so the knob actually controls cache size. Default bumped from 1000
to 16384 to preserve pre-fix behavior for users without a .codedbrc.
Issue-102 tests rewritten to assert the wiring end-to-end.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…hContext init callsites

The cherry-pick of #460 (.codedbrc max_cached wiring) reshaped
Explorer.init and BenchContext.init to take an explicit cache capacity.
Update the 3 Explorer.init + 2 BenchContext.init callsites I added in
the PR #471 / PR #478 tests to pass Explorer.DEFAULT_CONTENT_CACHE_CAPACITY.
@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 509607 508898 -0.14% -709 OK
codedb_changes 59648 56407 -5.43% -3241 OK
codedb_deps 9076 9000 -0.84% -76 OK
codedb_edit 6696 6121 -8.59% -575 OK
codedb_find 62329 64742 +3.87% +2413 OK
codedb_hot 99184 97119 -2.08% -2065 OK
codedb_outline 307449 331022 +7.67% +23573 OK
codedb_read 96294 93662 -2.73% -2632 OK
codedb_search 147145 146737 -0.28% -408 OK
codedb_snapshot 285307 285974 +0.23% +667 OK
codedb_status 13131 12981 -1.14% -150 OK
codedb_symbol 59671 68468 +14.74% +8797 NOISE
codedb_tree 68564 78712 +14.80% +10148 NOISE
codedb_word 83609 84201 +0.71% +592 OK

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 85ad3b7032

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/main.zig

var explorer = Explorer.init(allocator);
explorer.content_cache_limit = cfg.max_cached;
var explorer = Explorer.init(allocator, cfg.max_cached);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Clamp max_cached before allocating cache slots

This now feeds cfg.max_cached straight from .codedbrc into Explorer.init, but the config parser only enforces > 0 and does not cap upper bounds. Since config resolution prefers $CWD/.codedbrc (Config.loadDefault), running codedb in an untrusted repo can set an extremely large max_cached, causing ContentCache.init to attempt a huge allocation and panic on OOM instead of recovering; in MCP mode the same value is propagated to per-project explorers as well. Please bound max_cached to a sane maximum before using it in allocator-sized capacities.

Useful? React with 👍 / 👎.

@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 548931 547957 -0.18% -974 OK
codedb_changes 58701 61701 +5.11% +3000 OK
codedb_deps 10412 12336 +18.48% +1924 NOISE
codedb_edit 7577 7395 -2.40% -182 OK
codedb_find 65161 67409 +3.45% +2248 OK
codedb_hot 109398 104683 -4.31% -4715 OK
codedb_outline 342868 328694 -4.13% -14174 OK
codedb_read 108618 102694 -5.45% -5924 OK
codedb_search 164487 152565 -7.25% -11922 OK
codedb_snapshot 338340 302059 -10.72% -36281 OK
codedb_status 14867 14192 -4.54% -675 OK
codedb_symbol 70834 64577 -8.83% -6257 OK
codedb_tree 75969 78823 +3.76% +2854 OK
codedb_word 99776 91321 -8.47% -8455 OK

@justrach justrach merged commit 67be06d into main May 20, 2026
1 check passed
@justrach justrach deleted the release/v0.2.5815 branch May 20, 2026 19:56
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