Repository navigation
fix(tier2): bound embedding chunks and preserve source evidence - #227
Conversation
Signed-off-by: Christopher Kevin <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
Automated review: 3 findings (0 P1, 1 P2, 2 P3); 3 posted inline.
Reviewed at 74a2e03. The core bound in _bounded_pieces is correct: over 3,000 random inputs (CJK, emoji, long lines) every piece is at most 3,000 characters and the split is lossless apart from whitespace. 11 of the 12 new chunk-bound tests fail on main. The comments below are about the paragraph path for oversized Markdown sections and about how split pieces show up in findings and docs.
…rces once Short paragraphs of an oversized Markdown section stay attached to a neighbour, pieces share the section's split group, and clusters merge sibling pieces into one location with the merged line range. Signed-off-by: Christopher Kevin <[email protected]>
…lic-dedup-chunk-bounds Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
Reviewed the complete diff and all review threads/replies. Verified the three earlier findings are addressed: oversized Markdown paragraphs are packed with shared sibling identity; clusters merge split sources for one displayed location; documentation reflects packing and the 3,000-character input cap. Merged current main (935b162), preserving both CHANGELOG sides. Also reproduced and fixed a source-evidence regression: a short packed tail after blank lines reported line 4 instead of actual line 102; paragraph packing now preserves source line gaps. The added regression failed before the fix. Validation: deduplication suite 169 passed, 1 skipped; Ruff across src/tests and git diff --check passed; wheel/sdist build passed. Approval applies to cdeca42; GitHub checks may still be running after this push.
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
Reviewed the refresh against main at 618fc0f. The sole conflict was CHANGELOG.md; the resolution retains both the bounded-chunk/source-evidence note and all upstream release notes. The existing 3,000-character bound, independent-copy clustering, and source-gap fix are preserved unchanged. Independent review confirmed the resolution.
Validation: affected deduplication tests completed successfully within the broader deduplication/embedding run (330 passed, 2 skipped before that broader run was interrupted during unrelated filesystem-heavy cases). Its sole failure was the sandbox rejecting the Unix-socket fixture at socket.bind; that exact test passed outside the sandbox. The direct packed-tail check retains source line 102 with two inputs of at most 2,998 characters. Ruff over src/tests, whitespace checks, and wheel/source-distribution builds passed. GitHub reports this exact head mergeable; CI is rerunning.
* fix(tier2): bound embedding chunks and preserve source evidence * fix(tier2): pack oversized sections by paragraph and report split sources once Signed-off-by: Christopher Kevin <[email protected]>
* fix(tier2): retain source gaps when packing bounded chunks Signed-off-by: Narendran Raghavan <[email protected]>
Summary
A long table, Python docstring or shell function can become one oversized embedding input, causing a provider context-limit rejection. Cap each intra-skill input at 3,000 characters, retain meaningful short tails and correct source ranges, and keep sibling pieces from becoming duplicate findings with each other. Independent copies still participate in clustering. Existing Markdown fence handling and scan budgets remain intact.
Verification
The HTTP fixture verifies request boundaries and output behavior, not embedding quality or live model-provider acceptance. Public provider credentials were unavailable; no live provider or GPU evaluation is claimed.
Release Impact
CHANGELOG.mdand the Tier 2 guide.CI status
The existing HTML parser compatibility matrix cannot install Python 3.12.11 or 3.13.5 on the current
ubuntu-latestUbuntu 26.04 runner. These jobs fail during Python setup, before tests execute. The workflow is unchanged by this PR; this remains a CI blocker, and the PR stays draft.