fix(group-chat): separate UI history from model context#1678
Open
hanzckernel wants to merge 3 commits into
Open
fix(group-chat): separate UI history from model context#1678hanzckernel wants to merge 3 commits into
hanzckernel wants to merge 3 commits into
Conversation
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.
改动说明
这个 PR 是 group-chat context/routing hardening stack 的第 1 个切片:只处理历史读取、上下文窗口和 canonical ordering。
主要变化:
设计取舍
limit是 UI page 的目标值,不是硬上限;保持 tool run 完整比严格 message count 更重要。/chat-run行为。验证
npm run harness:checknpm run test -- tests/server/group-chat-history-window.test.ts tests/server/group-chat-context-cache.test.ts tests/server/group-chat-context-projection.test.ts tests/server/group-chat-mention-routing.test.ts tests/server/group-chat-agent-instructions.test.ts tests/server/group-chat-clear-context-inflight.test.ts tests/server/context-engine.test.ts tests/server/group-chat-member-sync.test.tsnpx tsc --noEmit -p packages/server/tsconfig.jsonnpm run build本地结果:78 tests passed;build passed。
group-chat-member-sync.test.ts中 mocked runtime failure 的 stderr 是预期测试输出。Review request
请重点确认:UI pagination 为了保持 assistant/tool-run 完整而把 limit 作为 soft target 是否可接受。