Skip to content

fix(chunks): 流水线重写后的检索结果不用位置匹配 - #2558

Merged
lyingbug merged 3 commits into
Tencent:mainfrom
mdrkrg:fix/chunk-edit-partial-downgrade
Aug 6, 2026
Merged

fix(chunks): 流水线重写后的检索结果不用位置匹配#2558
lyingbug merged 3 commits into
Tencent:mainfrom
mdrkrg:fix/chunk-edit-partial-downgrade

Conversation

@mdrkrg

@mdrkrg mdrkrg commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description

parent/邻居展开会替换检索结果的 Content 但不更新 StartAt/EndAt,而 chunkTrusted
此前仅靠长度恒等式意外拦截。

新增内部字段 ContentRewrittenchunkTrusted 检查该字段,凡是展开过的结果一律显式标记、不再信任位置。

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📚 Documentation update
  • 🎨 Refactor
  • ⚡ Performance improvement
  • 🧪 Test
  • 🔧 Configuration / Build / CI

Related Issue

Fixes #

Testing

新增 TestGroupAndMerge_RewrittenResultDoesNotTrustCoordinates

Checklist

  • git diff --check origin/main...HEAD passes
  • Changed source files are formatted
  • Targeted tests for the changed packages/components pass
  • Diff-scoped lint passes where applicable (for Go: golangci-lint run --new-from-rev=origin/main ./...)
  • Full-repository checks were run, or any unrelated/environment-dependent failures are documented above
  • Self-reviewed the code
  • Added/updated tests covering the change
  • Updated related documentation (README, docs/, Swagger annotations, etc.)
  • Breaking changes are clearly called out in the description above

Screenshots / Recordings

@mdrkrg
mdrkrg force-pushed the fix/chunk-edit-partial-downgrade branch from 9f02b24 to 1840494 Compare August 6, 2026 04:39
mdrkrg added 2 commits August 6, 2026 13:15
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
mdrkrg force-pushed the fix/chunk-edit-partial-downgrade branch from 1840494 to ff423b4 Compare August 6, 2026 05:15
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
mdrkrg force-pushed the fix/chunk-edit-partial-downgrade branch from ff423b4 to 5d22a42 Compare August 6, 2026 05:16
@mdrkrg mdrkrg changed the title fix(chunks): 修复受信任分块可能导致内容缺失的问题 fix(chunks): 流水线重写后的检索结果不用位置匹配 Aug 6, 2026
@lyingbug
lyingbug merged commit 0a3f6b0 into Tencent:main Aug 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants