fix(chunks): 流水线重写后的检索结果不用位置匹配 - #2558
Merged
Merged
Conversation
mdrkrg
force-pushed
the
fix/chunk-edit-partial-downgrade
branch
from
August 6, 2026 04:39
9f02b24 to
1840494
Compare
Pipeline-replaced content (parent or neighbor expansion) must not trust stale coordinates even when the replacement satisfies the length invariant, and must not extend the merged group's range.
mdrkrg
force-pushed
the
fix/chunk-edit-partial-downgrade
branch
from
August 6, 2026 05:15
1840494 to
ff423b4
Compare
Parent and neighbor expansion replace Content after retrieval. Without a marker their stale coordinates could be incorrectly trusted. Ensure ContentRewritten is false in chunkTrusted.
mdrkrg
force-pushed
the
fix/chunk-edit-partial-downgrade
branch
from
August 6, 2026 05:16
ff423b4 to
5d22a42
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.
Description
parent/邻居展开会替换检索结果的
Content但不更新StartAt/EndAt,而chunkTrusted此前仅靠长度恒等式意外拦截。
新增内部字段
ContentRewritten,chunkTrusted检查该字段,凡是展开过的结果一律显式标记、不再信任位置。Type of Change
Related Issue
Fixes #
Testing
新增
TestGroupAndMerge_RewrittenResultDoesNotTrustCoordinatesChecklist
git diff --check origin/main...HEADpassesgolangci-lint run --new-from-rev=origin/main ./...)docs/, Swagger annotations, etc.)Screenshots / Recordings