[BUG] 0.1.5-rc.1 会话历史永久无法加载:v0→v1 拒绝已发布的 v0 形状(permission/preset 带 origin) #6189
Mandarin715
started this conversation in
General
Replies: 1 comment 1 reply
|
Confirmed with a local repro against the released converter: dsh-session-surgeon now reports it as |
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.
English TL;DR
@deepseek-ai/dsh-session-format-v0-to-v1refuses a released v0 payload shape, which makes the affected sessions permanently unopenable. Some earlier 0.1.x build wrote the session's firstpermission/presetevent as{"preset":"workspace-write","origin":"default"}, but the frozen v0 inventory declares onlypreset:packages/session/session-format-v0-to-v1/src/dispositions.ts:76assertReleasedEventPayload()→assertReleasedV0Keys()then throwshas unexpected member "origin". The migration leaves the source artifact unchanged (by design), so retrying never helps and there is no self-heal: that session's history cannot be loaded again.Suggested one-line fix — declare the member instead of rejecting the session:
dispositions.tsstates that every listed member is preserved by the identity edge, andoriginis a member that really was released, so admitting it matches the existing contract. (Dropping it in the migration would also be fine, but that has to be an explicit decision, not a side effect of strict validation killing the whole session.)错误信息
最小复现
不需要真实会话,直接调用迁移包自己的校验函数即可复现:
证据:
origin是"已发布的真实数据",不是文件损坏对一个 13.1 MB / 35,916 帧 / 46,969 事件的会话逐帧解压后统计:
data带origin——permission/preset,seq = 0(会话的第一个事件),值"default";permission/preset事件都是{"preset":"…"},没有origin;origin,而更早写下的会话永久无法加载;{"preset":"workspace-write"}。影响
任何由受影响版本创建、且该事件带
origin的 v0 会话永远打不开。迁移按设计不改动源文件,所以重试、重启、升级都不会自愈,用户侧没有任何恢复手段。这类会话可能不止一个,而且往往是最大的那几个(长期使用的会话)。环境
0.1.5-rc.1(@deepseek-ai/dsh-session-format-v0-to-v1版本同为0.1.5-rc.1)session.jsonl.zstd拼接帧容器)备注
如果需要,我可以提供一个脱敏的最小 v0 作品(header + 该事件,拼接帧容器,含 content checksum)作为测试夹具,或按你们的规范补一个
tests/用例。本机已用"只重写含该事件的那一帧、其余帧逐字节保留"的方式验证过:修复后 6 项断言(帧数/逐帧校验和/事件数/零违规/仅目标帧变化/违规字段消失)全部通过 —— 也就是说数据侧没有其它障碍,补声明后这些会话即可加载。All reactions