Repository navigation
Conversation
回报唤醒一律带 suppressFinalOutput。共享会话会把上一则真人话题继承到这条合成回合,/api/trigger 没有 stableTurnId,因此只丢掉转录兜底,显式 botmux send 仍会发出。 同一回合已经用 --response-kind final 发到同群另一个话题时,当前锚点上的终端文字不再补成第二张卡。跨群、dispatch_report、只发了 progress、以及本轮没发 final 时,兜底保持原样。失败通知仍要求落到本话题。 统一回复卡的「正在处理你的请求…」在捕获身份还是别的回合时先不发,等 capture_identity 切到本回合再发。从未开跑的 type-ahead 不会留下卡片。 测试: bun x vitest run --project unit test/report-session-relay.test.ts test/bridge-fallback-gate.test.ts test/trigger-session-turn-idempotency.test.ts test/zero-prompt-relay-integration.test.ts test/recall-frozen-cards.test.ts 412 passed。 node scripts/tsc.mjs -p tsconfig.typecheck.json 通过。 bun run build 通过。
xushulong-solo
requested review from
47seek,
LucasIcarus,
deepcoldy,
xiaoxueSunn and
xiongz-c
as code owners
November 13, 2026 01:52
Contributor
Author
|
礼貌跟进一下本 PR:
|
capture_identity 释放的统一回复占位卡与准入时发布走同一个跟踪器,避免后续思考消息抢在占位卡前创建。回归用例先控制占位卡发布悬置,验证等待关系存在并在发布后清空;该断言在未接入跟踪器时失败。 Co-Authored-By: Kimi Code <[email protected]>
deepcoldy
reviewed
Nov 19, 2026
Owner
There was a problem hiding this comment.
自动评审结论:修后可合。原 head 0d07e1240 的 1 个合前必修问题和 1 个同主题 P3 均已修复;当前 head 为 85bfd40df87a485c0861b68eff3123c93dba88c4。本地验证通过,仍需当前 head 的首跑 CI 全绿及维护者复核后再合入。
- 基线:最终合入
origin/master602e7cf56b36dc22e391e2b29e7e614a4c010d48,无冲突;最终 tree 为ceeb1a4fb273be2c62db6ac3516a392261362ff6。 - 合前必修问题:
src/core/worker-pool.ts:21352附近,turn_input_committed在旧 capture identity 下通过{ kind: "start" }提前发布统一占位卡,绕过原 PR 的 deferred 机制。真实组件旧实现复现为 admission 0 次 POST、queue commit 后 1 次 POST;新增test/recall-frozen-cards.test.ts:857的真实 worker handler 回归也以“预期 0 次、实际 1 次start”咬红。现 queue commit 与 admission 共用同一 capture 门控。 - 相位与顺序:deferred release 改为 tracked
start。真实TurnReplyCardStore复验为 queue commit 后0 POST / queued,精确 capture 后1 POST / working,延长等待仍仅一张卡,探针退出码 0、stderr 为空。仅把 release 改回refresh时两项相位断言均失败。发布同时进入trackStartingCardPublication,避免后续原生思考消息抢在占位卡前创建。 - 其他变异复验:移除回报
suppressFinalOutput后 5 项失败;关闭同群跨话题 final 去重后 1 项失败;取消排队占位卡延后后 1 项失败。变异后源码均已还原。 - 最终验证:
bun run build、bun run typecheck通过;10 个相关 Vitest 文件共 702 项通过;2 个 Bun 原生测试文件共 247 项通过;还原最后一处变异后recall-frozen-cards86 项通过。 - 影响面:未新增配置、prompt 或常驻消息;回报与跨话题 final 属错误投递修复。未显式开启统一回复卡的现有配置不受占位卡时序变化影响。
这是自动评审的初步意见,最终以维护者审阅为准。
turn_input_committed 只代表 worker 队列已接收,可能早于 capture_identity 到达。旧路径会用 start 直接发布统一占位卡,使未开跑的 type-ahead 仍留下卡片。现在 queue commit 与 admission 共用同一 deferred 集,精确 capture 后以 start 释放 working 卡,并保留启动卡发布顺序跟踪。 真实 IPC 回归先验证旧 capture 下 queue commit 零更新,再验证精确 capture 后仅一次 start;旧实现在前一步产生一次 start。真实 TurnReplyCardStore 探针确认 commit 后保持 queued、零 POST,capture 后仅一张 working 卡。仅把 release 改回 refresh 时两项相位断言均失败。 Co-Authored-By: Kimi Code <[email protected]>
Owner
|
已合并,感谢贡献! 三个问题的修复(report 合成回合抑制兜底卡、同群跨话题 final 去重、排队占位卡延后到 capture_identity)连同评审中发现的 turn_input_committed 旁路修复都已随 #3433 落地。 一个非阻断 follow-up 供后续参考:worker-pool 中 deferredUnifiedReplyTurns 是每会话 32 条上限的内存 LRU,极端情况下(同一会话排队超过 32 个回合)最早入队的等待记录会被淘汰,对应回合只少一张中间占位卡,最终答复卡片不受影响;如后续观察到深排队场景再考虑收紧即可。 这是自动评审的初步意见,最终以维护者审阅为准。 |
This was referenced Nov 19, 2026
deepcoldy
pushed a commit
to Barrierml/botmux
that referenced
this pull request
Nov 19, 2026
修正上一 merge commit 的手工冲突解决错误(当时用 rebase 树覆盖了 auto-merge 结果,把 deepcoldy#3433/deepcoldy#3587/deepcoldy#3542/deepcoldy#3559 在重叠文件上的主干改动 一并回退,CI recall-frozen-cards/runtime-reservation 等 6 条失败): 1. 恢复主干:deepcoldy#3433 排队占位卡(postUnifiedReplyPlaceholder)、 deepcoldy#3587 unowned reservation 拒绝(startRefusal/ RuntimeReservationRefusedError)、deepcoldy#3542 Chrome node service、 deepcoldy#3559 内存告警 owner 私信的全部代码与测试。 2. boundary_unobserved 改凭 turn.terminalObserved 判定而非 !terminalOutcome:marker-less 旧 JSONL 靠下一回合 user 记录关单, queue 只置 terminalObserved 不写 terminalOutcome,旧条件会误标。 3. recordTerminalFailureStrict 抛错时保留 idempotentAsyncTurns 收敛标记,仅持久化成功后释放;否则重启后 durable 停留 pending、 无 worker-exit backstop,触发器永久 running。 测试:集成用例补 marker-less 边界(变异回 !terminalOutcome 咬红); async-terminal-settle 补 EIO 写入抛错保留收敛标记用例(变异把删除 移回 catch 外咬红);recall-frozen-cards、runtime-reservation 等 主干回归本地全绿。 Co-Authored-By: Claude Fable 5 <[email protected]>
|
🚀 Released in v3.59.21 |
6 tasks
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唤醒后误往旧真人话题补发兜底卡:群级主控(scope=chat)处理子任务botmux report唤醒属于合成回合,但会沿用会话上一次真人消息的话题锚点,且/api/trigger无stableTurnId。当模型未调用botmux send或仅在终端输出分析时,结构化转写兜底会把终端文字补发到无关的上一个真人话题。--response-kind final后仍在原锚点补发第二张卡:同一回合已通过botmux send --response-kind final向同群目标话题完成最终交付时,当前锚点上的终端文字仍被兜底补成重复卡片。capture_identity)仍归属前一回合时,后续排队回合立即发出统一回复占位卡;若该排队输入最终未实际进入捕获,会残留孤儿占位卡。改动说明
src/core/report-session-relay.ts:buildOrchestratorReportTrigger统一附带options: { suppressFinalOutput: true },仅抑制回报合成回合的转写兜底卡,不影响模型显式调用的botmux send投递。src/services/bridge-fallback-gate.ts、src/core/worker-pool.ts:当同一回合已通过--response-kind final成功投递至同群另一话题时抑制当前锚点的重复兜底卡;跨群、dispatch_report、仅发送progress、本轮未发送final以及失败告警通知均保持原行为不变。src/core/worker-pool.ts:新增unifiedReplyTurnNotCapturing与deferredUnifiedReplyTurns,在capture_identity仍属其他回合时暂缓发送统一回复占位卡,待capture_identity切换到本回合后再补发;从未开跑的排队回合不留残卡。影响范围评估
botmux report唤醒的群级/话题级主控回合、同群跨话题显式final投递以及排队输入(type-ahead)统一回复卡时机;普通单话题问答、跨群通知、progress进度汇报与异常失败兜底不受影响。report-session-relay、bridge-fallback-gate与worker-pool公共收口层,与具体 CLI 适配器及 PTY/Tmux 后端正交。测试验证
bun run typecheck bun run build bun x vitest run --project unit \ test/report-session-relay.test.ts \ test/bridge-fallback-gate.test.ts \ test/trigger-session-turn-idempotency.test.ts \ test/zero-prompt-relay-integration.test.ts \ test/recall-frozen-cards.test.ts \ test/turn-reply-card-runtime.test.ts \ test/test-hygiene.test.ts bun test test/bridge-fallback-gate.test.ts test/report-session-relay.test.tstypecheck、build(含audit:domains、audit-dist、audit-embed)全部通过;vitest7 个测试文件全部通过(含test-hygiene);bun test2 个文件 247 项断言全部通过。补充修复:延迟占位卡发布顺序
releaseDeferredUnifiedReplyCard的延迟发布未进入trackStartingCardPublication,后续原生思考消息可能抢在占位卡 POST 完成前创建。test/recall-frozen-cards.test.ts将占位卡发布保持 pending;旧实现的pendingStartingCardPublication(ds)为undefined,回归断言以expected undefined to be defined失败;接入跟踪后同一断言通过,并在发布完成后恢复undefined。src/core/worker-pool.ts复用现有发布跟踪器,不改变“未开跑回合不发卡”的语义。bun run build、bun run typecheck通过;10 个相关 Vitest 文件共 744 项通过;2 个 Bun 原生测试文件共 247 项通过。补充修复:queue commit 不得绕过 capture 门控
turn_input_committed只代表 worker 队列已接收,可能早于capture_identity。原实现经{ kind: "start" }直接发布统一卡,导致未开跑的 type-ahead 仍留下占位卡。start”失败。start释放 working 卡。仅把 release 改回refresh时,两项相位断言均失败。replies: 0、phase: "queued";精确 capture 后replies: 1、phase: "working",延长等待仍只有一张卡,探针退出码 0、stderr 为空。origin/master602e7cf56b36dc22e391e2b29e7e614a4c010d48无冲突;最终树为ceeb1a4fb273be2c62db6ac3516a392261362ff6。bun run build、bun run typecheck通过;10 个相关 Vitest 文件共 702 项通过;2 个 Bun 原生测试文件共 247 项通过。