Files
Agent-System-Dev/.task/feature-chat-process-split-r1.md
T
weichen f3056cb9d6
ci / test (pull_request) Failing after 1m37s
Record post-merge acceptance evidence
2026-09-30 16:16:24 +00:00

4.8 KiB
Raw Blame History

feature/chat-process-split-r1 任务卡

任务主记录:<PR 链接,task-finish 时填写>;状态:进行中;owner:weichen

基线与授权

  • 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= ffda6d33ea
  • 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-chat-process-split-r1(worktree);分支:feature/chat-process-split-r1
  • 授权与交付终点:实施已批准计划中的任务 1(中栏过程/回复分离 + CF0 长回复折叠);终点 = 模块 PR 合入 + Dev gitlink PR 合入 + worktree 回收。

目标与非目标

目标(用户五项裁定 + Cursor 式过程折叠需求):

  1. backend:工具轮的解说文本部件带 process=true(终轮文本不变)——中栏过程/回复分离的数据基础。
  2. frontend:live 流式期间一旦进入 responding(最终回复开始流式)过程即时折叠(Cursor 式),acting 恢复时重展开;LiveState 文本按 delta index 分桶(除末桶外均为过程);终态 >800 字长回复折叠(CF0)。

非目标:卡流机制 CF1(submit_card/设置/回填,另立任务);autoCollapseProcess 设置 UI;卡片内容流式。

同步记录

节点 sync_base_sha tested_head_sha checked_at
启动 ffda6d33ea ffda6d33ea 2026-09-30T14:43:43Z

结果与验证(完成后填写)

  • 结果:
    • backend 提交 0e76f59(feature/chat-process-split-r1):internal/runtime/llm.go 工具轮 text 部件 Process: len(calls) > 0;新增 Stream 注入缝(agentllm.StreamFunc)与 internal/runtime/llm_test.go。
    • frontend 提交 642299d(feature/chat-process-split-r1):store.ts texts 分桶(applyTextDelta);新纯逻辑模块 src/live.ts(liveToMessage 同构投影);Conversation.tsx responding 折叠 + LongReplyCollapse(800 字阈值)。
  • 验证:
    • backend:go test ./internal/runtime/(TestLLMRunnerToolTurnTextIsProcess / TestLLMRunnerPhaseEventsPerTurn 通过);go test ./... 全绿。
    • frontend:npx tsc --noEmit 0 错误;npx vitest run 20/20(新增 test/live.test.ts 5 用例)。
    • 组合:Dev worktree make test 退出码 0(core/backend 全 ok、frontend 20/20、ui 35/35、agent-command ok)。
  • 影响与剩余项:
    • 行为变化:持久化消息中工具轮文本进入终态过程折叠区;live 末态与终态同构(对账无跳变)。
    • 剩余:模块 PR 与 Dev gitlink PR(面板恢复后自动建并合入);无头走查留卡流 CF2 一并执行。
  • 审查修复(2026-09-30 代码复审,覆盖全部审查项):
    • frontend 22a8723:untrack node_modules 符号链接(曾指向本机绝对路径被提交);.gitignore 规则 node_modules/ → node_modules(目录与符号链接同拦)。
    • frontend 754ce83:LiveState 改为到达序 items 流(thinking/text 增量并段、工具按位落位),liveToMessage 与落库轮次穿插序同构,多轮对账不再重排;文本段 process 由「本段内是否出现工具调用」判定(对齐落库 Process: len(calls) > 0),tool.call 一到解说即入过程区;折叠谓词抽取为 showProcessInline;长回复摘要加 100 字摘句并注明按 Markdown 源码计长。
    • backend ae8e5d0:PartArtifactRef 补 Process: true(与同轮 tool_call/tool_result 一致,终态随过程折叠);新增 TestLLMRunnerArtifactPartIsProcess。
    • Dev 596d02c:gitlink 更新至上述两笔模块提交。
    • 验证:frontend vitest 27/27(live 用例 5→12:多轮部件顺序、即时改标、折叠谓词)+ tsc -b 0 错误;backend go test ./... 全绿;Dev worktree make test 退出码 0(frontend 27/27、ui 35/35、agent-command ok)。
    • 残余边界(live.ts 注释已载):静默纯工具轮(该轮无正文无思考)的调用会并入上一文本段标记,需协议携带轮次归属才能消除。 | 同步前验收 | 425c6e63f2 | 2a49aa7f80 | 2026-09-30T16:01:33Z |
  • 终验(合 main 后,2026-09-30T16:01Z):make test 退出码 0——frontend vitest 33/33(tsc -b 0 错)、ui 37/37、backend go test ./... 全 ok、agent-command ok;task-sync sync_base=425c6e6 tested_head=2a49aa7。 | 同步前验收 | 548ca2b3f1 | cd9e1321d4 | 2026-09-30T16:15:47Z |
  • 终验 II(模块 PR 合入后,2026-09-30T16:15Z):task-sync sync_base=548ca2b tested_head=cd9e132;make test 退出码 0——frontend 33/33、ui 37/37、backend 全 ok、agent-command ok。模块 PR:Backend #21 → fa494c3、Frontend #18 → b067b57。