Repository navigation
fix(lark): progress 消息不再显示轮次完成 - #2056
Merged
deepcoldy merged 2 commits intoOct 21, 2026
Merged
Conversation
Co-authored-by: TRAE CLI <[email protected]>
zsnjuts
requested review from
47seek,
LucasIcarus,
deepcoldy,
xiaoxueSunn and
xiongz-c
as code owners
October 20, 2026 12:27
上一提交让 progress/auxiliary 载体不再被机械盖完成页脚,但终态判定只在 turn_terminal 的同步段做一次:worker 保证 final_output 先于 turn_terminal 排队,daemon 侧兜底 final 的 carrier 却要等飞书发送往返之后才落账,于是 「中途发 progress、结尾由 transcript 兜底完整答复」这一目标场景下,终态 闸门在 terminal 到达时只看到 interim carrier 便永久关闭(连投递 drain 都 不进),最终答复卡确定性少一行 completed 页脚,与「兜底 final 仍显示完成 页脚」的既有合同不符。 - 抽出 terminalReceiptRouteEligible 门禁与 interimCarrierOnly 判定; - interim-only 时不做同步决策、不提前 claim:先等本轮 final-output drain, 重读 carrier——落账的 final 照常补 completed 页脚(补丁/终态条路由与即时 路径共用),仍是 interim 或没有兜底 final 则保持不盖章、不留 claim; - 终态载体路由抽成 routeAfterDrain,即时路径的同步 claim 与既有行为不变。 测试新增「progress → 兜底 final 发送在途 → turn_terminal 同 tick」最终卡 带页脚用例,以及无兜底 final 时 interim 卡保持无页脚(含裸 completed 终态 形状)两条参数化用例;四枪变异(删延后分支/不校验 final 身份/提前 claim/ 不等 drain)分别精确杀 1/4/5/1 条用例。 Co-Authored-By: Claude Code <[email protected]>
Owner
|
感谢贡献,已合入 🎉 这个修复解决了一个很实际的误导问题:长任务中途用 评审中发现一个同路径的确定性收尾缺口:中途发过 progress、结尾由 transcript 兜底出完整答复时,兜底 final 卡也应补完成页脚(worker 的 final_output 先于 turn_terminal 排队,而 daemon 在飞书发送往返后才记到 final carrier)。已在本分支上追加了一个收尾提交:interim-only 时先等本轮投递 drain、重读 carrier 再决定是否补页脚,无兜底 final 则保持不盖章且不留痕迹。 评审里记录的两处非阻断清理(carrier 类型重复定义、兜底路径手写 再次感谢,欢迎继续贡献。 |
This was referenced Oct 21, 2026
Merged
|
🚀 Released in v3.49.0 |
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 send会把未显式声明的普通发送归类为progress,并把responseKind持久化到 turn-sends journal。worker 也会把该字段随explicit_reply_observed上报。但 daemon 原先只记录
messageId + terminalCarrier,丢弃了responseKind。因此只要随后收到turn_terminal(status=completed),最后一张 progress 卡也会被当作 final 载体,页脚被机械追加:这会把阶段进度误报成任务完成,长程任务中尤其容易误导用户。
修复
responseKind。progress/auxiliary只作为可见的非 final 输出,不再触发 completed footer 或独立终态条。final是权威完成载体;后续 supplemental progress/auxiliary 不会抢走它。final。responseKind时沿用历史 final 行为。影响面
改动位于公共
worker-pool终态投影路径,影响使用 legacy/send 回复卡的各 CLI 与本地后端。以下合同保持不变:BOTMUX_NOTHING_TO_SEND仍显示 silent terminal receipt。验证
自动化
bun run test -- test/turn-terminal-receipt.test.ts:31/31bun run test -- test/cli-send-reply-card.test.ts:52/52bun run build:TypeScript、scripts/test mocks、dashboard bundle、dist/embedded assets 审计全部通过真实飞书 E2E
在隔离测试话题上先用同一 runtime build 复现,再切换到“原基线 + 本修复”验证:
服务端原始 Card JSON 回读确认:修复后的 progress 卡
hasCompleted=false,final 卡hasCompleted=true。测试结束后已关闭精确测试 Session,并恢复测试机原 runtime build。