Repository navigation
Replies: 1 comment
|
โ ็ฒ่ดดๅฐ GitHub ็่ฏ่ฎบๆก Closing this one out. We re-checked it against Authorship note: drafting assisted by AI; verification and publication by me. I have no engineering background โ if any technical claim reads wrong, please call it out. Reported by the OfferKuai Team. ไธญๆ็ๆถๅฃใ่ฟไธๆกๆไปฌๅทฒไบ 2026-10-07 ๅฏน็ ๅไฝ่ฏดๆ๏ผๆๆ็ฑ AI ๅๅฉๅฎๆ๏ผๆ่ด่ดฃๆ ก้ชไธๅๅธใๆ้ๅทฅ็จ่ๆฏ โโ ่ฅไปปไฝๆๆฏ่กจ่ฟฐๆ่ฏฏ๏ผ่ฏท็ดๆฅๆๅบ๏ผๆไผๅฏน็ งๅทฅๅ ท้พ้ๆฐๆ ธๅฎๅนถๆดๆญฃใ ๆฌๆฅๅ็ฑ OfferKuai๏ผOfferๅฟซ๏ผๅข้ๆไบคใ |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Self-review update โ correction of our own submitted bug report / ่ชๆไฟฎๆญฃ๏ผๅฏนๆฌไบบๆไบค็ bug report ็ไฟฎๆญฃ (2026-08-22)
open(path, "a")). Any topology with more than one writer against a shared home โ an interactive session plus a background/scheduled job, or multiple processes in parallel โ is unsafe by design, and the corruption is silent and durable.What we originally claimed / ๅ็่กจ่ฟฐ (EN): no session-level locking; two running instances silently corrupt the same session log; permanent loss of UI access; manual recovery required.
What we now state / ็ฐไฟฎๆญฃ (EN): confirmed, and upgraded โ the single-writer model is intentional but only enforced in-process; the durable layer has no lock and no writer detection, so any multi-writer topology (interactive + scheduled job, parallel processes) is unsafe by design; corruption is silent and durable, destroying the entire progress/audit record; the engine gives operators no signal until it is too late.
ๅ็่กจ่ฟฐ๏ผไธญๆ๏ผ๏ผ ๆ ไผ่ฏ็บง้๏ผไธคไธช่ฟ่กๅฎไพๅนถๅๅๅไธไผ่ฏๆฅๅฟใ้้ปๆๅ๏ผไผ่ฏๆฐธไน ๅคฑๅป UI ่ฎฟ้ฎ๏ผ้่ฆๆๅทฅๆขๅคใ
็ฐไฟฎๆญฃ๏ผไธญๆ๏ผ๏ผ ็กฎๅฟ๏ผไธๅ็บงโโๅๅ่ ๆจกๅๆฏๆๆ่ฎพ่ฎก๏ผไฝๅชๅจ่ฟ็จๅ ๅผบๅถ๏ผๆไน ๅๅฑๆ ้ใๆ ๅ่ ๆฃๆต๏ผๅ ๆญคไปปไฝๅคๅๅ ฅ่ ๆๆ๏ผไบคไบ+่ฐๅบฆไปปๅกใๅค่ฟ็จๅนถ่ก๏ผๅจ่ฎพ่ฎกไธ้ฝไธๅฎๅ จ๏ผๆๅ้้ปไธๆไน ๏ผๆงๆฏๆดไปฝ่ฟๅบฆ/ๅฎก่ฎก่ฎฐๅฝ๏ผๅผๆๅจไธบๆถๅทฒๆไนๅไธไผ็ป่ฟ็ปดไปปไฝไฟกๅทใ
EN / English
Follow-up โ 2026-09-19: the harness has since shipped a session-level lock
What changed upstream. The release notes for
dsh-v0.1.3-alpha.1(2026-09-04) state: "Breaking change: the session persistence API now uses a lifecycle-heldSessionHandle;agentLoop.create()becomes async, and a session lock was added โ a session is held by at most one process." (The same line is restated indsh-v0.1.5-rc.1, 09-10.) Source: https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.1.3-alpha.1For the mechanism this report argued โ that the single-writer assumption holds only in-process โ that is the direct response.
What we are not claiming. We have not re-tested this lock on the newer version, so we do not read it as "this report is fixed". The measurements in this report were taken on
0.1.1-rc.2(which had no session-level lock); the lock's actual effect on a shared home across processes, and how it interacts with the second-writer toolchain described here, have not been reviewed by us. The findings below therefore stand as written โ this section only records the upstream change so readers can check for themselves.Boundaries. The quotation above is the official release note (URL included); no source-level review and no re-test were performed for this section. If the maintainers consider the lock to have already superseded this report, please say so and we will correct the status accordingly.
Observed behavior
When two dsh instances run against the same
~/.dshhome (e.g. an interactive session and a background/scheduled process sharing the home), both instances append to the samesession.jsonl.zstdwith independent seq counters. The result is duplicated seq ranges written out of order โ violating the session log's core invariant of strictly monotonic, contiguous seq โ and the session becomes permanently unreadable:Confirmed empirically: a session repaired minutes earlier was corrupted again solely by the second instance writing.
Root cause โ the single-writer assumption is in-process only
The engine does coordinate writers โ but within one process.
dsh-session-persistenceships a per-coordinator registry with exclusive reservation of unpublished sessions (dsh-session-persistence/lib/index.js:17-20,:55,:167). That protects one process from itself.The durable file backend, however, has no cross-process protection:
appendLinesopens the log in plain append mode โopen(path, "a")(dsh-session-persistence-jsonl/lib/index.js:1203) โ writes and fsyncs (:1211-1214), with rollback only on its own write failure (:1215-1223). There is no lock file, noO_EXCL, no inode/seq validation against a foreign writer, and no startup check for another process holding the home.So the single-writer model is a deliberate design (in-process coordinator) whose durable enforcement is absent. A second writer is undetected at launch and at write time; corruption is only discovered later, and only as a read error.
Impact scope (upgraded โ production / progress / scheduling)
Expected behavior
Repro
~/.dsh/sessions).seq gap, history unavailable.Environment
@deepseek-ai/dsh0.1.0-rc.6/0.1.0-rc.7, same~/.dshhome.@deepseek-ai/dsh0.1.1-rc.2Evidence (sanitized + source)
dsh-session-persistence/lib/index.js:17-20,:55,:167โ in-process coordinator: exclusive reservation and write rejection within one process only.dsh-session-persistence-jsonl/lib/index.js:1200-1227โappendLines:open(path, "a")(:1203), write + fsync, rollback only on own failure; no lock, no exclusive flag, no foreign-writer detection.Authorship note: reproduced and documented by me in real-world usage; root-cause tracing and drafting assisted by AI; verification and publication by me. I have no engineering background โ if any technical claim reads wrong, please call it out; I will re-verify against the toolchain and correct.
ไธญๆ็ / ZH
ๅ็ปญ่ฟๅฑ โโ 2026-09-19๏ผๅผๆๅทฒๅ ๅ ฅ session ็บง้
ไธๆธธๅๅใ
dsh-v0.1.3-alpha.1๏ผ2026-09-04๏ผ็ release notes ๅๆ๏ผใ็ ดๅๆงๅๆด๏ผ Session persistence API ๆนไธบ็ฑ็ๅฝๅจๆๆๆ็SessionHandle๏ผagentLoop.create()ๆนไธบๅผๆญฅ๏ผๆฐๅข session ้๏ผๅไธ session ่ณๅค่ขซไธไธช่ฟ็จๆๆใใ๏ผdsh-v0.1.5-rc.1๏ผ09-10 ้็ณๅไธๆกใ๏ผๅๆ๏ผhttps://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.1.3-alpha.1ๅฐฑๆฌๆฅๅๅฝๅไธปๅผ ็ๆบๅถ โโ ๅๅ่ ๅ่ฎพๅชๅจ่ฟ็จๅ ๆ็ซ โโ ่่จ๏ผ่ฟๆกๆญฃๆฏๅฏนๅฎ็ๅๅบใ
ๆๆนไธไธปๅผ ็้จๅใ ๆไปฌๆฒกๆๅจๆฐ็ๆฌไธๅคๆต่ฟไธช้๏ผๅ ๆญคไธๆๅฎ่ฏปไฝ"ๆฌๆกๅทฒไฟฎๅค"ใๆฌๆฅๅ็ๅฎๆตๆ ทๆฌๅ่ช
0.1.1-rc.2๏ผๅฝๆถ็กฎๆ session ็บง้๏ผ๏ผ่ฏฅ้ๅฏนๅค่ฟ็จๅ ฑไบซๅไธ home ็ๅฎ้ ๆๆ๏ผไปฅๅๅฎไธๆฌๆฅๅๆ่ฟฐ"็ฌฌไบๅๅ ฅ่ ๅทฅๅ ท้พ"็็ธไบไฝ็จ๏ผๆๆนๅๆชๅคๆ ธใๆไปฅไธ่ฟฐ็ป่ฎบ็ปดๆๅ็ถ โโ ่ฟไธๆฎตๅช่ฎฐๅฝไธๆธธๅๅ๏ผไพ่ฏป่ ่ชๆฅใ่พน็ใ ไปฅไธๅผๆไธบๅฎๆน release notes ๅๆ๏ผๅซ URL๏ผ๏ผๆฌๆฎตๆชๅๆบ็ ็บงๅคๆ ธ๏ผไนๆชๅคๆตใ่ฅ็ปดๆค่ ่ฎคไธบ่ฏฅ้ๅทฒไฝฟๆฌๆกๅคฑๆ๏ผ่ฏท็ดๆฅ่ฏดๆ๏ผๆไปฌไผๆฎๆญคๆดๆญฃๆฌๆก็ถๆใ
็ฐ่ฑก
ๅฝไธคไธช dsh ๅฎไพๅ ฑ็จๅไธไธช
~/.dshไธป็ฎๅฝ๏ผไพๅฆไบคไบไผ่ฏไธไธไธชๅๅฐ/่ฐๅบฆ่ฟ็จๅ ฑไบซไธป็ฎๅฝ๏ผๆถ๏ผไธคไธชๅฎไพไผไปฅๅ่ช็ฌ็ซ็ seq ่ฎกๆฐๅจๅๅไธไธชsession.jsonl.zstd่ฟฝๅ ๅ ๅฎนใ็ปๆ๏ผ้ๅค็ seq ๆฎตไนฑๅบๅๅ ฅโโ็ ดๅไผ่ฏๆฅๅฟ"seq ไธฅๆ ผๅ่ฐ่ฟ็ปญ"็ๆ ธๅฟไธๅ้โโไผ่ฏๆฐธไน ไธๅฏ่ฏป๏ผๅฎๆตๅฎ่ฏ๏ผๅไฟฎๅคๅฅฝ็ไผ่ฏ๏ผไป ๅ ็ฌฌไบไธชๅฎไพๅๅ ฅ่ๅๆฌกๆๅใ
ๆ นๅ โโ ๅๅ่ ๅ่ฎพๅชๅจ่ฟ็จๅ ๆ็ซ
ๅผๆ็กฎๅฎๅ่ฐๅ่ โโไฝๅชๅจๅไธช่ฟ็จๅ ใ
dsh-session-persistenceๅธฆๆไธไธชๆ coordinator ็ป็ป็ๆณจๅ่กจ๏ผๅฏนๆชๅๅธไผ่ฏๅๆไปไฟ็๏ผdsh-session-persistence/lib/index.js:17-20ใ:55ใ:167๏ผใ่ฟไฟๆค็ๆฏ"ไธไธช่ฟ็จไธๅ่ชๅทฑๆๆถ"ใ่ๆไน ๅๆไปถๅ็ซฏๆฒกๆ่ทจ่ฟ็จไฟๆค๏ผ
appendLinesไปฅ็บฏ่ฟฝๅ ๆจกๅผๆๅผๆฅๅฟโโopen(path, "a")๏ผdsh-session-persistence-jsonl/lib/index.js:1203๏ผโโๅๅ ฅๅนถ fsync๏ผ:1211-1214๏ผ๏ผๅชๅจ่ช่บซๅๅคฑ่ดฅๆถๅๆป๏ผ:1215-1223๏ผใๆฒกๆ้ๆไปถใๆฒกๆO_EXCLใๆฒกๆ้ๅฏนๅค้จๅ่ ็ inode/seq ๆ ก้ชใไนๆฒกๆๅฏๅจๆถๅฏน"ๅฆไธ่ฟ็จๆญฃๆๆ่ฏฅไธป็ฎๅฝ"็ๆฃๆฅใๆไปฅ๏ผๅๅ่ ๆจกๅๆฏๆๆ่ฎพ่ฎก๏ผ่ฟ็จๅ coordinator๏ผ๏ผไฝๅฎ็ๆไน ๅๅผบๅถๆๆฎต็ผบๅคฑใ็ฌฌไบไธชๅ่ ๅจๅฏๅจๆถใๅๅ ฅๆถ้ฝไธไผ่ขซๅ็ฐ๏ผๆๅๅชๅจไบๅไปฅ่ฏป้่ฏฏ็ๅฝขๅผๆด้ฒใ
ๅฝฑๅ่ๅด๏ผๅ็บง โโ ็ไบง / ่ฟๅบฆ / ่ฐๅบฆ๏ผ
ๆๆ่กไธบ
ๅค็ฐๆญฅ้ชค
~/.dsh/sessions๏ผใseq gap๏ผๅๅฒไธๅฏ็จใ็ฏๅข
@deepseek-ai/dsh0.1.0-rc.6/0.1.0-rc.7๏ผๅไธ~/.dshไธป็ฎๅฝใ@deepseek-ai/dsh0.1.1-rc.2ไธ้ช่ฏ่ฏๆฎ๏ผ่ฑๆ + ๆบ็ ๏ผ
dsh-session-persistence/lib/index.js:17-20ใ:55ใ:167โโ ่ฟ็จๅ coordinator๏ผๆไปไฟ็ไธๅๅ ฅๆ็ปไป ๅจๅไธ่ฟ็จๅ ็ๆใdsh-session-persistence-jsonl/lib/index.js:1200-1227โโappendLines๏ผopen(path, "a")๏ผ:1203๏ผใๅๅ ฅ + fsyncใไป ๅจ่ช่บซๅคฑ่ดฅๆถๅๆป๏ผๆ ้ใๆ ๆไปๆ ๅฟใๆ ๅค้จๅ่ ๆฃๆตใOriginal report (archived for transparency) / ๅ็ๆฅๅ๏ผๅฝๆกฃไฟ็๏ผ
EN
Observed behavior (original). When two dsh instances run against the same
~/.dshhome (e.g. desktop shell +dsh web) and the user continues a conversation, both instances append to the samesession.jsonl.zstdwith independent seq counters. The result is duplicated seq ranges written out of order, and the session becomes permanently unreadable.Impact scope (original). Permanent loss of UI access to sessions (history unavailable); manual recovery required. Silent โ no warning at launch or at write time; corruption is only discovered later. Realistic scenario: user opens the desktop app and a
dsh websession without realizing they share~/.dsh.ไธญๆ
็ฐ่ฑก๏ผๅ็๏ผใ ๅฝไธคไธช dsh ๅฎไพๅ ฑ็จๅไธไธช
~/.dshไธป็ฎๅฝ๏ผ็จๆทๅจๅ ถไธญไปปไธๅฎไพ็ปง็ปญๅฏน่ฏๆถ๏ผไธคไธชๅฎไพไผไปฅๅ่ช็ฌ็ซ็ seq ่ฎกๆฐๅจๅๅไธไธชsession.jsonl.zstd่ฟฝๅ ๅ ๅฎนใ็ปๆ๏ผ้ๅค็ seq ๆฎตไนฑๅบๅๅ ฅ๏ผไผ่ฏๆฐธไน ไธๅฏ่ฏปใๅฝฑๅ่ๅด๏ผๅ็๏ผใ ไผ่ฏๆฐธไน ๅคฑๅป UI ่ฎฟ้ฎ๏ผๅๅฒไธๅฏ็จ๏ผ๏ผ้่ฆๆๅทฅๆขๅคใ้้ปๅ็โโๅฏๅจๆถใๅๅ ฅๆถ้ฝๆฒกๆ่ญฆๅ๏ผ็จๆทไบๅๆๅ็ฐๆๅใ็ๅฎๅบๆฏ๏ผ็จๆทๅๆถๅผ็ๆก้ขๅบ็จๅไธไธช
dsh web๏ผไธ็ฅ้ๅฎไปฌๅ ฑ็จ~/.dshใ็ฝฒๅ / About this report
EN: Reported by the OfferKuai (Offerๅฟซ) Team โ an AI startup building full-lifecycle job-application services, guided by the belief that "users need results, not repeated conversations." Founder: Zhaofeng (Yaming). We use DeepSeek Harness as part of our daily development workflow; this report is our way of contributing back to the ecosystem. Website: https://www.offerkuai.com/ | Contact: <contact@offerkuai.com>
ZH: ๆฌๆฅๅ็ฑ OfferKuai๏ผOfferๅฟซ๏ผๅข้ๆไบค โโ ไธๅฎถไธๆณจ AI ๅ จๆต็จๆฑ่ๆ็ฎก็ๅไธๅข้๏ผๆ ธๅฟ็ๅฟตๆฏใ็จๆท่ฆ็ๆฏ็ปๆ๏ผไธๆฏ้ๅคๅฏน่ฏใใๅๅงไบบ๏ผZhaofeng๏ผYaming๏ผใๆไปฌๅฐ DeepSeek Harness ็จไบๆฅๅธธๅผๅๅทฅไฝๆต๏ผ่ฟไปฝๆฅๅๆฏๆไปฌๅฏน็คพๅบ็ๅ้ฆใๅฎ็ฝ๏ผhttps://www.offerkuai.com/ | ่็ณป๏ผ<contact@offerkuai.com>
ๅไฝ่ฏดๆ๏ผๆฌๆ็ฑๆๅจ็ๅฎไฝฟ็จไธญๅค็ฐๅนถ่ฎฐๅฝ๏ผๆ นๅ ไธๆๆ็ฑ AI ๅๅฉๅฎๆ๏ผๆ่ด่ดฃๆ ก้ชไธๅๅธใๆ้ๅทฅ็จ่ๆฏ๏ผๆๆฏ่กจ่ฟฐๅฆๆ้่ฏฏ๏ผๆฌข่ฟๆๅบโโๆไผๅๅป็จๅทฅๅ ท้พ้ๆฐ้ช่ฏๅๆดๆญฃใ
All reactions