Skip to content

fix(mcp): close #371-#376 — bug-hunt batch 2 (recall + UX)#377

Merged
justrach merged 1 commit into
mainfrom
fix/recall-bug-hunt-batch2
May 4, 2026
Merged

fix(mcp): close #371-#376 — bug-hunt batch 2 (recall + UX)#377
justrach merged 1 commit into
mainfrom
fix/recall-bug-hunt-batch2

Conversation

@justrach

@justrach justrach commented May 4, 2026

Copy link
Copy Markdown
Owner

Summary

Six recall + UX bugs surfaced by the bug-hunt eval, batched into one PR. Folds into the unreleased v0.2.5795 (tag will move forward).

Each fix has a failing test added before the fix per CLAUDE.md.

Closes

Test plan

  • 446/446 tests pass (`zig build test --summary all`)
  • Failing tests added for each bug, verified red on prior `main` before fix
  • Local binary smoke after build/notarize

🤖 Generated with Claude Code

Issues filed for each. Failing tests added before fixes per CLAUDE.md.

- #bug2: tools called during scan-in-progress now append a "scan still in
  progress" hint when results look empty/unindexed. Pre-fix: a brand-new MCP
  server returned 0 results / "file not indexed" with no indication that the
  scan was still running, so agents took those answers as authoritative.
- #bug5: codedb_read detects binary files (NUL byte in first 8KB) and stubs
  the response with a hash + size line. Pre-fix: raw bytes including NULs
  got dumped into JSON content, corrupting downstream consumers and
  burning tokens on unreadable noise.
- #bug6: codedb_read now errors explicitly when line_start < 1, line_end < 1,
  or line_start > line_end. Pre-fix: invalid ranges silently returned an
  empty body so agents read it as "file is empty in that range".
- #bug7: codedb_search rejects empty query and non-positive max_results.
  Pre-fix: malformed args returned "0 results" — indistinguishable from a
  correct query that genuinely had no hits.
- #bug11: codedb_bundle marks isError=true when no op succeeded. Pre-fix:
  the envelope reported success while per-op error markers were buried in
  the body — agents thought the bundle ran fine.
- #bug10: codedb_index schema description now says "FOLDER (not a file)" so
  the directory-only requirement is discoverable from the schema.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@justrach justrach merged commit feb760e into main May 4, 2026
1 check passed
@github-actions

github-actions Bot commented May 4, 2026

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 333363 326414 -2.08% -6949 OK
codedb_changes 31124 31092 -0.10% -32 OK
codedb_deps 5198 4845 -6.79% -353 OK
codedb_edit 5004 4526 -9.55% -478 OK
codedb_find 44203 40620 -8.11% -3583 OK
codedb_hot 56831 57745 +1.61% +914 OK
codedb_outline 194311 176198 -9.32% -18113 OK
codedb_read 61612 56966 -7.54% -4646 OK
codedb_search 144819 145562 +0.51% +743 OK
codedb_snapshot 217335 195870 -9.88% -21465 OK
codedb_status 245117 236628 -3.46% -8489 OK
codedb_symbol 41118 35645 -13.31% -5473 OK
codedb_tree 39015 36052 -7.59% -2963 OK
codedb_word 44397 41408 -6.73% -2989 OK

@justrach justrach deleted the fix/recall-bug-hunt-batch2 branch May 21, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment