fix: get_symbol_detail returns source for branch/tag refs (Phase 0)#6
Merged
Conversation
2 tasks
7ec0ba6 to
cd0b916
Compare
Read symbol source from the overlay-resolved file_contents row instead of the on-disk working tree (always on main), so non-main refs no longer return source_code: null. Removes the disk dependency; metadata-only files still return null source.
cd0b916 to
9e8cae2
Compare
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
Phase 0 of the tagged-release full-indexing design.
get_symbol_detailpreviously read a symbol's source from the on-disk clone working tree (always checked out tomain) viareadSourceLines, so querying a symbol on any non-mainref returnedsource_code: null.file_contents.contentfor the file theeffective_filesoverlay CTE already resolves per ref, slicing[start_line, end_line]in Java via a newsliceLineshelper. Works uniformly formain, branches, and tags.readSourceLinesdeleted, plus three now-orphaned imports). Metadata-only files (binary/oversized → nofile_contentsrow) still correctly returnnullsource.Delivers the "read the suspect symbol" step of the no-local-checkout debugging workflow on its own.
Test Plan
Four TDD integration tests added to
BranchQueryTest(Testcontainers):mainfilenullsource for a metadata-only file (no content row)./gradlew build→ BUILD SUCCESSFUL (12 tests, 0 failures).🤖 Generated with Claude Code