Replies: 1 comment
|
。。。。 tudo转工具 整合到better-sidebar得了 目前的位置别扭 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
症状 / Symptom
/plan之后模型建立的任务列表(composer 上方的 todos 任务栏)只在写入它的那个回合显示。一旦回合被中断(传输失败、停止、崩溃——会话日志里该回合没有turn/end),任务栏永久消失:后续回合、以及中断后继续的会话里都不再出现,即使清单里还有大量未完成任务。数据本身没有丢——todo/write事件一直在会话日志里。The todo task bar only shows during the turn that last wrote the list. After an interrupted turn (no
turn/endin the session log), the bar disappears permanently for the rest of the session, even with most tasks still pending. The data is durable (todo/writeevents are in the log); only the projection is lost.根因 / Root cause
packages/todo/tool-todo/src/index.ts(masterc291e7961a的:138-145;0.1.5-rc.1 / 0.1.5-rc.2 的 npm 产物逐字节同源)注册的todos投影在每个turn/start无条件清空:设计语义是"当前回合的 standing plan",依赖模型在每个新回合里重新调用
todo_write重建显示。正常执行时模型通常会重写(标记 in_progress 等),视觉上连续;但中断回合之后模型不会重写,投影从此为null。又因为 invariant 拒绝空列表写入,模型也无法"清空后重建",上游没有其他机制恢复显示。另外该投影状态有持久化检查点(
dsh-session-projection-cache按(Id, key, ver, seq, val)存盘,ver与 live unit 的stateVersion不匹配时读取即丢弃并重折叠)——任何修复都必须 bumpstateVersion才能影响已中断的历史会话。证据 / Evidence
真实会话(本机
session-b460c,工作区 Deepseek尝试)事件序列:把该会话日志截取到缺陷点(第 310 个事件,回合 2 的
turn/start)分别灌入真实的 upstream fold 与修复后的 fold:null(任务栏隐藏)——与用户观察一致修复建议 / Proposed fix(最小 diff,形状不变)
turn/start时仅当清单全部 completed 才清空;还有未完成任务则保留到模型重写为止:配合
stateVersion: 2 → 3:让旧检查点在读取时被丢弃、从耐久的todo/write事件重折叠(dsh-session-projection-cache的 ver-mismatch 语义,无需迁移)。已完成清单的行为与上游完全一致(照旧在下一回合让位);状态形状与 wire view 均不变,客户端零改动。验证 / Verification
node --test):未完成清单跨回合保留;中断回合(write 后无 end 直接 start)保留;aborted 结束保留;全部 completed 照旧清空;latest-write-wins;空历史恒 null;wire view 透传不变;upstream fold 在同场景下清空(红,文档化缺陷)。nullvs patched12 tasks。临时规避 / Workaround
无产品内规避(依赖模型自觉重写
todo_write,不可靠)。本机已按上述 diff 打补丁并验证。检查过的版本 / Versions checked
c291e7961a(源码)::140同样无条件清空EN summary: The
todossession projection (todo task bar) is cleared unconditionally at everyturn/start(packages/todo/tool-todo/src/index.ts:140on master, byte-identical in rc.1/rc.2 builds) and relies on the model re-writing the list each turn. After an interrupted turn (noturn/end) the model never re-writes, so the bar disappears permanently even thoughtodo/writeevents remain durable in the session log — and the model cannot clear-and-rebuild because the invariant rejects empty writes. Reproduced with a real session (12-task plan written in a completed planning turn; interruption in the execution turn; replay through the real fold: upstream → null, patched → 12 tasks). Proposed minimal fix: clear onturn/startonly when every todo is completed, and bumpstateVersion2→3 so durable projection-cache checkpoints (ver-mismatch = discard-at-read, refold from log) are invalidated for already-affected sessions. State shape, wire view and completed-plan behavior unchanged; 8/8 red/green unit tests.All reactions