fix(#588): renderImportedBy honors the basename-ambiguity guard from #572#590
Merged
Merged
Conversation
…rts to every same-basename file Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… mirroring getImportedBy The #572 bundle added the same-basename ambiguity guard to getImportedBy (query-pipeline deps op) but renderImportedBy — the MCP codedb_deps reverse listing — kept the unconditional fallback, so a bare 'import conf' was still attributed to every indexed conf.py through the primary tool. Count same-basename outlines and skip the fallback when ambiguous, exactly like getImportedBy. Co-Authored-By: Claude Fable 5 <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.
Fixes #588.
The #572 bundle added the same-basename ambiguity guard to
getImportedBy/getImportedByFiltered(query-pipeline deps op), butrenderImportedBy— backing the main MCPcodedb_depsreverse listing — kept the unconditional basename fallback (explore.zig:3914). A bareimport confwas still attributed to every indexedconf.pythrough the primary tool while the pipeline op correctly suppressed it.Found by a focused defect review of the freshly-merged #572 bundle (9 other candidates investigated and cleared — incl. the codegraph literal-scanner boundary cases, the deps-arena UAF fix, the secret-filter fast path, and the import-cap widening).
Failing test committed red on merged HEAD (64/65 — importer attributed to both
a/conf.pyandb/conf.py); fix mirrorsgetImportedBy's guard; single-basename fallback behavior pinned by the same test. Full suite green.🤖 Generated with Claude Code