Skip to content

feat(traex): recover failed image prompts with safe retry and editing - #3856

Merged
deepcoldy merged 11 commits into
deepcoldy:masterfrom
Sespeck:fix/traex-tool-image-recovery
Nov 27, 2026
Merged

deepcoldy merged 11 commits into
deepcoldy:masterfrom
Sespeck:fix/traex-tool-image-recovery

Conversation

@Sespeck

@Sespeck Sespeck commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Closes #3857

When TRAE fails to resolve an image, retrying the same saved history can fail repeatedly. This candidate adds an explicit tool-image repair and implements Retry / Edit prompt / Continue for a failed prompt, preserving the original conversation and checking whether any work ran before replaying it.

User flow

Implemented English Retry/Edit/Continue cards

  • Retry: if the input never reached the CLI, resend it once. If the native request failed without tools or assistant output, back up and restore the saved conversation boundary, resume the same session, then resend the original text and image once.
  • Edit prompt: open the original text on the same card. Keep the original image is selected by default; removal drops that prompt's image hints and replay attachments. Nothing is sent until Retry edited prompt is pressed. Replacement images arrive through a new message in the same topic.
  • Continue from current state: when work may have run, inspect the current state and avoid repeating completed actions. Conversation rollback cannot undo file edits, commits, or sent messages.
  • Remove tool images and continue: preserve the separate, explicitly triggered repair for image blocks already saved in earlier tool output. An unchanged invalid image may fail again; rolling back only the latest prompt cannot remove an earlier poisoned tool image.

The illustration uses the candidate's actual English card JSON and a synthetic image, rendered in an isolated headless Microsoft Edge profile. It is not a live Lark screenshot. Runtime text follows the bot's configured locale.

Implementation and review scope

The worker freezes the native session ID, byte offset, and prefix hash at the actual independent input-write boundary. No-work proof requires one exact user request followed by an ordered native error terminal, with no tools, assistant output, compaction, later input, external send marker, or conflicting generation/Web input. Unknown history fails closed.

Reads and cuts share one descriptor inside the pinned native sessions root. The preserved prefix remains byte-identical; cut bytes are backed up outside that root. Retry/Edit reuse operator permission checks, exact session/turn binding, cooldown and rejection rollback, process-exit proof, and exact resume. Editing retains the frozen caller/envelope and keeps the original card carrier for provenance checks.

Stop/new accepted input cancels a held retry. Failed or superseded replacement cannot submit it or leave it in the successor journal. Restoring a cut requires an unchanged native prefix and tail, preventing native response records from being mistaken for Claude metadata. The existing image-repair candidate also fixes Stop/new-input races during tool-image cleanup.

Please review the new Edit callback/form and TRAE transcript-repair policy. The error does not identify which saved tool image is bad, so the repair action removes all saved tool-image blocks after an explicit click, preserving user images, text, tool receipts, and original image files. This candidate is undeployed.

CI correction

The full CI suite exposed 42 failures in four existing worker fixtures. Their isolated scopes lacked the new image-recovery state or the continuation-lease constructor. The harnesses now include the worker's initially empty recovery state and resolve the real PurgeContinuationLease; the successful purge fixture uses a sandbox mode supported by its execution host.

Correction: b41c419. Expanded local verification on macOS: 892 Node tests passed, 2 existing skips, across 21 files; 177 Bun tests passed across eight isolated per-file processes. This includes every failing CI fixture and the new checkpoint, purge, and interrupt paths. The full CI run passed on this correction: all 15 checks are green, including all eight Node/Bun test shards and all three binary jobs.

Validation

  • bun run build: passed, including typecheck, dashboard bundle, and build audits.
  • bun run test -- <21 worker/recovery/transcript/test-hygiene files>: 892 passed, 2 existing skips on macOS arm64 / Bun 1.4.4. This covers actual native input-write checkpoint capture, the real worker rewind/restart/Stop paths, failed-respawn and successor-journal guards, edited image keep/remove, same-card editor behavior, permission and stale-card rejection, and existing Claude/Codex/TRAE behavior.
  • git diff --check: passed.

Native TRAE 0.216.0 in an isolated home accepts rollback of both a first prompt and a follow-up prompt. Native session IDs and transcript prefixes are unchanged; the follow-up retains one earlier completed turn. This uses a synthetic provider and makes no model request.

The English card preview was rendered and exercised in Microsoft Edge with an isolated temporary profile. Live Lark callbacks and the upstream image-upload service were not exercised.

Design details: prompt recovery and tool-image repair.

@Sespeck
Sespeck marked this pull request as ready for review November 26, 2026 08:49
@deepcoldy

Copy link
Copy Markdown
Owner

你好,这个 PR 的自动评审群已建。自动拉群暂时没找到你的飞书信息,麻烦把 GitHub 账号和飞书信息补进名单文档,补好后我们会拉你进群:https://bytedance.larkoffice.com/wiki/WJ1nwWbtxi89erkNGNbcgkt9nUe

(本条为自动流程发出的提示消息)

@deepcoldy

Copy link
Copy Markdown
Owner

你好,这个 PR 的自动评审群已建,麻烦点击链接加入群聊、查看评审意见并跟进后续修改:
https://applink.larkoffice.com/client/chat/chatter/add_by_link?link_token=f61jf3b3-66bd-43f8-8910-337c843dce62

另外你暂时不在自动拉群名单里,也可以把 GitHub 账号和飞书信息补进名单文档,补好后后续评审会自动拉你进群:https://bytedance.larkoffice.com/wiki/WJ1nwWbtxi89erkNGNbcgkt9nUe

(本条为自动流程发出的提示消息)

@deepcoldy deepcoldy left a comment •

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

复审结论:4 项阻断,不建议当前合入

复审对象是本地 0a8411b5。git range-diff b41c419c~3..b41c419c 1d4dd5bb..0a8411b5 三项均为 =,确认它与远端作者 head b41c419c 纯换基等价;工作树未保留任何探针改动。与评审时最新 origin/master 做 git merge-tree --write-tree 无冲突。

1. [阻断] strict retry 被取代后,已剪掉的失败输入不会恢复

位置:src/worker.ts:45068-45077,后续清理见 src/worker.ts:45225-45232。

cut 已落地后,如果另一 restart 使本次 respawn 变成 superseded,当前分支只执行 report('declined');strict 路径会删除 queued retry 并发送 turn_input_rejected,却没有 putBackFailedTurnCut,也没有把恢复责任移交给获胜 restart。下一次 settleFailedTurnRewindOffQueue(..., false) 只会记录“未恢复”。

**探针证据:**在现有 TRAE checkpoint worker transaction 真实 worker/文件夹具中执行 cutAfterExit → settle('superseded') → offQueue(..., false),重试已出队,但 rollout 仍只剩 prefix,原失败 user/error 后缀缺失。现有 worker-failed-turn-rewind.test.ts:898 只断言出队与 declined,没有断言 transcript 恢复,因而未咬住该数据丢失。

建议在获胜 CLI 已停止且可证明静默后恢复 cut,或把 cut/restore 状态显式移交给获胜 restart;不能只撤销输入。

2. [阻断] final/terminal 时序竞态会让实际失败卡缺少 Retry/Edit

位置:src/core/worker-pool.ts:33263-33269;记录仅在 terminal 回调中创建,见 src/daemon.ts:36449-36458。

失败 final_output 的渲染读取 ds.session.lastFailedTurn,但该记录由稍后的 turn_terminal 写入。final 已完成投递而 terminal 尚在异步 admission/持久化时,appendFailedPromptActions 只能原样返回;terminal 后也没有针对实际 final carrier 的补 patch。

**探针证据:**使用真实 daemon worker-pool 夹具:

  • final 先投递、terminal 后到的序列中,terminal 后已确认存在 directFailure + traexPromptCheckpoint 的 lastFailedTurn,但整个序列只有一张卡,且只有 purge_images_continue,没有 retry_turn / Edit。
  • final 与 terminal 背靠背到达的对照探针通过,说明这是时序竞态而非卡片构造器本身失效。

建议让失败 final 等 terminal 记录就绪后再渲染,或在 terminal 记录提交后重新读取并 patch 本轮实际 final 卡片。

3. [阻断] 冻结的 trustedCaller 没进入 live-worker IPC

位置:src/im/lark/card-handler.ts:4572-4587;真实丢弃点见 src/core/worker-pool.ts:19423-19450。

卡片处理器把 failedTurn.trustedCaller 放在 retryInput payload 上,但 live-worker 调用没有把它放进 opts.trustedCaller。sendWorkerInput 构造 IPC、准入账本和后续失败记录时只读取后者,不读取 normalized.trustedCaller。TRAE 又明确只支持 live worker,所以这不是 fork 冷门分支,而是新 Retry/Edit/Continue 的必经路径。

**探针证据:**卡片层探针确认 payload 保留 caller 而 opts 为 undefined;再用真实 sendWorkerInput 发送同一形态 payload,最终 worker message 只有 type/content/turnId,trustedCaller 完全缺失。保留文本 envelope 并不等于保留 runtime principal/taskContinuation 绑定。

建议在 resend/edit/continue 的 opts 中传递冻结 caller,或让 sendWorkerInput 显式、规范化地回退到 payload caller,并补最终 IPC 断言。

4. [阻断] 重复或被拒消息会误取消图片修复续跑

位置:src/worker.ts:46491-46494。

activeTranscriptImagePurge.cancel() 位于 ordinary-turn 去重、backpressure 和 cross-principal 拒绝之前。因此 ACK 丢失后的重复投递,或一条随后被准入拒绝的消息,都能撤销合法修复;它们并没有成为“新接受的 successor”。此共用分支同时影响新 TRAE 修复与既有 Claude 图片清理。

**探针证据:**在现有真实 worker handler + 假时钟夹具中,修复等待旧 CLI 退出时注入一条被 activeTurnBlocks 拒绝的消息。该消息自身收到 turn_input_rejected,但旧修复租约也被撤销;推进退出时钟后,retry-1 的最终 writes 仍为空。

建议把撤销移动到重复/准入检查之后,并且只在输入实际被接受为 successor 时执行;补充 committed/inflight duplicate 与 rejected-before-admission 两类回归。

非阻断

  • test/failed-prompt-edit.test.ts:40,46,54 新增了具体英文提示句断言;无害文案调整也会变红,不符合仓库“不钉文案”的测试原则。建议保留动作、turn 绑定、表单提交和状态迁移断言,删除这些句子级断言。
  • test/traex-prompt-checkpoint.test.ts:99 的 same-size modification 用例在本机仍复现 mtime 粒度抖动;它涉及本 PR 新增的 verifyRead 检测;在本机时间粒度下属于测试可靠性问题,未计入上述阻断。建议后续用可控 fstat 或内容级比对消除时间分辨率依赖。

本次验证

  • bun run build:通过(含 typecheck、dashboard bundle、build audits)。
  • PR 定向 11 个测试文件:305 passed / 1 failed,唯一失败为上述本机 mtime flake;另一变更相关 worker 文件 10 passed。
  • 共享 rewind/recovery 套件另有 258 passed;TRAE 输入/中断套件另有 235 passed / 1 skipped。
  • 补充集成测试中有 9 个用例因本机 tmux socket 路径 File name too long 而在 worker 初始 readiness 前退出;这是环境启动失败,未冒充断言通过,也未据此计为代码缺陷。
  • 上述四个阻断均另跑了针对真实组件的临时行为探针;探针已从工作树移除。

DeepCold review and others added 2 commits November 26, 2026 22:22
严格重试在 restart 被取代时恢复已剪切记录,并按实际 final carrier 补齐恢复控件。trustedCaller 通过 live-worker opts 保留,图片修复只被已接受的后续输入撤销。补充同尺寸内容校验及对应回归。

Co-Authored-By: Claude Code <[email protected]>
superseded 恢复必须等待最新 detached CLI scope 退出,无法证明时保留备份并拒绝写回。旧 strict retry 未结算时工具图片清理直接拒绝,不再先停旧恢复;统一卡片测试使用条件等待。

Co-Authored-By: Claude Code <[email protected]>
@deepcoldy

Copy link
Copy Markdown
Owner

已在作者分支追加修复,并以 fast-forward 推到新 head d677018ba1(未改写原提交)。

修复内容

  1. restart supersession / transcript 恢复
    • cut 前绑定 restart epoch,已经失去所有权的 restart 不得再切文件。
    • cut 后被取代时撤销 strict retry,并恢复失败输入;已 spawn 的获胜 CLI 必须先证明退出。
    • 跟踪最新 detached CLI process scope,backend=null 不再被误当成退出证明;无法证明时保留 backup、拒绝写回,且重试不进入 successor journal。
    • 覆盖 pre-spawn、已 spawn、detached-still-alive 三种序列及备份保留。
  2. 失败卡时序
    • terminal 成功记录 lastFailedTurn 后,按本轮实际 final carrier 补 Retry/Edit。
    • unified 复用原 publisher 串行 refresh;legacy 读回精确 messageId 并在写入前复核 session/turn/ownership;不另发第二张卡。
  3. 身份保留:Retry/Edit/Continue 的 live-worker 调用把冻结 trustedCaller 传入 opts,确保进入 worker IPC 和准入账本。
  4. 图片清理准入:只有实际接受的 successor 才撤销 held purge;committed/inflight duplicate、backpressure/cross-principal 拒绝不再误取消。旧 strict rewind 未结算时,新工具图片清理直接 busy 拒绝,不先停旧恢复。
  5. 非阻断项:删除新增测试的英文句子级断言;verifyRead 增加同尺寸内容级比对,摆脱单纯依赖 mtime/ctime 粒度。

实际验证

  • bun run build:通过(typecheck、dashboard bundle、build audits)。
  • 核心恢复套件:Node 196 passed;Bun 196 passed。
  • unified reply-card 相关:313 passed。
  • 共享 rewind/recovery:226 passed。
  • 原 PR 其余路径及跨 CLI:312 passed / 1 skipped;test hygiene:28 passed。
  • same-size 内容修改用例修复后连续 12 次通过。
  • 变异复验:分别摘除 epoch 守卫、pre-spawn/late restore、caller opts、卡片补 patch、内容比对、detached scope 证明,或恢复 early purge cancel,对应测试均咬红,随后恢复并复绿。
  • 补充真实组件对抗探针:替代 CLI 4243 仍存活时不写 transcript,明确保留 backup 并拒绝恢复;被拒的 retry-2 不再停止 retry-1(oldRetryStopped=false)。

新 head 的 CI 已触发,目前处于排队/执行中;本条不把尚未完成的 CI 写成通过。

DeepCold review and others added 2 commits November 27, 2026 00:59
master deepcoldy#3846 在 worker message case 内新增 activeTurnAuthority.snapshot(),
本 PR 新增的 worker-image-purge-intervention 函数夹具未注入该状态,合并最新
主干后其中 4 个用例在 harness 提取的 case 里抛 TypeError。补一行
snapshot: () => undefined,与 worker-failed-turn-rewind 既有夹具的注入一致,
仅测试 mock,不改生产代码。

Co-Authored-By: Claude Fable 5 <[email protected]>

@deepcoldy deepcoldy left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同步增量复审:d677018ba1..291d5740e5

结论:同步增量可合,0 个新增阻断。合码仍须等待 291d5740e5 的 CI 首跑全绿。

  • 祖先关系:d677018ba1 仍是当前 head 的祖先;291d5740e5 的直接 parent 是 merge commit 4de055f617,merge 的两个 parent 分别为修复 head d677018ba1 与主干 36f11a21e3,原有五个提交均保留。
  • merge 无隐藏改码:重新执行 git merge-tree --write-tree d677018ba1 36f11a21e3 得到 8a64cb9a327e74acaa10852f1c92121e7472a594,与 4de055f617^{tree} 逐字相同。没有冲突解决引入的额外内容变化。
  • mock 提交范围:291d5740e5 仅修改 test/worker-image-purge-intervention.test.ts,新增 activeTurnAuthority: { snapshot: () => undefined } 一行;没有任何 src/ 变化。该默认值只补齐 master 新增读取点的夹具依赖,不替换生产实现。

实际验证:

  • bun run build:通过(typecheck、dashboard bundle、build audits)。
  • 原 CI 红文件 worker-image-purge-intervention.test.ts:Node 14 passed,Bun 14 passed / 0 fail。
  • 合并后的原修复交叉路径:worker-failed-turn-rewind + traex-failed-prompt-card-ordering 共 68 passed。
  • git diff --check d677018ba1..HEAD:通过;工作树干净。

CI 状态以服务端为准:本次核验时 network-boundary 已成功,其余 job 仍排队/执行中,本条不把尚未完成的 CI 写成通过,也不替代后续 G4/G7 检查。

DeepCold review and others added 2 commits November 27, 2026 04:36
保留非 edit 的 replayed hookEnvelope 机制;edit 直接使用 editedInput 且不错误退役旧 sidecar,trustedCaller 继续通过 opts 进入 IPC。保留 strict checkpoint rewind、detached 进程退出证明与 inline sidecar 回滚顺序。

Co-Authored-By: Claude Code <[email protected]>
合入 assistantGroupChat 主干更新,保留前一轮 hook 重放、trustedCaller、strict rewind 与 detached 退出证明融合结果。

Co-Authored-By: Claude Code <[email protected]>
@deepcoldy

Copy link
Copy Markdown
Owner

已完成 master 语义融合并推送新 head 4dd1b7d356(普通 fast-forward,未 force-push、未改写历史)。

冲突解决

  • src/core/failed-turn-rewind.ts
    • nextHookEnvelope 与 mode: 'edit' 并存,保留 checkpoint 例外及 requireRewind。
    • 非 edit 保留 resend/merge 的 inline/sidecar 展开;edit 直接使用 input.content,不错误携带 inlineEnvelope 或 replay sidecar。
  • src/im/lark/card-handler.ts
    • 保留 retryTurnId、willUseLiveWorker 与非 edit 的 prepareHookEnvelopeForReplay。
    • edit 只使用 editedInput,不调用 replay、不写或退役旧 sidecar;trustedCaller 同时保留在 payload 与 opts.trustedCaller,live-worker 分支继续传入 failedTurnEditedInput。
  • src/worker.ts
    • requireRewind 的拒绝/出队仍在 successor journal 之前;retireInlineRewindSidecar 的回滚与不可回滚交付边界保留。
    • settleSupersededCheckpointRewind、retireInlineRewindSidecar 和合并后的 inlineEnvelope state 并存,detached CLI scope 退出证明不回退。
  • 随后到来的 6a69b89a05 已无冲突合入,最终 head 同时包含最新 master。

验证

  • bun run build 与 tsc:通过。
  • Hook / recovery 套件:112 passed。
  • TRAE / merge 交叉套件:Node 171 passed;Bun 171 passed。
  • 最新 assistant 变更相关:820 passed;最终冲突恢复路径 164 passed。
  • 变异复验均咬红后恢复:
    • 删除 edit 直接分支,替换正文不再正确;
    • 删除 opts.trustedCaller,Retry 与 Edit 两个用例失败;
    • 禁用 replayed,live/fork 两个 envelope 用例失败;
    • 错标 edit 的 inlineEnvelope,sidecar 边界用例失败。
  • 独立目标复核实际运行并通过:edit 不 replay sidecar、edited retry 保留 checkpoint、detached winning CLI 未退出时拒绝 restore 并保留 backup。

新 head CI 已触发,目前各 job 正在排队/执行中;本条不把尚未完成的 CI 写成通过,合码仍需首跑全绿。

@deepcoldy deepcoldy left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

master 同步轻量复审:4dd1b7d356..04dd9e7cb0

结论:同步增量可合,0 个新增阻断。合码仍需等待本 head 的 CI 首跑全绿。

  • Merge parents 为 4dd1b7d356 与 2bd3b49805,历史关系正确。
  • src/types.ts 的 DaemonToWorker.message 同一 union 中同时保留 nativeQuestionAnswer?: { requestId: string } 与 purgeToolImages?: true;两个可选字段位置不同、无相互覆盖或逻辑改写。
  • worker.ts 的其余大段变化来自 #3888 自身,不是冲突解决夹带;本 PR 新增的恢复文件 traex-prompt-checkpoint.ts、traex-tool-image-recovery.ts、failed-prompt-edit.ts、failed-prompt-card.ts 与 merge 前逐字相同,其他恢复控制文件也未被改写。

实际验证:

  • bun run build / tsc:通过。
  • worker-failed-turn-rewind、worker-image-purge-intervention、card-handler-retry-turn、traex-async-question、traex-native-answer-admission:共 184 passed。
  • git diff --check 4dd1b7d356..04dd9e7cb0:通过,工作树干净。

本条仅确认同步增量,不把仍在排队/执行的 CI 写成通过,也不替代最终 G7 tree 校验。

@deepcoldy deepcoldy left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

G7 / #109 复核:当前不能豁免新 head CI

对 756f0499 的既有核验本身成立:merge-tree(756f0499, 04dd9e7) = 797868bb2c8cfbb8865cddb1611142441dcf6707,与本地 merge 98cf0cc 的 tree 一致。

但实际 master 已继续前进到 42f666399d,不能沿用旧 tree 的验证结论:

  • 最新 master 整段 delta 与本 PR 的交集为 src/core/failed-turn-recovery.ts、src/core/worker-pool.ts、src/im/lark/card-handler.ts、src/types.ts、src/worker.ts;其中最新提交新增的交集包括失败恢复记录与卡片生命周期共用路径。
  • git merge-tree --write-tree 42f666399d 04dd9e7cb0 虽无冲突,但新预测树为 a60af8aeabd69db0ab493334a1a286b034caccc6,与已验证的 797868bb 不同。
  • #109 要求本地合并树上的 build/tsc/相关测试对最终预测 tree 有效。当前没有这棵新 tree 的验证证据,因此“零冲突 + 不相邻” alone 不足以背书直接 squash。

建议按原备选方案:merge 最新 master、普通 push 新 head,并在新 head 首跑 CI 全绿后再做 G7。 这不是对 756f0499 既有验证的否定,而是最新 master 变化后不能跨 tree 继承结论。

@deepcoldy deepcoldy left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最终 head 复审与 #109 豁免结论

1. d8d628450b:明确可合(G1)

  • 最终 PR head 为 d8d628450b6600ac31b99493684dee609ce1beb1。
  • CI run 45917448598 绑定该 head,attempt=1、status=completed、conclusion=success,没有重跑。
  • PR 上 15 项检查均为 completed/success(run 内 14 个 job + network-boundary)。
  • 本轮没有新的代码问题;该 head 的明确「可合」表态即为本条结论。

2. master 5e7f413883:背书 #109,可免再次同步和整套 CI 重跑

已逐项复核豁免条件:

  • 交集:只有 src/worker.ts。
  • 区段不相邻:#3891 仅在 codexBridgeNotifyCliSessionId 附近新增 11 行(合并后约 19511 行);本 PR 最近的 term-action 变更在 23940 行,核心恢复函数从 45868 行以后开始,处于完全不同函数和调用区段。
  • 三点 tree 一致:git merge-tree --write-tree 5e7f413883 d8d628450b = 2f09e0a5218d4327f64ffc0d568bd06e8dab064f;本地 merge 16d5ad0f47 的 tree 与此逐字相同,无冲突解决夹带。
  • 本地合并树验证:bun run build / tsc 通过;nca-adapter、worker-failed-turn-rewind、worker-image-purge-intervention、traex-failed-prompt-card-ordering 共 103 passed。
  • master 即时值:核验时 GitHub commits/master 仍返回 5e7f4138834d3381fce843e545779a8d7c5d984a。

因此,可在仍保持首跑 CI 全绿的 d8d628450b 上按 #109 合入,无需仅为该 NCA 提交再制造 merge head 并重跑整套 CI。

合前硬条件仍保留:实际 squash 前重新 fetch;若 master 或预测 tree 再变化,必须针对新 base/tree 重新核验,不能沿用本条;squash 落地后仍须确认 merge commit tree 等于当时 merge-tree(实际 base, d8d628450b)。本条不执行 push、squash、发版或部署。

@deepcoldy
deepcoldy merged commit ef5c583 into deepcoldy:master Nov 27, 2026
15 checks passed
@deepcoldy

Copy link
Copy Markdown
Owner

Thanks for this well-structured contribution @Sespeck! It has been squash-merged into master.

The two recovery flows (tool-image cleanup with same-session resume, and checkpoint-backed Retry/Edit for prompts that failed before doing any work) fill a real gap where a poisoned input_image could otherwise make a TRAE session unrecoverable. The fail-closed proof rules, descriptor-scoped transcript rewrites with out-of-tree backups, and the explicit user-triggered actions are all solid.

Follow-up (non-blocking, tracked on our side):

  • Live end-to-end validation of the native rollout resume and the Retry/Edit/remove-tool-images card interactions on a real TRAE 0.216+ session, to be done after this reaches a deployed build.
  • The coarse-timestamp filesystem flake in the same-size modification test is already addressed by the added content-level byte comparison.

This is an automated review summary; the final call always rests with the maintainers. Looking forward to more contributions!

deepcoldy pushed a commit to iluhcm/botmux that referenced this pull request Nov 27, 2026
worker.ts/worker-pool.ts 由 git 自动合并;手动解三处:
- src/types.ts:message union 字段并集,保留 scheduledRun 并补 deepcoldy#3856 的 purgeToolImages;
- test/worker-codex-effort-input.test.ts:保留 Record<string,any> 类型并补 activeTranscriptImagePurge;
- test/helpers/worker-function-harness.ts:补 isCriticalInterruptKey 真实函数供给,
  供 deepcoldy#3856 后 handleTermAction 提取函数使用,消除测试夹具缺口。

Co-Authored-By: Claude Fable 5 <[email protected]>
@github-actions

Copy link
Copy Markdown

🚀 Released in v3.59.35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TRAE image-resolution failures need safe Retry/Edit and history repair

2 participants