Repository navigation
Conversation
沿用语义消息的请求编号,避免监控上下文未注册时索引工作脱离原请求的等待范围;改写现有测试覆盖延迟写入、索引失败与并发隔离。
This branch has not been deployed
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
修复文件写入
wait=true提前报告索引完成的问题。例如创建一个文件:
{"uri":"viking://resources/docs/note.md","content":"hello","mode":"create","wait":true}vector_status: "complete",但这个文件的索引还没写完。开启 ACL 时,创建者紧接着查询文件权限,可能短暂收到 403。semantic_status: "complete"、vector_status: "complete";索引处理失败则返回vector_status: "failed"。原因是等待方使用原请求编号,但下游索引消息从后台监控上下文取编号。原请求的监控对象未注册时,两边编号不一致,等待方就漏掉了索引任务。本次让索引消息沿用上游语义消息已有的
telemetry_id,不再依赖监控对象是否注册。Human Involvement
Related Issue
无独立 Issue。此等待回归在 #3636 改为流式提交索引任务后暴露。
Type of Change
Changes Made
Testing
仅改写现有测试,没有新增测试文件或测试函数。
同一份延迟索引回归测试:修复前 main 的 4 个场景全部复现漏等;修复后全部通过。
基于已合入 restricted 模式的 main,153 项相关测试通过,包括文件创建后立即查询 ACL、restricted/inherit 切换、HTTP 写入和
wait=false。测试使用真实本地队列与存储、模拟模型输出;不是在线模型服务联调。
Ruff lint、
git diff --check通过。I have added tests that prove my fix is effective or that my feature works
New and existing unit tests pass locally with my changes
I have tested this on the following platforms:
Checklist
Screenshots (if applicable)
不适用。
Additional Notes
不修改 ACL 授权规则、公开 API 或消息 Schema,无需数据迁移。