Repository navigation
fix(groups): curb wasted group wakes, relay fan-out, and oversized context #1713
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
iruriQ
merged 11 commits into
BytePioneer-AI:main
from
lonehsigle:fix/group-chat-quota-guards
Dec 6, 2026
+2,987
−91
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
fda7395
fix(groups): curb wasted group wakes, relay fan-out, and oversized co…
aafb043
fix(groups): address review feedback on stop races, relay budget, tru…
8d4dbf7
fix(groups): sync group chat architecture doc and tighten stop/packin…
d9c9034
fix(groups): re-acquire consistent observer stop token with matching …
b0bd7e6
chore(groups): merge upstream/main and resolve group-chat conflicts
5793303
chore(groups): merge latest upstream/main (7fac8d965) and align hando…
9688df8
fix(groups): harden stop sequencing, retry UI, context truncation, an…
b7c30e1
Merge remote-tracking branch 'upstream/main' into fix/group-chat-quot…
6051ed1
fix(groups): tighten stop turn capture, current-epoch budget protecti…
9c4b630
fix(groups): synchronously inspect already-retained sessions on click…
597963d
Merge remote-tracking branch 'upstream/main' into fix/group-chat-quot…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: BytePioneer-AI/codex-host
Length of output: 21168
Script executed:
Repository: BytePioneer-AI/codex-host
Length of output: 10254
Script executed:
Repository: BytePioneer-AI/codex-host
Length of output: 3765
单成员或全部停止可能中断同一线程中新开始的 Turn。
前端在调用
cancel()前,只检查旧 Turn 是否仍开放。取消请求只携带sessionId,不携带 Turn 标识。Host 在处理请求时才选择目标 Turn:session/cancel读取当前活动 Turn 并中断它(packages/web-server/src/ch-sessions.ts:2850-2865)。远端路径也在派发时读取状态(packages/web-server/src/remote-sessions.ts:3784-3792)。若旧 Turn 在本地检查后结束,且同一线程随即开始新 Turn,Host 可能中断新 Turn。这会取消用户未选择的工作。
修复需要让取消请求绑定到已确认的 Turn。Host 必须只中断该 Turn;若当前 Turn 已变化,则拒绝或不执行中断。当前
SessionCancelRequest只包含sessionId,不能表达这一约束,因此需要同时调整会话契约和 Host 的session/cancel处理逻辑。There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acknowledged and documented in
6051ed173(docs/architecture/multi-harness-group-chat.md). Currently, the shareddsh-sessionevent stream only exposes a synthetic sequential{ turn: number }onturn/start(not the Host's nativeturnId), andSessionCancelRequestis a code-generated shared session contract across localch-sessions,remote-sessions, and legacy peer compatibility. Extending the session event stream andsession/cancelwire contract to enforce server-sideturnId-scoped interrupts is a cross-cutting protocol change best tracked separately from this group-chat quota-guard PR; for now, the client performs synchronous click-timeturnKeycapture and pre-cancel verification and documents the remaining session-scoped RPC boundary explicitly.