v0→v1 session migration refuses logs whose permission/preset event carries origin (producer/schema drift) #7133
felixzhang-glitch
started this conversation in
General
Replies: 1 comment
|
这个形态是社区已经归档并处理过的家族成员——#6151 的四类清单里第 1 类就是它( 如果不想自己维护清理脚本可以直接用 surgeon;无论用哪个,动文件前的老三样:停 dsh 进程、dry-run、整目录留一份副本。 你的报告有一个对维护者有用的增量: |
0 replies
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.
Summary
Sessions written around 0.1.2-rc.1 (2026-09-06 era) stamp the
permission/presetevent with an extraoriginmember:{"type":"permission/preset","seq":0,"time":1787364897008,"data":{"preset":"danger-full-access","origin":"default"}}@deepseek-ai/dsh-session-format-v0-to-v1declares the released v0 shape as exactly{ preset }(disposition(["preset"]), no optional members), soassertReleasedV0Keysthrows onoriginand the whole session is refused:Current builds (0.1.6-alpha.2, and master as of 2026-09-19) no longer write
origin, so this is producer/schema drift from a version window — but the affected v0 logs on disk stay permanently unloadable, and the session list plus any usage aggregation silently skips them.Minimal reproduction
A v0
session.jsonlcontaining only:{"type":"session","version":0,"id":"session-00000000-0000-0000-0000-000000000000","createdAt":1787364896985,"cwd":"/tmp","delegationDepth":0,"agentPreset":"standard"} {"type":"permission/preset","seq":0,"time":1787364897008,"data":{"preset":"danger-full-access","origin":"default"}}framed as a zstd log (first frame = header line) fails migration with the error above. Removing
"origin"lets it migrate cleanly.Suggested fix
Admit
originas optional in the v0 disposition forpermission/presetand strip it during migration (a smallnormalizeLegacyPermissionPresetalongside the other normalizers inmigration.ts), so the emitted v1 event stays schema-exact. More generally, the v0→v1 migration could tolerate and drop unknown informational members instead of refusing the whole session — fail-closed on unknown event types still makes sense.(Issues are disabled on this repo, hence posting here. Observed on 20 real sessions across several workspaces; all load fine after locally stripping the member. Happy to send a PR if you agree with the approach.)
All reactions