Skip to content

release/0.2.5795: close #356 — phase 3 (stale-index hint, read fuzzy, query stages tail)#366

Merged
justrach merged 3 commits into
mainfrom
release/0.2.5795
May 3, 2026
Merged

release/0.2.5795: close #356 — phase 3 (stale-index hint, read fuzzy, query stages tail)#366
justrach merged 3 commits into
mainfrom
release/0.2.5795

Conversation

@justrach

@justrach justrach commented May 3, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #356.

Three small ergonomics polishes that wrap up the rewritten #356 reliability scope:

  • `codedb_outline` 'file not indexed': append `hint: try codedb_index if the file was added recently` alongside the existing fuzzy suggestions.
  • `codedb_read` 'failed to read file': append fuzzy 'did you mean:' suggestions like `codedb_outline` already does.
  • `codedb_query` successful pipelines: emit a structured `--- stages ---` summary tail listing each step's op + outgoing file count.

#356 acceptance summary across all 3 phases:

  • ✅ Phase 1 (v0.2.5793) — pipeline partial results, outline fuzzy fallback, query received-keys diagnostic
  • ✅ Phase 2 (v0.2.5794) — received-keys diagnostic across all single-tool handlers
  • ✅ Phase 3 (this PR, v0.2.5795) — stale-index hint, read fuzzy, query stages tail

Test plan

  • `zig build test` — 437/437 pass
  • 3 failing tests under `issue-356-p3` land before the fix (per CLAUDE.md repo policy)

Commits

```
6084025 test(issue-356-p3): failing tests for outline 'codedb_index' hint, read fuzzy fallback on disk-read failure, codedb_query per-stage summary
c588308 fix(mcp): close out #356 — stale-index hint, read fuzzy fallback, codedb_query per-stage summary
8041c98 docs: add 0.2.5795 changelog — close #356
```

🤖 Generated with Claude Code

justrach and others added 3 commits May 4, 2026 02:37
read fuzzy fallback on disk-read failure, and codedb_query per-stage
summary tail

Phase 3 wraps up the #356 reliability scope with three small
ergonomics improvements:

  - p3-1: codedb_query successful-pipeline output gains a structured
    '--- stages ---' tail listing each step's op + outgoing file
    count. Long pipelines become legible without re-parsing the
    unstructured per-step output above it.
  - p3-2: codedb_outline 'file not indexed' error gains a 'try
    codedb_index' actionable hint alongside the phase-1 fuzzy
    suggestions. Stale-index recovery becomes obvious instead of
    requiring tribal knowledge.
  - p3-3: codedb_read 'failed to read file' error gains the same
    fuzzy 'did you mean' suggestions that codedb_outline already
    surfaces, so a mistyped path is recoverable without a
    codedb_find round-trip.

Also bumps version to 0.2.5795 (build.zig.zon + release_info.zig
in sync).

All 3 tests fail on main; fixes in subsequent commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
codedb_query per-stage summary

Phase 3 wraps the rewritten #356 reliability scope:

  - codedb_outline 'file not indexed' now appends
    'hint: try codedb_index if the file was added recently' alongside
    the phase-1 fuzzy suggestions. Stale-index recovery becomes
    obvious — agents no longer need to know the operator manually
    re-indexes via codedb_index.

  - codedb_read 'failed to read file' now appends fuzzy
    'did you mean:' suggestions just like codedb_outline does.
    Mistyped paths are recoverable in one shot.

  - codedb_query successful pipelines now emit a structured
    '--- stages ---' tail listing each step's op + outgoing file
    count. Long pipelines become legible without parsing the
    unstructured per-step output above it.

Implementation: minor additions in handleOutline/handleRead reuse
the existing appendFuzzyPathSuggestions helper. handleQuery tracks
a stages slice per-iteration and emits the summary post-loop. None
of the new output disrupts existing tooling — every existing
testing.expect about query/outline/read content still holds.

Tests: 3 issue-356-p3 cases in src/tests.zig fail on main and pass
with this commit. All 437 tests green.

#356 acceptance criteria coverage:
  - Pipeline step failure no longer discards prior-step output
    (phase 1)
  - codedb_outline returns up to 3 fuzzy-match suggestions for
    non-indexed paths (phase 1)
  - codedb_query step missing-arg errors include received keys:
    [...] (phase 1, generalized to all read tools in phase 2)
  - Plus phase-3 polish above.

Closes #356.

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

github-actions Bot commented May 3, 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 521735 511748 -1.91% -9987 OK
codedb_changes 53566 51800 -3.30% -1766 OK
codedb_deps 9523 12499 +31.25% +2976 NOISE
codedb_edit 6100 6092 -0.13% -8 OK
codedb_find 59320 60147 +1.39% +827 OK
codedb_hot 95505 97709 +2.31% +2204 OK
codedb_outline 281129 279391 -0.62% -1738 OK
codedb_read 89775 98281 +9.47% +8506 OK
codedb_search 172990 175989 +1.73% +2999 OK
codedb_snapshot 267787 265490 -0.86% -2297 OK
codedb_status 209206 206516 -1.29% -2690 OK
codedb_symbol 58257 60113 +3.19% +1856 OK
codedb_tree 47786 46269 -3.17% -1517 OK
codedb_word 65782 68924 +4.78% +3142 OK

@justrach justrach deleted the release/0.2.5795 branch May 21, 2026 06:33
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.

Agent Context Planner: make codedb_query the reliable context assembly path

1 participant