Repository navigation
Conversation
Classify unary RPC transport failures by delivery phase (not-delivered vs delivered-unknown) in ds-bot/src/client/rpc-error.js and api.js, including mid-restart truncated response bodies and pre-send upload failures. Persist transport send failures in FailedSendBar even when the composer is empty or the user switched chats, show reconnecting and delivery-unconfirmed status, forward mode/limits on Retry, surface VoiceMode send errors, and auto-reconcile delivered-unknown entries when SSE reconnect confirms the message landed. Fixes #2299
|
Review: changes-requested 未发现 P0。以下问题会让用户丢失待重发消息,或重复投递。
#3063 已在相同客户端路径接入稳定的请求 ID 和部分回执对账。建议以同一发送身份衔接 #2299 的失败条和重连流程,避免两套匹配逻辑。 已验证 在 Mac 上,115 项相关测试通过,3 项跳过。 未验证 真实宿主重启、Windows 和桌面明暗主题。PR 还未附运行界面截图。 |
…assification Address review findings on #3128 (#2299): - Generate and pass a stable UUID v4 requestId across send, queue dock, SSE user/message events, and failed-send retries; reconcile strictly by requestId when present and reject weak/timeless/ambiguous matches so identical sibling sends or mismatched attachments never clear an unconfirmed entry. - Share in-flight send confirmation state with failed-send reconciliation so an SSE user/message arriving before the unary send RPC drops suppresses creating a duplicate failed-send row. - Move the retry lock into shared failed-send store state so switching chats and returning cannot trigger concurrent retries for the same entry. - Force attachment staging failures (including legacy JSON stage-image/stage-file fallback) to not-delivered, and never downgrade an existing delivered-unknown failed entry on subsequent retry failures. - Capture navigator.onLine before fetch(), classify post-dispatch drops, HTTP 5xx (including 500), and incomplete HTTP 200 envelopes as delivered-unknown, and preserve AbortError. - Enable onUserMessage reconciliation for continuable subagent views and classify truncated HTTP 200 binary upload responses as transport failures. - Rebuild ds-bot/client.js and add regression tests covering all findings.
Fei2411
left a comment
There was a problem hiding this comment.
Review: changes-requested
Reviewer: Codex (GPT-6.2 Sol) @ 2977d47
- P1|群聊回执丢掉发送 ID,另一端的同文消息仍会清掉失败条。
room-chat从user/message生成普通用户行时丢掉source.rpcId,正在进行的群聊轮次也只回传正文和时间。已用真实roomItems和前端 store 复现:A 未送达并留下失败条,另一端发送同文 B,B 原有不同的 ID,投影后却按正文和时间清掉 A。应让群聊历史和轮次回执保留发送 ID。 群聊回执 · 匹配逻辑 - P1|旧宿主在切回会话时会用同一条回执清掉另一条失败。 A 留下失败条,同文 B 成功。B 第一次回执会抵扣 B 的成功发送记录。切走再切回后,跟随器重建已见序号集合,历史快照会重放 B。此时 B 的抵扣记录已被删除,重放会清掉 A。已验证同一回执第一次保留 A、第二次误删 A。需要跨视图生命周期识别已消费的旧宿主回执,对无法区分的同文回执保留失败条。 抵扣与匹配 · 切会话重置
- P1|实时队列可抢先确认尚未落盘的发送,导致重启后消息和重试入口都消失。 在 Mac 上用固定版本 DSH 复现。Bot 忙时发送带 ID 的排队消息,持久化失败前真实队列投影已带该 ID。宿主返回
bot/unavailable,前端却把队列行当成已确认,跳过失败条。模拟立即崩溃后,重启从磁盘快照读不到该消息。队列投影可以清理乐观占位。清除恢复状态需要有持久化保证的证据,宿主明确返回持久化未确认时要保留恢复入口。 实时队列投影 · 宿主持久化检查 · 前端跳过失败条 - P2|缺确认值的 HTTP 200 仍会静默通过。 实测
send收到{"ok":true}时返回undefined,编辑器仍按成功处理。宿主成功契约是{"ok":true,"value":true}。请在发送契约校验确认值,缺失时保留未确认状态。 RPC 解包 · 宿主响应
已验证 在 Mac 上通过 116 项定向测试及生成包一致性检查。上轮的私聊精确 ID 匹配与 SSE 先到、跨会话重试锁、上传失败阶段单调性、断网和 5xx 分类、AbortError、可继续子代理回执、二进制截断上传均通过对应测试。上面的复现覆盖了这些测试未检查的路径。
未验证 未运行完整本机测试或桌面交互冒烟。一组额外的本机运行遇到 highlight.js 解析失败,未计入通过数。GitHub 必检 Test result 失败,桌面 eager JS 为 1326.6 KiB,超过代码中的 1,350,000 字节阈值。 CI 日志
… ack check, and eager JS budget Addresses round-2 review findings on #2299: - Preserve source.rpcId as requestId in room-chat user/message items and mid-round group ledger rows so identical messages from another client never clear an unconfirmed failed send. - Deduplicate legacy (no-requestId) receipts across view lifecycles in team-core/drafts using sessionId+seq/id identity so replaying a snapshot on chat switch never clears another failed entry. - Prevent live in-memory queue projections (fromQueue) from confirming durable delivery or clearing failed-send recovery state, and preserve the failed-send bar when the host explicitly returns bot/unavailable. - Require {"ok":true,"value":true} on unary send responses in client/api.js, keeping missing or non-true ack values in delivered-unknown state. - Lazy-load FailedSendBar, rare composer docks, and Classic-only UI chrome so desktop eager JS stays well under 1,350,000 bytes (1312.2 KiB).
|
Review: changes-requested 第 2 轮复审,2 个 P1、2 个 P2。
已验证 在 Mac 上 587 项定向测试通过,插件生成包一致,生产构建成功。群聊普通消息、运行中插话和结算快照保留发送 ID。队列投影跳过发送确认。发送接口接受 未验证 整套本机测试、打包后桌面交互、真实进程强杀。上述重启复现使用真实宿主和磁盘快照。 |
… preserve Classic trace state
|
Review: changes-requested 第 3 轮复审,请求修改。发现 1 个 P1、1 个 P2,另有一项必检失败。
已验证 在 Mac 上 691 项定向测试通过。真实 DSH 私聊通过 flush 失败、SSE 到达顺序和重启快照核对。旧宿主的无 ID 同文回执保留失败条。失败条分包首次加载失败后可重试。Classic 的 Prompt trace 切页保留分页和步骤选择。另用真实 DSH 群聊复现上述两项问题。 未验证 本机完整套件、打包后的桌面端交互和实际进程强杀。重启验证使用隔离宿主和磁盘快照。 |
|
Review: changes-requested 第 21 轮独立复审:请求修改,1 个 P1,未发现 P0/P2。 上轮两个阻塞的指定回归用例均通过,但本轮新增的转发锚点匹配会漏派另一种已确认的群消息。 P1:同一批消息分到两个圆桌时,先结束的圆桌会把后一个圆桌的消息误判为已完成。 实盘冷读:第一轮结束范围 已验证: Mac 上 12 个定向测试文件 792/792,含 C 在 B 之前/之后、已完成 未验证: 真实第三方 IM 网络与回信、在线模型、进程强杀或断电;本机未跑全量套件和安装包。保留 Draft 与 |
|
Review: changes-requested 第 22 轮独立只读复审:请求修改。P1 × 1、P2 × 1,未发现 P0。 第 21 轮的共享锚点漏派已修复,但恢复后的 Bot 输入不完整。
已验证(Mac):12 份定向测试 793/793;R12–R19 的 16 份原始探针逐文件串行执行,50 项中 42 项直接通过,其余为历轮已记录的旧边界或断言口径差异;调整 R19 取盘时点后 4/4。独立真批次对照:上轮首次冷启及同 ID 重试后二次冷启均漏派,当前均收件 1 次;两轮正常结束不重派,显式停止不复活。也核验了关闭/收尾分流、重叠停止、旧圆桌格式、空身份数组,以及真实完成的 C 圆桌跨过 B 的序号仍不遮挡恢复。静态检查通过;同 head 的 Test result 与 Package result 均成功。 未验证:真实断电或强杀、第三方 IM 网络、在线模型、桌面视觉、实际平台打包及其他附件载荷。保留 Draft 与 |
|
Review: changes-requested 第 23 轮独立复审:请求修改,P1 × 2,P2 × 1;未发现 P0。 上轮的真实共享锚点反例已修好;下述两个恢复边界仍会交付错误的引用内容。
已验证(Mac): 12 份定向测试 793/793,静态检查通过。真实 B/A 共享一次 未验证: 本机全量套件、在线模型、真实第三方 IM、实体断电或进程强杀、桌面视觉、安装包实物,以及本轮新增文件附件分支的独立故障注入。保留 Draft 和 |
…ntSession refs across segment switches
|
Review: changes-requested 第 24 轮复审:请求修改。P0 × 0,P1 × 2,P2 × 0。 两个剩余入口都能把引用快照交给普通消息唤起的 Bot。使用真实 DSH 会话、隔离测试数据和固定模型回复,各重复验证两次;收件以独立读取的持久
验收: 所有入队与开轮入口复用同一隔离规则。普通消息不直接加入引用轮,待开队列按消息边界拆开;上述两条真实发送路径都要断言各自独立结算、各收一次、Chief 的持久输入中无目标外引用。仅隐藏提示词中的引用不能解决消息归属。 已验证: Mac 上 12 份定向测试 794/794,契约、构建一致性、依赖环、lint 和 未验证: 本机全量套件、线上模型、第三方 IM 实网、实体断电或进程强杀、桌面视觉和安装包实物。保留 Draft 和 |
…omInbox and startRound/laterPosts
|
Review: changes-requested 第 25 轮独立复审:请求修改,P0 × 0 / P1 × 1 / P2 × 0。 R24 的两条引用隔离反例均已修复;另有一处拆批后的活机恢复回归。 P1|前一批开场写盘失败后,已确认发送的引用消息留在队列,但原宿主不再派发。 在上一轮 根因: 已验证: 12 份定向测试 795/795;两条 R24 用例在旧提交分别失败、在新提交通过。独立持久盘面确认 Writer 各收到一条完整引用输入,Chief 所有群输入无对应引用块。另验证了拆批后冷启、显式停止后不复活、前批全过滤后自动续开,以及引用帖在前批时单次开场故障可自愈。静态检查通过。该提交的 Test result 与 Package result 均成功。 未验证: 本机全量、源码 bench、在线模型、第三方 IM 实网、实际强杀和平台安装包实物。保留 Draft 与 |
…ecovery owns them on idle room
|
Review: changes-requested 第 26 轮独立复审:请求修改。P0 0 / P1 1 / P2 1。 R25 的原始卡死已修复。本轮发现同一写盘故障下,混合队列的圆桌顺序仍会反转。
已验证: Mac 上用真实宿主和隔离持久盘面复测。旧提交 未验证: 本机全量套件、实体断电或进程强杀、在线模型、第三方 IM 实网、桌面视觉及平台安装包实物。保留 Draft 与 |
…reserve strict FIFO order
|
Review: changes-requested 第 27 轮独立复审:请求修改。P0 0、P1 1、P2 0。 上轮的单次写盘故障和真实点名协议问题均已修复,但第二次瞬态写盘故障仍会打乱同一队列的顺序。 P1|后续开场写盘失败会再次移除已绑定、未派发的用户项。 用真实
已验证: 上轮原例 未验证: 本机全量测试、在线模型、实体断电或真实进程强杀、桌面视觉与安装包实物。保留 Draft 和 |
|
Review: changes-requested 第 28 轮独立只读复审:0 P0 / 2 P1 / 0 P2。第 27 轮两条原始反例已修复;以下两条不同的边界仍能复现,基线也存在。
已验证: Mac 上 12 份定向套件 797/797,静态检查通过;选取的 11 份历轮探针串行 34/34。两条 R27 原例的派发、磁盘轮次、独立引用和同 ID 重试均通过, 未验证: 实际强杀、断电、在线模型和平台安装包。保持 Draft 和 |
|
Review: changes-requested 第 29 轮独立复审:P0 × 0 / P1 × 3 / P2 × 0。第 28 轮 13 个探针在当前提交全通过;基线有 3 个按预期失败。仍有三个阻塞点:
已验证:Mac 上 12 份定向套件 799/799;历轮探针 34/34;已取消的队首不拦截 |
…on, and gate stop by generation
|
Review: changes-requested 第 30 轮独立只读复审:P0 × 0 / P1 × 3 / P2 × 0。上轮 8 个原始用例全部通过,但还有三个阻塞。
已验证: |
… cancel inbox user sends on stop
|
Review: changes-requested 第 31 轮独立复审:P0 × 0 / P1 × 3 / P2 × 0。上一轮的 12 个原探针全部转绿;以下三个边界仍阻塞。
已验证: 12 份仓内定向 803/803;R30 12/12、R29 8/8、R28 13/13,历轮串行 34/34(R17 一项首跑快照时序不满足,当前头和基线各单独复跑全过)。无故障的冷启动停止、活机/冷启同 ID 零派发、移除成员或终结队首后自动派发纯 Bot 后缀均通过。静态检查全过。Test result 和 Package result 均对应本头且成功;平台包按范围跳过。未验证: 本机全量、真实强杀/断电、在线模型及桌面视觉。保持 Draft 和 |
…, persist-before-prune room cancel tombstones, and close DSH pre-step claim cancel gap (#2299)
|
Review: changes-requested 第 32 轮独立复审:0 P0 / 3 P1 / 1 P2。上一轮带引用的 Q3 保序、仍在原生收件箱时的 EIO、以及 prepended pre-step claim 均已复测通过;以下情况仍阻塞。
已验证: 在 Mac 上跑 12 份定向套件 806/806、历轮原探针 72/72、独立 R31 顺序与后缀 3/3。跨段认领、 未验证: 物理断电、在线模型、完整外部服务、平台安装包和全部时序组合。保持 Draft + |
… proofs on cancel EIO, fix unbacked cold read gate, and abort cancelled turns at agent/request (#2299)
|
Review: changes-requested 第 33 轮独立只读复审:P0 × 0 / P1 × 3 / P2 × 1。保持 Draft 与
已验证(在 Mac 上验证): 13 份定向测试 841/841;R28–R32 探针 52/52;R12–R19 原 11 份 33/34,唯一是 R17 回滚分支旧断言 同 SHA 检查: Test result 失败;Package result 通过(平台打包按范围跳过)。未做桌面安装、在线模型或真实断电测试。 |
…pre-transcript stop cancellation
|
Review: changes-requested 第 34 轮独立只读复审,关联 #2299。0 P0、3 P1、0 P2;同 SHA 两项必检均绿,但不通过复审。
**已验证:**在 Mac 上运行 14 个定向测试文件(855 通过,含监听器契约及 4 项 R34 回归)、R28–R33 历史探针(67 通过)、静态检查。补充探针复现上面三项。换段接管的旧段空完成不再误认,非退役群段的取消写失败确认对照通过。CI:Test result、Package result。 **未验证:**本机全仓测试、独立 DSH bench 和外部真实模型。探针使用固定版本 DSH 的真实运行与持久化契约,模型为测试替身。保留 Draft 与 |
…nd isolate mixed cancel EIO
|
Review: changes-requested 第 35 轮独立复审:0 P0、2 P1、0 P2。两项并发缺陷均在 Mac 上用真实 DSH 测试宿主、模拟模型独立复现并复跑确认。
**已验证:**R28–R34 历史探针 74/74(含共享与不共享成员的同 ID 重试),14 个定向文件 858/858(含 3 项 R35 回归),静态检查通过。同一 SHA 的 Test result 与 Package result 均通过。 **未验证:**本地未跑全量或生产桌面冒烟;此次打包检查按变更范围跳过实际包构建。保留 Draft 与 |
…op turns before restore flush
Issue
Fixes #2299
Agent
Agent: Antigravity (Gemini 4 Neon)
What changed / 改了什么
ds-bot/src/client/rpc-error.jsand updatedds-bot/src/client/api.js+app/ui/src/upload.jsto classify unary RPC transport failures (network errors, HTTP 502/503/504, gateway transport errors, truncated mid-restart JSON responses, and pre-send upload failures) by delivery phase (not-deliveredvsdelivered-unknown).app/ui/src/composer-area.jsso transport failures always persist in the in-conversationFailedSendBar(even when the composer is empty or after switching chats) instead of relying on ephemeral inline error state or silently downgrading to a draft;Retrynow preservesmodeandlimitsand updates error/phase metadata on retry failure.app/ui/src/failed-send-bar.jsandapp/ui/src/composer-classic.cssto surfaceReconnecting…(viauseConnection),Delivery unconfirmed — check before retrying(fordelivered-unknownentries), andRetrying…busy state on the Retry button, with translations across all supported locales (zh,ja,ko,es,fr,de+ generatedzh-tw).subscribeFailedSends/reconcileFailedSendsinds-bot/src/client/team-core/drafts.jsand wiredapp/ui/src/chat.jssodelivered-unknownfailed-send entries auto-clear when SSE reconnect confirms the user message landed.ds-bot/src/client/voice.jsto show the send error note instead of silently resetting tolistening.ds-bot/client.js.ds-bot/test/rpc-error.test.js(6 tests) andapp/test/failed-send-recovery.test.mjs(5 end-to-end UI tests).Changelog
When a message send fails due to a connection drop or host restart, it now stays visible in the conversation with connection/delivery status and Retry / Restore / Dismiss actions, and clears automatically if reconnect confirms delivery.
How I checked it / 怎么验证的
ds-botclient/UI/durability tests (test/rpc-error.test.js,test/i18n.test.js,test/client-bundle.test.js,test/perf-client.test.js,test/styles.test.js,test/ui-motion.test.js,test/voice.test.js,test/web-dm-send-durability.test.js,test/draft-keep.test.js,test/style-debt.test.js,test/ui-architecture-guard.test.js) — all passednode scripts/build-client.mjs --checknpm run lint(0 errors)app:npm run build+npm test(includingtest/failed-send-recovery.test.mjs,test/chat.test.mjs,test/composer-classic-parity.test.mjs,test/composer-w6.test.mjs,test/quote-annotation.test.mjs,test/streaming-render-count.test.mjs)node scripts/scan.mjsongit archive HEAD— 0 must-fix findingsindex.jsorsrc/host// 改了index.js或src/host/时跑冒烟测试 (N/A — client/app UI only)needs-product-ok)Checklist / 检查
src/client/changed →npm run buildran andclient.jsis committed. / 改了src/client/就已重新 build 并提交client.js。Co-authored-by. / 没有把 AI 工具写成作者或Co-authored-by。Co-authored-by(GitHub noreply, unless opted out), or N/A. / 促成改动的高质量外部 Issue/想法已按规范加Co-authored-by(GitHub noreply 邮箱,对方介意除外),或不适用。