Pin durability, file rewind, and model fallback #175

Merged
weichen merged 6 commits from feature/durable-rewind into main 2026-10-03 17:40:17 +00:00
7 changed files with 35 additions and 6 deletions
+29
View File
@@ -0,0 +1,29 @@
# feature/durable-rewind 任务卡
任务主记录:<PR 链接,task-finish 时填写>;状态:进行中;owner:weichen
## 基线与授权
- 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= 10fabbc4040a451023ad2f2ef10687a835ba4eb5
- 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-durable-rewind(worktree);分支:feature/durable-rewind
- 授权与交付终点:实现批次 7(持久与回滚)。允许改 agent-native、agent-squad(仅透传)、core、backend、frontend、ui 与 Dev 指针;经 Gitea PR 合入 main 后回收 worktree。不回滚对话历史,不引入 pi-durable 或第三方 OTel SDK。
## 目标与非目标
- 目标:工具意图与结果分两次落盘;只有存储时与当前声明都是 safe 才重跑,否则写入「副作用未知,未重试」。请求由已落盘投影组装。文件检查点与回滚 API、用户消息上的回滚确认。模型回退链默认空,仅在尚未输出时切换。GenAI span 名为 invoke_agent、chat、execute_tool,默认不采提示词。
- 非目标:回滚消息历史;透明续跑;把 shell/python 的改动纳入文件追踪。
## 同步记录
| 节点 | sync_base_sha | tested_head_sha | checked_at |
|---|---|---|---|
| 启动 | 10fabbc4040a451023ad2f2ef10687a835ba4eb5 | 10fabbc4040a451023ad2f2ef10687a835ba4eb5 | 2026-10-03T17:10:34Z |
## 结果与验证(完成后填写)
- 结果:native fb2b3b7,squad a3b49e7,core 5dc190e,backend bead033,frontend e26119d,ui 8e66bce。
- 验证:各仓单测已过。worktree 内 `make test` 与 `make build` 通过。临时 mock(127.0.0.1:8802)上打开回滚确认:无检查点时显示「没有需要回滚的文件」且确认按钮不可用;写入检查点后列出将恢复的 notes.txt 与跳过的 note.txt,确认后 notes.txt 被删除、note.txt 保持外部内容,并追加系统提示。
- 影响与剩余项:回退链默认空;检查点只追踪显式写入;shell 与 python 的改动不回滚。
| 同步前验收 | 10fabbc4040a451023ad2f2ef10687a835ba4eb5 | ac10d830dff720a5a83ceb6740565110062fc757 | 2026-10-03T17:39:57Z |
| 同步前验收 | 10fabbc4040a451023ad2f2ef10687a835ba4eb5 | 4673cf235a9d591b271d480464c6151a7489cf18 | 2026-10-03T17:39:57Z |
| 同步前验收 | 10fabbc4040a451023ad2f2ef10687a835ba4eb5 | 84395c92ffebd78608109eebc91eec9e086f9b65 | 2026-10-03T17:39:58Z |