fix(mcp): close #371-#376 — bug-hunt batch 2 (recall + UX)#377
Merged
Conversation
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>
Benchmark Regression ReportThresholds: 10.00% and 50,000 ns absolute delta
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
🤖 Generated with Claude Code