Replies: 9 comments
|
Follow-up with a runtime lead: on the affected machine the harness was running under Node v22.22.3. dsh's session persistence uses I switched the harness to Node v26.8.2 and it boots and lists sessions normally. I'll keep watching whether corrupt logs recur. Is 26.x the supported runtime for (For reference, the reader-side robustness request stands regardless: one unreadable log currently blocks |
|
Independent confirmation, plus one correction to the framing that matters for detection. The enforced condition is narrower than "the first line is an event". if (plaintext.length === 0 || plaintext.indexOf(10) !== plaintext.length - 1)
throw new Error("corrupt Zstandard session log: first frame is not exactly one header line");i.e. the first zstd frame's plaintext must be exactly one line (its only An honest note from the tooling side. We build an offline diagnostics tool (dsh-doctor), and it did not catch this class: constructing a log whose first row is Two notes that may help triage. (1) On the recurring part: three times in five days points at whatever establishes the first frame on the write path rather than at user action — your report is the reproducible signal for it. Ours only makes the damage visible before the boot fails. |
|
Your runtime lead checks out, with a source anchor — and the The dependency on Node's built-in zstd is direct. import { constants, createZstdCompress, createZstdDecompress, zstdCompress, zstdDecompress, zstdDecompressSync } from "node:zlib";and uses them for the actual log I/O ( On the supported runtime: What we can add empirically: on Node 24.20.0 the same zstd calls emit no Reader-side robustness: agreed, and it is now detectable offline. |
|
On the runtime question, two verified facts that change how this should be closed. Node 22.22.3 is inside the supported range. The repo root declares it — "engines": { "node": "^22.19.0 || >=24.0.0" }22.22.3 satisfies The The reader-side point stands, and it has a cheap shapeOne unreadable log should not be able to say "no sessions". The difference between a one-session incident and apparent total history loss is entirely in
Fail-soft per session turns a boot-blocking corruption into a visible, recoverable one-session problem, which is the same argument as fail-soft plugin loading generally. An offline detector for exactly this conditionWe shipped the check today in ciceroyang/dsh-doctor 0.5.4: node doctor.mjs --profile ~/.dsh # log_health reports the first-frame violation by nameRelease: https://github.com/ciceroyang/dsh-doctor/releases/tag/v0.5.4 It does not repair the log; it makes the condition visible offline and per-log, which is the piece that would have saved you the "all history is gone" window. |
|
两个补充,第二个可能会改变你们的复现方式。 engines 的机制:这个范围确实是仓库根声明的,但声明在私有根 workspace 上,而不是任何一个会发布的包上—— 离线检查正在收敛到同一处:你们加了 S13/S11,我们这边也把 关于边界移动的诊断:你说的 恢复方式很实用,值得置顶:把整个会话目录移出 |
|
按上一条说的做了:抽样改成可全库扫描,刚刚发在 dsh-doctor 0.5.5。 node doctor.mjs --all-logs默认仍是抽样最新 3 个(快); 加这个的原因正是你描述的那种静默:唯一那个坏日志可能刚好在抽样之外,工具报 pass 而启动失败。新增的回归用例就锁这个场景:4 个日志里最旧的一个 header 损坏、其余 3 个健康——抽样给 pass(缺口真实存在), https://github.com/ciceroyang/dsh-doctor/releases/tag/v0.5.5 |
|
Correction to something I said above, now that @ciceroyang has traced it: I claimed the // deepseek-harness/package.json (repo root)
{ "name": "@deepseek-ai/dsh-root", "version": "0.1.5-rc.2", "private": true,
"engines": { "node": "^22.19.0 || >=24.0.0" } }So the accurate statement has two halves, and I only had the second one:
Practical consequence for the tooling side: our On your |
|
谢谢核对与更正。你补的那半句我完全同意,而且我认为它比「registry 里查不到 engines」这个观察更值得写成结论:约束是真实且官方的,只是没有被任何发布物继承,所以对所有人都不生效。 顺着这个,有一个共同的维护风险要记下来:你们的 E3、我们的 另外你那句「一致是巧合还是有意」——从我们的角度是有意的:这个范围来自官方仓库根声明,不是社区约定。所以你之前的表述其实指向了正确的方向,只是机制说反了;现在两边记录一致了就好。 |
|
同意你那句更该被写下来的结论:约束是真实且官方的,只是没有任何发布物继承它,所以对所有人都不生效。这比"registry 里查不到"准确,也更有行动含义——它说明矛盾不在文档,而在发布链。 你的维护风险我照做了(
关于 #2259 是真正的解法,我同意,并想补一条它比"让工具能读元数据"更强的理由:一旦已发布的入口包带上 顺带说一句:你那句"从我们的角度是有意的"也帮我修正了一处判断——我之前把它当成社区约定,是因为只查了 registry(正确的观察、错误的机制)。两边记录现在一致了。 |
Uh oh!
There was an error while loading. Please reload this page.
Environment
0.1.5-rc.1(npm-global@deepseek-ai/dsh), Node v22.22.3, Linuxdsh --profile web --no-open(reproduced with a plain manual launch too)Summary
Three times in ~5 days, a session log under
~/.dsh/sessions/<project-slug>/<session-id>/session.v3.jsonl.zstdended up with its first line being an event instead of the{"type":"session",...}header. Once such a file exists:dsh --profile webfails to boot (exit code 1):session/listfailed wholesale and every workspace showed no sessions, so the UI looked like all history was gone:What the corrupt file looks like
seq: 3, i.e. the header plus eventsseq 0..2are missing — as if the beginning of the file was truncated/replaced, rather than a partial write at the end. Files are single-generation (session.v3.jsonl.zstd, no plain sibling).session-<uuid>directory naming.Impact
dsh webcannot start at all, not just the affected session.Expected
SessionPersistence.list()/WorkspaceRegistry.listStoredHeadersshould skip (or quarantine) an unreadable log and continue; boot should not be blocked by a single corrupt session.Workaround
Move the offending session directory out of
~/.dsh/sessions/(e.g. to~/.dsh/quarantine/).dsh webthen boots and lists normally.Notes
The raw logs contain session content, so I have not attached them; the redacted first line above is the essential shape. I can provide structural dumps (event type/seq only, no content) or a sanitized sample if that helps.
All reactions