Repository navigation
Conversation
Review fixes on top of the custom-agent fork history change. - Hold the fork reply for transcript-owned agents until hydrate_forked_transcript is done. The frontend refetches the branch the moment acpFork resolves; replying before the session/load replay landed showed the branch empty with nothing to refetch it later. - Send the hydration session/load only to agents that advertise loadSession (ACP MUST NOT; the reconnect ladder already gates it), and bound it so an agent that never answers cannot hold the fork open. - Keep "fork from here" at the thread tail for custom agents: an unnamed tail turn tail-forks (that IS the fork point), and the frontend asks for an explicit tail fork instead of sending a live-… id the backend can only refuse. - Refuse a replay publish while records queued ahead of it are still deferred, so they cannot land after the replay. - Repair null usage counts in the fork drain like the ladder does; scan the current session's transcript off the async workers; restore the read_transcript doc comment; drop the useless .into() clippy rejects.
hydrate_forked_transcript returned early on three paths after (or around) sending session/load without draining the replay already routed to the child session: a load the agent refused, a load that timed out, and a sidecar that could not be opened after a successful load. The live loop then read those frames as the agent talking now — rendered as a reply nobody asked for, and, for frames that trailed a timed-out load into the first prompt, recorded into the branch's transcript. - Open the staging sidecar before sending the load, so failing to stage sends no load and leaves no replay in flight. - A refused load is still an answer that bounds its replay: drain and discard it, publish nothing. - An unanswered load bounds nothing, so end the connection instead of entering the live loop; the held fork reply drops and the fork reports a failure, leaving the conversation on the session it forked from. Tests drive the three paths through the fork harness and assert the replayed text never surfaces as live output; the refused-load test was checked to fail with the old early return restored.
Collaborator
|
结论:方案成立。在本分支上叠加两个修复提交后,评估为可作为生产候选;合入前建议用真实自定义 adapter 做一次 UI 冒烟。 方案:用 agent 自己的 已修复:
验证: 新增 5 条端到端分叉测试(成功回放、未声明 loadSession、load 被拒、load 无应答、sidecar 无法创建),以及 transcript/分叉点单测;关键测试已确认在回退对应修复后失败。完整门禁:桌面/服务器 lib、集成、bin 与 doc 测试全部通过,唯一失败是与本改动无关的 codesign 环境用例;桌面/服务器/mcp 的 check 与 clippy 通过;前端 lint、build 通过;vitest 11674 项通过,另有 2 个无关文件在全量负载下超时,单独运行均通过。独立评审共两轮:第一轮提出第 3 条,修复后复审 APPROVED。 仍需维护者判断: Trae/CommandCode/MiniMaxCode 若声明了 fork+load 也会被 hydrate(与「内置 agent 行为不变」不完全一致,但修的是同一缺陷);fork 后先 resume 再 load,可能让部分 adapter 多重启一次 MCP server;尚无真实 adapter 的 UI 端到端验证。 The changes were pushed to this pull request (7 files, +732/-96). 🤖 Generated with Codeg |
ikelvingo
marked this pull request as ready for review
November 15, 2026 15:20
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.
问题
使用自定义 ACP agent 分叉会话时,新会话的 Codeg transcript 可能只包含头部。分支打开后看不到历史,再次从该分支分叉时,也可能因为 Codeg 找不到所选轮次而失败。
修改
验证
在包含此 patch、基于 v0.44.0 的合并源码上:
PR 候选包含与上述合并源码相同的 8 个代码文件,未包含本地交接文档和历史合并提交。尚未针对该候选运行完整测试套件,也没有自动化的「分叉 → 加载 → 继续对话 → 再次分叉」集成测试。
兼容性验证
已针对 DSH(
@openma/deepseek-harness-acp)和 omp 检查分叉元数据及历史回放顺序。DSH 还通过 ACP 探针验证了子会话历史加载、工具调用回放、继续对话及再次分叉。希望以 Draft PR 形式征求上游对自定义 adapter 兼容范围和回放完成边界的意见。