[Bug] Data dir re-initialized during 0.1.7-rc.1 → rc.2 upgrade (Windows): all sessions / history / plugin state lost — forensics + reproduce commands attached #7921
Replies: 1 comment
|
bug 报告本身无可挑剔。但先说更急的事:你的旧会话大概率还没死,恢复窗口每过一小时都在变小——趁现在 C 盘写入还少,按这个顺序做: 1. 立刻降低写入:暂停在这台机器上的下载/编译/大文件操作,也尽量别反复启动 dsh(每次启动都在往 C 盘写)。NTFS 的「重建」如果是删除+新建,旧 2. 定向恢复:跑 Windows File Recovery( 3. 查「错误 HOME」假说(你的旁证很关键): 4. memory.db 幸存是个好信号:它说明那次「重建」不是全目录 rm,而是选择性的——被删的文件在文件系统层面走的是正常删除路径,恰好是恢复工具最擅长的场景。 恢复之后,报告里「助手自己声明 (我做备份插件的,这种 rc→rc 升级正是最该先拍快照的场景——说多了都是泪,先把上面的恢复做了。) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Evidence package (raw timestamps, logs, upgrade-helper snapshot, reproduce commands):
https://gist.github.com/mylastfree/855d7ad3d4d3ebc9f9041502f16a531e
中文摘要:2026-09-26 02:32–02:36(本地)之间,
$DSH_HOME(C:\Users\16336\.dsh)下的 sessions / storages / dsh-usage / task-board / profiles 被整体重建,全部历史对话、插件状态、用法账本丢失,只剩 1 个当天新建的会话;唯一幸存的是 memory/memory.db(251 MB,2026-08-26 创建,未被改动)。当天的 rc.1 → rc.2 升级助手脚本自己声明session data: skipped by design (V3->V4 restore is non-destructive),而它的备份目录dsh-backup-*与日志目录dsh-upgrade-logs都从未生成;rc.2 实际也没有安装成功(包仍是 0.1.7-rc.1)。另有旁证:C:\Users\16336\profiles\web\node_modules\@deepseek-ai(少拼了.dsh一层)在 02:33:24 被创建。DSH (@deepseek-ai/dsh / DeepSeek Harness) — Loss of all sessions and state data (bug report)
C:\Users\16336)@deepseek-ai/dsh(npm global install) + Windows desktop launcherDSH_HOME=C:\Users\16336\.dsh;DSH_PROFILE=web; launched asdsh web1. Summary
Between 02:32 and 02:36 (local) on 2026-09-26 the directories
profiles/,sessions/,storages/,dsh-usage/,task-board/under$DSH_HOMEwere re-initialized. All previous conversations (
sessions), plugin state, the workspacelist, the usage ledger and settings were lost. Only one conversation created that day remains.
User's own description (translated):
The only surviving store is
memory/memory.db(251 MB, created 2026-08-26).2. Evidence (all of it reproducible)
2.1 Directory CreationTime — on Windows only a delete-then-recreate refreshes it
Reproduce:
2.2 The state stores contain only what was created that day
storages\workspace.jsonholds exactly one workspace:sessions\contains exactly one file:…/session-dc5721ff-…/session.v4.jsonl.zstd(created 02:36:51).task-board\scheduler-v2.jsonis 28 bytes;dsh-usage\usage-ledger.jsonis 14 KB with no history.2.3 Contradicts the upgrade helper's own stated risk assessment
C:\Users\16336\dsh-upgrade-to-017rc2.ps1(created 2026-09-26 02:26, ten minutes before the loss)states multiple times that this upgrade is safe for data:
Info 'session data: skipped by design (V3->V4 restore is non-destructive)'settings.yaml is ALREADY migrated … the irreversible rename CANNOT fire again. This upgrade has no settings risk.Actual result:
sessions/,storages/,dsh-usage/,task-board/,profiles/were allre-initialized, and
$DSH_HOMEnow contains neithersettings.yamlnorsettings.yaml.imported.2.4 The script's own backup and log directories do not exist
C:\Users\16336\.dsh\dsh-backup-<ver>-<stamp>→ missingC:\Users\16336\.dsh\dsh-upgrade-logs\run-<stamp>→ missingSo the loss is not the outcome of the helper running its normal backup → install → verify path;
whatever did it is on the upgrade/restart path where nothing was logged.
2.5 The upgrade itself never landed
→ rc.2 was never installed, yet the state re-initialization already happened.
2.6 Corroborating trace: an install/upgrade path using a wrong profile root
C:\Users\16336\profiles\web\node_modules\@deepseek-ai\(empty dir tree) was created at2026-09-26 02:33:24.
The profile root should be
C:\Users\16336\.dsh\profiles\web; the directory that appeared isC:\Users\16336\profiles\web— the.dshsegment is missing. A path-assembly problem on theinstall/upgrade path was therefore active at exactly the time the state was re-initialized.
2.7 Recovery channels ruled out
session.v4.jsonl*, nodsh-backup-*, nodsh-upgrade-logs.dshcopy exists anywhere on disk3. Timeline (2026-09-26, local UTC+8)
dsh-upgrade-to-017rc2.ps1created (rc.1 → rc.2 upgrade helper).codex/.cua-driver/.local/.workbuddy/.android/.config).dsh\task-boardrecreatedC:\Users\16336\profiles\web\node_modules\@deepseek-aicreated (wrong path)memory.dbwritten (not lost).dsh\profilesrecreated.dsh\.anonymous-user-idrecreated.dsh\sessionsrecreated +workspace.jsonwritten (the only surviving conversation starts here).credentials.yamlrecreated (re-login)4. Questions / requests for the DSH team
$DSH_HOME's session and state directories? Specifically: in therc.1 → rc.2 chain, is there any "if a state store is missing, silently create an empty one" logic,
and what exactly triggers it?
sessions/root? Is the failure site preserved (quarantine /.bak)? The helper script asserts thepath is "non-destructive", yet data disappeared — please point to the real code path.
data (line 341). Please include session data in the official upgrade flow, or take an atomic
rename backup (
sessions.bak-<version>-<ts>) before any migration; no failure should end in deletion.C:\Users\<user>\profiles\web\node_modules\@deepseek-aicreated (missing
.dsh)? Could the same mis-assembled path have written to — or deleted from —somewhere else?
dsh doctor --data(or equivalent) that prints the effectiveDSH_HOME, every storageroot, and an existence/timestamp check, so users can self-diagnose after such an incident.
5. Preserved evidence (not cleaned up)
C:\Users\16336\.dsh\(incl. the only surviving storememory\memory.db)C:\Users\16336\profiles\(the stray wrong-path tree created 02:33)C:\Users\16336\dsh-upgrade-to-017rc2.ps1(created 02:26)C:\Users\16336\dsh-upgrade-scratch\(upgrade scaffolding from 9-22)C:\Users\16336\AppData\Roaming\npm\node_modules\@deepseek-ai\{dsh, dsh.bak-0.1.7-alpha.1-20260922-224246, dsh-root}C:\Users\16336\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txtAll reactions