Repository navigation
fix(cli): distinguish query lookup errors from empty callers - #74
Merged
knight22-21 merged 1 commit intoOct 10, 2026
Merged
knight22-21 merged 1 commit into
knight22-21 merged 1 commit into
Conversation
sundaysebasidian-byte
marked this pull request as ready for review
October 4, 2026 01:59
knight22-21
approved these changes
Oct 10, 2026
knight22-21
left a comment
Owner
There was a problem hiding this comment.
LGTM! Excellent work sharing the file resolver between CLI and MCP, properly surfacing query lookup errors with candidate hints.
Owner
|
Merged, thank you @sundaysebasidian-byte! This properly distinguishes query lookup errors from true zero-caller results and aligns the CLI experience with the MCP server. |
9 of 13 tasks
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
Closes #44.
callerscurrently exits successfully with "No callers found" for an unindexed file, an ambiguous path or a missing symbol, making those errors indistinguishable from a found symbol with zero callers. Share the existing MCP file resolver inQueryEngineand reuse it incallers,context,impactandsummary. Lookup errors now go to stderr with exit 1; ambiguous paths include sorted candidate paths and the existing longer-path hint. A found symbol with zero callers still succeeds, and the MCP error response contract remains unchanged.Update the documented CLI behavior and changelog. Add 21 cases using real temporary Python indexes and SQLite storage, covering missing/ambiguous input, missing symbols, zero callers, actual callers, project-relative resolution from a different working directory, and the shared MCP response contract.
Type of change
How was it tested?
Checks ran on macOS with the existing Python 3.14.6 development environment, against main
6ee2ff6251af85f32dce90320b5ed956b98b1fa3:python -m pytest tests/ -q --cov=codeprism --cov-report=term-missing --cov-fail-under=80 --tb=short: 785 passed, 1 skipped; total coverage 89.18%.ruff check codeprism/ tests/andruff format --check codeprism/ tests/: passed.--follow-imports=silentretain the same 34 pre-existing upstream diagnostics after normalizing line offsets; no new diagnostics, including in the new test file.Checklist
ruff checkandruff format --checkpass.mypyerrors in the files changed.docs/changelog.mdupdated.Notes for reviewers
AI assistance: implementation, tests and documentation were prepared with Codex and independently reviewed by a separate Codex agent. No dependencies were added or installed. Python 3.12/3.13 and Windows were not run locally; assess those separately from CI or platform testing. Mypy is not fully green upstream; the check above verifies that this change does not add diagnostics in touched files.