Repository navigation
Replies: 1 comment 1 reply
|
Independent Windows report: same duplicate-seq failure on Desktop 0.2.1-rc.5 (Windows 11 x64), so this is not limited to bionic. Environment
Observed
Analysis
Repair / workaround
Suggested fixes
Happy to provide sanitized row snippets or the repair/verify scripts. |
1 reply
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.
Environment
0.2.0-rc.2session.v4.jsonl.zstd, multi-frame zstd)Observed error (UI, when opening history)
File evidence (decoded frames, times anonymized)
{}dsh-session:1352) — +2.8 minSo rows from the duplicate onward are uniformly
seq = eventIndex - 1.Mechanism
Session.seqis defined asthis.log.length(dsh-session/lib/index.js, "seq = log.length contiguity contract") — appends never re-check the file tail, so a handle whose in-memory log is one event behind silently writes a duplicate seq.session/end-seedfrom the seed/fork construction path; B had restored earlier (before A's append) and idled 6.5 min, then wrotemodel/selectionwith the stale next-seq.@deepseek-ai/node-addon-systemhas no binding, sotryLockExclusivethrowsERR_FLOCK_UNSUPPORTED_PLATFORMand the write lease falls back to a no-op (posix-unlocked). On platforms with flock the second opener would fail fast withSessionAlreadyOwnedError; on bionic the race corrupts silently, and the strict monotonic validator then rejects the whole log on read ("历史加载失败" — entire history unreadable).Suggested fixes
O_EXCLlock-file lease (open(path, 'wx')with pid + mtime heartbeat). Exclusive create works on Android/Termux filesystems and would restore cross-process exclusion instead of a no-op lease.SessionAlreadyOwnedErrorinstead of writing a duplicate.Repro pattern
Any fork/seed construction overlapping a plain resume of the same session id on a host without flock (Termux). Not reproducible on Linux/macOS because the lease rejects the second writer first.
All reactions