Repository navigation
Retain blank source lines between class members - #1156
Merged
Merged
Conversation
Class body reconstruction needs separator lines as well as declarations and methods. Keep those lines in retained source instead of returning an incomplete body. Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
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.
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
code.symbolcan reconstruct class bodies whose methods are separated by blank lines after the index re-chunks their source.Why
The chunker retained class declarations and method bodies but discarded blank separators between them. Body reconstruction requires every physical source line, so an uncapped class lookup returned a navigation card even when all nonblank source was indexed. Retain the separators at extraction rather than invent missing text during reads.
Scope and risk
The shared chunker retains uncovered whitespace inside class source spans. Whitespace outside containers keeps its existing handling. Skeleton generation and completeness checks are unchanged. Retaining source can add chunk rows and embedding work.
The diff includes regression coverage for two parser languages, LF and CRLF, and enabled or disabled leftover merging.
Compatibility, rollout and rollback
Tests
tests/unit/test_code_symbol_source_lines.py. Unit and integration tests were not run locally, as requested. The focused command for CI or another checkout ispython -m pytest tests/unit/test_code_symbol_source_lines.py -q.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated: Codex wrote the diff and checked the recorded source replay and static gates. A fresh agent reviews the pushed head before merge.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist