Repository navigation
Replies: 2 comments
|
Update — recurrence confirmed on rc.7 / rc.7 复发确认 The same corruption reproduced again on the freshly upgraded Second observation, identical signature (this occurrence's gap row is Recovery worked both times with the companion script ( Since it reproduces on rc.7 as well, I'd suggest prioritizing a write-path fix — on restart resume appending from the committed prefix instead of replaying in-flight buffer deltas — and/or:
Environment: dsh |
|
Same family as #1497 — seq overlap/rollback in the committed region. Two zero-history-loss options (verified against the unpatched npm 0.1.1-rc.2: 931,455 events, no seq gap,
Pick #2 if the log is already broken; patch the readers if you want future crashes to stay invisible. |
Uh oh!
There was an error while loading. Please reload this page.
摘要 / Summary
On
dsh 0.1.0-rc.6, if the process is force-stopped (kill/ an interruptedsystemctl stop) while an agent turn is still in flight, that session can no longer be opened after restart. Every further append attempt fails with:There is no supported recovery path (torn final-frame tails self-repair, but a complete-frame logical gap does not). Byte-level analysis shows the log correctly ends with
turn/end seq 599 (reason: interrupted), followed by a replayed copy starting atassistant/chunk seq 598— i.e. on restart the write path resumed from a stale seq offset and replayed the interrupted turn's buffered deltas, duplicating 598/599 and skipping 600.环境 / Environment
0.1.0-rc.6(developer preview)v24.18.0, Linuxcompression: zstd,packChunks: true复现步骤 / Reproduce
kill; or interrupt the write viasystemctl stop).证据 / Evidence (sanitized log tail)
{"type":"step/end","seq":598,...} {"type":"turn/end","seq":599,...,"reason":{"kind":"interrupted"}} ← correct interrupted close {"type":"assistant/chunk","seq":598,...} ← duplicated: stale buffer replayed {"type":"assistant/chunk","seq":599,...} ...scanLogindsh-session-persistence-jsonlrequires strictly contiguousseq 0..N. Because a later row also carries aturn/end, the scanner throws instead of truncating to the committed prefix.为什么无法自愈 / Why it does not self-repair
readZstdPrefixauto-recovers (repair(truncateTo)).turn/end) → directthrow, no supported CLI/repair command. A user must manually decompress → truncate at the last contiguous committed event → rebuild the file as zstd frames (frame 1 = header line only, later frames = events).建议 / Proposed fixes
备注 / Notes
All reactions