You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Bug 报告:同一会话被两个 dsh 进程并发写入导致会话日志损坏(seq 撞号)
两个 dsh 实例(npm 版与源码版)共用同一
$DSH_HOME并发写入同一会话,导致session.jsonl.zstd中两个事件撞上同一个 seq,resume 时报corrupt session log: seq gap。复现、预期与验收
npx @deepseek-ai/dsh web(端口 3080)pnpm dsh web --port 3081(共享同一$DSH_HOME,默认~/.dsh)session/end-seed与agent/inbox/spliced被分配了同一个 seq(47245),持久化层将其判定为 "seq gap"(expected 47246, got 47245),拒绝恢复。手动删除撞号事件后进一步报invalid persisted inbox splice(insert/claim 是成对事件,删 insert 导致 claim 在空 inbox 上校验失败)。@deepseek-ai/dsh0.1.0-rc.6 与源码版 0.1.0-rc.5(commit 47f9438)同时运行。seq 重复(撞号)与seq 缺失(真 gap)两种情况;根因分析
两个写者各自的 seq 计数器都走到了 47245,各写入一条不同事件。持久化层没有单写者保护:README 声明 "One live writer per session",但没有任何机制阻止第二个进程写同一会话。这是并发写入,不是事件丢失——现有报错
corrupt session log: seq gap把两种情况(event.seq < expected撞号 /event.seq > expected真 gap)混为一谈,误导排查方向。修复过程(用户侧手动完成)
scanZstdFrames+decompressZstdFrame逐 frame 解压(Node 内置zstdDecompressSync只解第一个 frame,多 frame 拼接流需自行逐帧解);compressZstdFrame);给团队的改进建议
format.ts:364-373两条分支共用一个 message,建议区分seq 重复与seq 缺失,便于定位是双写者还是丢事件。All reactions