Replies: 2 comments
|
这个现象应与“Session 数据是否已经落盘”分开处理:你给出的 session.list、连续 seq 和 fork 后可见,已经是 Host 写入与 durable replay 的证据;UI 不更新更像 follow stream 的生命周期没有随 session dispose 结束。 建议把复现记录成两条独立时间线:
在确认之前,不要用“切换 Session”或重复发送 prompt 来测试,因为这可能创建新的 live activation,掩盖旧 stream 是否已经终止。安全的验证顺序是:停止 writer 或正常关闭 Host,复制并哈希 Session 根目录,在副本上确认 list/load/fork;再用同一 build 的干净启动验证新 follow 是否能从 durable tail 追上。若 fork 可见而原页面仍停在旧 turn,应把它报告为 Client stream reconnect 问题,而不是 Session 数据丢失。 handbook 的 Session durability runbook 提供了对应的 writer ownership、冷恢复、fork 与 rollback 证据清单:https://sandbaseai.github.io/deepseek-harness-handbook/session-log-durability.html 这条建议不假设 Desktop 包装器是官方发行版,也不把一次重启视为修复;应继续保留原始日志、Host 版本和 Client stream 时间线。 |
|
Verified the full chain against the current tree (cd5ef81 / 0.1.2-alpha.1). Your diagnosis is correct; here is the exact wiring, plus the reconnect mechanism your fix relies on (worth pinning in the PR description). 1. Host side — follow() never terminates on dispose. 2. session/disposed does fire on detach. 3. Client side — stale stream, no self-heal. Session client 4. The reconnect mechanism (your fix's dependency). The 5. One hygiene note. Your snippet registers the Net: correct root cause, correct fix location, and the reconnection path is structurally sound in alpha.1. This is the live-stream counterpart of #3631/#4795 (read-path) — the same "session lifecycle vs client stream lifecycle not reconciled" family. Good write-up. |
Uh oh!
There was an error while loading. Please reload this page.
Bug: after a session goes cold (idle dispose), the UI follow stream keeps waiting forever — later turns exist on disk but never appear (dsh 0.1.2 Desktop)
Symptom
On DSH Desktop 2.0.4 (dsh 0.1.2), a session's chat view freezes at the last completed turn. New turns run correctly on the host (verified:
user/message/assistant/message/turn/endall appended, seq contiguous,session.listadvances), but the Web UI never shows them — it stays pinned on the old turn. Switching sessions and switching back does not recover it. The only recovery is restarting the Desktop app.Evidence
Timeline from the affected session (Beijing time):
session/end-seedis appended (the cold-restore marker).assistant/message).So this is not a data-loss or read-contract problem: the engine produced everything. The UI-side event stream simply never delivered the post-cold-restore events.
Root cause (traced through the shipped source)
SessionHistoryController.follow(dsh-api-session-controller) listens forsession/eventandsession/created— but notsession/disposed:detachSession()→emitDisposed), the follow stream is left open and silent.RemoteJournalStreamnever receives a terminal, soopen()stays idempotent (openState === "open"→ no-op). Every subsequent "switch session back" reuses the stale stream.Verified local fix
Make the follow stream terminate when its session is disposed, so the browser detects the end and reconnects (which re-tails the page and rebuilds the window):
After this patch, a cold session's follow stream closes on dispose, the browser reconnects, and post-restore turns render. Verified working on the released Desktop build.
Relationship to existing discussions
#3631 / #4795 describe a related but distinct defect: a trailing aborted region making the history read path return "no more history". This report is the live-stream counterpart: the stream itself never terminates when the session dies, so even the new turns (which the read path could serve) never reach the UI. Both are the same family — "session lifecycle vs. client stream lifecycle not reconciled" — but the fix locations are different (history read contract vs. follow stream termination).
Environment: DSH Desktop 2.0.4, macOS, dsh 0.1.2.
All reactions