fix(report): 继承自然会话位置并兼容跨机器回传 - #690
Open
Gundam98 wants to merge 1 commit into
Open
Conversation
Gundam98
marked this pull request as ready for review
July 31, 2026 15:25
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.
背景
botmux report同时承担“唤醒原 Reviewer / orchestrator”和“决定消息可见落点”两项职责。此前在没有 dispatch registry 时固定回退群顶层,导致从话题中发起的普通开发 Review、返工或复审脱离原对话;但 legacy / 跨机器--botdispatch 又必须保留无 registry 时回到群顶层的兼容行为。根因
report 的接收者与消息落点耦合,且无 registry 的普通 report 和跨机器 legacy dispatch 缺少可区分的路由信号,因此无法同时满足自然会话继承和旧 dispatch 回传语义。
改动
--into/--top-level→ dispatch registry → legacy dispatch 顶层回退 → 当前轮次位置 → 会话安全默认。currentReplyTarget,并校验其turnId与当前轮次一致,避免旧话题目标污染新一轮 report。--legacy-dispatch标记:本机 registry 命中时仍回原 orchestrator session,无 registry 时保持群顶层兼容回退;尾置形式兼容旧版 parser 对正文的读取。delivery、recipient、placementSource与messageTarget。用户影响
验证
pnpm vitest run --project unit test/dispatch.test.ts test/reply-target-fallback.test.ts test/session-marker-resolve.test.ts:106/106 通过。pnpm exec tsc --noEmit:通过。pnpm build:通过,runtime build idf3fa843a3356。node dist/cli.js report --help:通过。git diff --check:通过。已知限制