Repository navigation
fix: reconcile the line-number convention — chunkers emit 1-based, responses pass through - #347
Merged
Merged
Conversation
…sponses pass through The PR #308 merge combined two internally-consistent conventions into an inconsistent tree: develop's chunkers emit 1-based editor lines (the find -> find_impact position round-trip fix), while the pilot batch's emit boundaries added +1 on top of the then-0-based chunkers. Every response reported line N as N+1 for real chunks, and get_chunk's context_before included the chunk's own first line. Reconciled to: chunker emits 1-based, emit boundaries pass through. - stripped the +1 at all 22 emit sites (find, explore, get_chunk, graph, search funnel, CLI renderer) — all introduced by the pilot batch, verified against both parents - get_chunk's context windows restored to the 1-based reading (the before-window's saturating_sub(1) was correct all along; the pin test had hand-built a 0-based fixture no real chunk matches) - response-level fixtures moved to 1-based values so they represent real chunks - Chunk doc comment now states the shipped convention - new end-to-end test ties the real SemanticChunker to the get_chunk response (producer and emitter can no longer drift apart silently) - CHANGELOG entry describes the shipped mechanism
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.
Follow-up to PR #308's merge: the merge combined two internally-consistent line conventions into an inconsistent tree. develop's chunkers emit 1-based editor lines (the find → find_impact position round-trip fix, PR #313), while the pilot batch's emit boundaries added +1 on top of the then-0-based chunkers. Result: every response reported line N as N+1 for real chunks, and
get_chunk'scontext_beforeincluded the chunk's own first line — re-breaking the exact live workflow PR #313 fixed.Reconciled to: chunker emits 1-based, emit boundaries pass through.
get_chunk's context windows restored to the 1-based reading; the pin test had hand-built a 0-based fixture no real chunk matches.Chunkdoc comment now states the shipped convention.SemanticChunkerto theget_chunkresponse, so producer and emitter can no longer drift apart silently (the two green-but-contradictory test halves could not see this bug).Validation: fmt clean, clippy
--all-targets -D warningsclean,cargo test --lib --binsfully green.