Repository navigation
Replies: 8 comments 2 replies
EN / EnglishEvidence chain — every rejection site (verbatim, @rc.2)F1 — dsh-session/lib/types/index.js:30-31 (the session header check) if (record.version !== SESSION_FORMAT_VERSION) {
throw new Error(`session header version must be ${SESSION_FORMAT_VERSION}, got ${String(record.version)}`);
}
F2 — dsh-session-persistence/lib/index.js:1103-1106 ( assertVersion(meta) {
if (meta.version === SESSION_FORMAT_VERSION) return;
throw this.unsupported(meta, sessionFormatVersionRefusal(meta.id, meta.version));
}F3 — dsh-session-persistence/lib/index.js:481-483 (the refusal text itself) function sessionFormatVersionRefusal(id, version) {
return version > SESSION_FORMAT_VERSION
? `... the log was written by a newer harness — upgrade the harness to open it`
: `... older than the supported v${SESSION_FORMAT_VERSION}, and this build ships no upgrade path for it`;
}The F4 — dsh-session-persistence-jsonl/lib/index.js:181-195 ( function refuseForeignFormatVersion(parsed) {
if (typeof parsed !== "object" || parsed === null) return;
const { version, id } = parsed;
if (typeof version !== "number" || version === SESSION_FORMAT_VERSION) return; // :184
throw new SessionFormatUnsupportedError(sessionFormatVersionRefusal(...)); // :185
}Plus encoding-mismatch hard refusal at F5 — dsh-subagent/lib/index.js:328 (const) + :386 (check) const SUBAGENT_DESCRIPTOR_VERSION = 2; // :328
...
if (version !== 2) return void 0; // :386 — silently skips, does NOT upgradeF6 — dsh-llm-deepseek/lib/index.js:522 if (index.formatVersion !== 3 || !Array.isArray(index.records)) throw new InvalidUploadIndexError("llm-deepseek: unsupported upload index format");F7 — dsh-llm-pi-ai/lib/index.js:100 if (response["version"] !== 2) return invalidReplay(`unsupported version ${String(response["version"])}`);Why a bump = mass unreadable (mechanics)The refusals are gated only on
The asymmetry that makes it dangerousF3's message implies "upgrade the harness and it'll open" — but upgrading changes the current version, which only makes the reader expect the new format. Old v0 logs still don't match → still 中文版 / ZH证据链 —— 每一处拒绝点(原文,@rc.2)F1 — dsh-session/lib/types/index.js:30-31(会话头校验) if (record.version !== SESSION_FORMAT_VERSION) {
throw new Error(`session header version must be ${SESSION_FORMAT_VERSION}, got ${String(record.version)}`);
}
F2 — dsh-session-persistence/lib/index.js:1103-1106( assertVersion(meta) {
if (meta.version === SESSION_FORMAT_VERSION) return;
throw this.unsupported(meta, sessionFormatVersionRefusal(meta.id, meta.version));
}F3 — dsh-session-persistence/lib/index.js:481-483(拒绝文案本身) function sessionFormatVersionRefusal(id, version) {
return version > SESSION_FORMAT_VERSION
? `... the log was written by a newer harness — upgrade the harness to open it`
: `... older than the supported v${SESSION_FORMAT_VERSION}, and this build ships no upgrade path for it`;
}
F4 — dsh-session-persistence-jsonl/lib/index.js:181-195( function refuseForeignFormatVersion(parsed) {
if (typeof parsed !== "object" || parsed === null) return;
const { version, id } = parsed;
if (typeof version !== "number" || version === SESSION_FORMAT_VERSION) return; // :184
throw new SessionFormatUnsupportedError(sessionFormatVersionRefusal(...)); // :185
}外加编码不匹配硬拒: F5 — dsh-subagent/lib/index.js:328(常量)+ :386(校验) const SUBAGENT_DESCRIPTOR_VERSION = 2; // :328
...
if (version !== 2) return void 0; // :386 —— 静默跳过,不升级F6 — dsh-llm-deepseek/lib/index.js:522 if (index.formatVersion !== 3 || !Array.isArray(index.records)) throw new InvalidUploadIndexError("llm-deepseek: unsupported upload index format");F7 — dsh-llm-pi-ai/lib/index.js:100 if (response["version"] !== 2) return invalidReplay(`unsupported version ${String(response["version"])}`);为什么 bump = 全部不可读(机制)拒绝逻辑只按
让它危险的不对称F3 的文案暗示"升级 harness 就能打开"——可升级只是把当前版本改掉,reader 只会期待新格式。旧的 v0 日志依然不匹配 → 依然 |
EN / EnglishFix directions (directions only — not a patch)
Suggested priority
How this gap sits with the other architecture gapsThis is the format-evolution dimension of the same root pattern we've been mapping: DSH is self-consistent in an ideal static environment, but lacks basic contracts for a must-evolve production environment. It joins three sibling gaps already documented in our audit:
Format v0 with no migration is the fourth: correctness is assumed to never require a format change — but production inevitably does. Any one necessary fix turns "the data is safe" into "all history is gone", with no rollback. 中文版 / ZH修复方向(仅方向,非补丁)
建议优先级
本缺口如何与其余架构缺口并列这是我们一直在梳理的同一根因模式的格式演进维度:DSH 在理想静态环境下自洽,却缺乏必须演进的生产环境所需的基础契约。它与我们审计中已记录的三处缺口并列:
格式 v0 无迁移 是第四处:正确性被假设为"永远不需要改格式"——但生产必然要改。任何一次必要的修复,都会把"数据很安全"变成"全部历史没了",且无回退。 |
Follow-up 3 — the desktop line just shipped a v0→v1 migrator, and it trips on v0 diversity (2026-09-06)Worth an update to this thread's claim, because upstream moved since we posted it. On the npm line, the claim stands unchanged. On the desktop/master line, upstream has now built a
xiaoyuyu6420 explains the fail-fast is deliberate (protect the original artifact) and suggests the fix direction — tolerate unknown members instead of refusing the session; jiangjiaqing has since reproduced it and prepared a tested fix for this specific variant (recognizes the exact flat pi-ai version-1 replay state, wraps its finish-chunk and assistant-message copies as That is a live confirmation of the mechanism behind this thread: format v0 never had a unified contract. Different writers (pi-ai generation variants etc.) left private members like For npm-package users (rc.1 and earlier) nothing has changed; for the desktop line, this is the first concrete evidence that the migration problem we outlined is being hit in the wild on the official migrator itself. Related: #5694 (migrator fail-fast on 跟帖3 — 桌面线刚上线 v0→v1 迁移器,而它正撞上 v0 多样性(2026-09-06)这条帖子的主张需要更新——上游在我们发帖后已经动了。 npm 线:原结论不变。 桌面/master 线:官方已构建
xiaoyuyu6420 说明 fail-fast 是故意的(保护原件),并建议修复方向为"宽容未知成员"而非拒收整会话;jiangjiaqing 已复现并对这个特定变体备好 tested fix(识别 flat pi-ai version-1 replay state 形态、把 finish-chunk 与 assistant-message 副本包装为 这是本帖机制的活体确认:格式 v0 从来没有统一契约。 不同写入方(pi-ai 各代变体等)在日志里留下了私有成员(如 对 npm 包用户(rc.1 及更早)没有任何变化;对桌面线,这是"我们指出的迁移问题正在官方迁移器本身上被真实撞到"的第一份实证。 相关:#5694(迁移器对 Authorship note: reproduced and documented by me in real-world usage; root-cause tracing and drafting assisted by AI; verification and publication by me. I have no engineering background — if any technical claim reads wrong, please call it out; I will re-verify against the toolchain and correct. |
EN / EnglishFollow-up 4 — both upstream lines have now moved in the direction this thread predicted (2026-09-07)Two updates since Follow-up 3, both relevant to the claim. 1. The desktop line shipped a real migration path — as adjacent-generation, not one-shot. 2. The community fix direction is "admit what was actually released", not "v0 was well-specified". argszero source-verified both refusals in #5818 against release history and current master ( So the two halves of this thread's original claim are now each confirmed by a different upstream-side actor: the official line chose migration (adjacent-generation, admitting v0 lacks a single contract), and the community fix is reader-side tolerance of released shapes (admitting the diversity accumulated). Neither side chose "v0 is fine as-is". For npm-package users nothing has changed yet (rc.1 has no migrator); the migration problem we outlined in August is being hit and worked on exactly where we said it would be. Heads-up for @denial123789 (SandBase handbook): the Session storage-format guide entry this thread spawned (v0.5.291) may want a sync — upstream has since shipped v2 adjacent-generation migrations ( Related: #5694 (v0→v1 migrator fail-fast on Authorship note: reproduced and documented by me in real-world usage; root-cause tracing and drafting assisted by AI; verification and publication by me. I have no engineering background — if any technical claim reads wrong, please call it out; I will re-verify against the toolchain and correct. 中文版 / ZH跟帖4 —— 上游两条线都已朝本帖预测的方向移动(2026-09-07)跟帖3 之后又有两个更新,都与本帖主张相关。 1. 桌面线发布了真正的迁移路径——是"相邻代际",不是一次性。 2. 社区修复方向是"接纳真实发布过的形状",不是"v0 是良好规范的"。 argszero 对照 release 历史与当前 master( 于是本帖原始主张的两半,现在分别被上游侧的不同角色确认:官方线选择了迁移(相邻代际,等于承认 v0 无单一契约),社区修复是 reader 侧宽容已发布形状(等于承认多年累积的多样性)。两边都没有选择"v0 本来就规范"。对 npm 包用户一切照旧(rc.1 无迁移器);我们 8 月指出的迁移问题,正在我们预言的位置被真实撞到并修复。 给 @denial123789(SandBase handbook)的提示:本帖催生的 Session storage-format 指南条目(v0.5.291)可能值得同步——上游已发布 v2 相邻代际迁移( 相关:#5694(v0→v1 迁移器对 协作说明:本文由我在真实使用中复现并记录;根因与成文由 AI 协助完成,我负责校验与发布。我非工程背景,技术表述如有错误,欢迎指出——我会回去用工具链重新验证后更正。 |
|
补两个具体的、可复现的迁移缺口(都是「合法日志 + 零迁移路径 = 会话永久打不开」)。 背景:一批会话是从另一台机器 / 较早构建复制过来的(v0 与 v2 日志)。在当前 0.1.5-alpha.1 上全部被拒迁移, 缺口 1:v2 日志的
缺口 2:
缺口 3(同类,供参考):同一存储里 17 个 最小复现(使用包内真实链路,无需起服务): // node --input-type=module repro.mjs
import { zstdDecompressSync } from 'node:zlib';
const { sessionFormatCatalog } = await import('@deepseek-ai/dsh-session-format-catalog');
// 读出日志文本:多帧 zstd,逐帧解压后拼接(帧头 28 B5 2F FD)
// 第 1 帧 = 仅一行 header,第 2 帧起 = 事件行
function text(file) { /* 逐帧 zstdDecompressSync 后 Buffer.concat -> utf8 */ }
const lines = text(process.argv[2]).split('\n'); // session.v2.jsonl.zstd / session.v3.jsonl.zstd
const header = JSON.parse(lines[0]);
const restore = sessionFormatCatalog.createRestore(header, {
recovery: 'recoverable',
validation: 'transformed',
});
for (let i = 1; i < lines.length; i++) {
const s = lines[i].trim(); if (!s) continue;
restore.decodeRow(JSON.parse(s)); // 缺口 1 / 2 的 refusal 在此抛出
}
const artifact = restore.finish(); // 成功路径:得到 v3 事件
console.log('events =', artifact.events.length);本地规避(未改写任何会话内容):临时给 影响面:本机 DSH home 有 17 个 Adding two concrete, reproducible migration gaps (both "valid log + zero migration path = permanently unopenable session"). Context: a batch of sessions was copied from another machine / an earlier build (v0 and v2 logs). On the current Gap 1: v2
Gap 2:
Gap 3 (same family, FYI): 17 Minimal repro (real chain from the shipped packages, no server needed): // node --input-type=module repro.mjs
import { zstdDecompressSync } from 'node:zlib';
const { sessionFormatCatalog } = await import('@deepseek-ai/dsh-session-format-catalog');
// Read the log text: multi-frame zstd; decompress each frame and concat (frame magic 28 B5 2F FD).
// Frame 1 = exactly one header line; frames 2..n = event rows.
function text(file) { /* per-frame zstdDecompressSync, then Buffer.concat -> utf8 */ }
const lines = text(process.argv[2]).split('\n'); // session.v2.jsonl.zstd / session.v3.jsonl.zstd
const header = JSON.parse(lines[0]);
const restore = sessionFormatCatalog.createRestore(header, {
recovery: 'recoverable',
validation: 'transformed',
});
for (let i = 1; i < lines.length; i++) {
const s = lines[i].trim(); if (!s) continue;
restore.decodeRow(JSON.parse(s)); // gap 1 / 2 refusals throw here
}
const artifact = restore.finish(); // success path: v3 events
console.log('events =', artifact.events.length);Local workaround (no session content rewritten): temporarily add the missing kind to Impact data: one local DSH home has 17 |
|
Closing this one out. We re-checked it against Authorship note: drafting assisted by AI; verification and publication by me. I have no engineering background — if any technical claim reads wrong, please call it out. Reported by the OfferKuai Team. 中文版收口。这一条我们已于 2026-10-07 对着 协作说明:成文由 AI 协助完成,我负责校验与发布。我非工程背景 —— 若任何技术表述有误,请直接指出,我会对照工具链重新核实并更正。 本报告由 OfferKuai(Offer快)团队提交。 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
EN / English
TL;DR
Every durable format in DSH stamps a
versionand hard-refuses any non-current version, yet nowhere in the codebase is there a migration, upgrade, or dual-write path. TodaySESSION_FORMAT_VERSION=0(and descriptor v2 / upload-index v3 / replay v2) all happen to be the first version, so the refusals never fire. The moment a format must change — and production-grade use inevitably forces it — every already-on-disk session becomes unreadable at once, with no rollback. This is not a rendering bug; it is a format-evolution contract gap at the persistence layer.What every persistence layer does today
SESSION_FORMAT_VERSION(=0)record.version !== SESSION_FORMAT_VERSION→ throwassertVersion→ throwunsupported:482)refuseForeignFormatVersion→ throwSessionFormatUnsupportedError; encoding mismatch also throwsSUBAGENT_DESCRIPTOR_VERSION=2version !== 2→return void 0(skip, no upgrade)formatVersion=3index.formatVersion !== 3→ throwInvalidUploadIndexErrorversion=2response["version"] !== 2→invalidReplayThe README is explicit (dsh-session-persistence-jsonl/README.md:38): "There is no migration, mixed-root fallback, or dual write." And :72: "Only the configured encoding and current
SESSION_FORMAT_VERSION(v0) load … the pre-release format has no migration."Why this is a production time-bomb, not a "pre-release quirk"
The current silence is purely because the version has never been bumped. That is a pre-release lock-state, not a designed evolution strategy. But production-grade operation forces a bump:
When any bump ships, F1–F4 immediately
throwon every existing v0 log. The F3 message tells users to "upgrade the harness" — but upgrading still offers no upgrade path; old logs stay unreadable. There is no migration window, no dual-write, no rollback.Blast radius
What's in the follow-ups
Authorship note: reproduced and documented by me in real-world usage; root-cause tracing and drafting assisted by AI; verification and publication by me. I have no engineering background — if any technical claim reads wrong, please call it out; I will re-verify against the toolchain and correct.
中文版 / ZH
一句话
DSH 每一层持久化格式都戳了
version并硬拒任何非当前版本,但整个代码库里没有任何迁移 / 升级 / 双写路径。今天SESSION_FORMAT_VERSION=0(以及 descriptor v2 / upload-index v3 / replay v2)恰好都还是首发版本,所以拒绝逻辑从未触发。可一旦格式必须变更——而生产级使用必然逼出变更——所有已落盘的会话会瞬间全部不可读,且无回退。这不是渲染 bug,是持久化层的格式演进契约缺口。今天每一层持久化在做什么
SESSION_FORMAT_VERSION(=0)record.version !== SESSION_FORMAT_VERSION→ throwassertVersion→ throwunsupportedrefuseForeignFormatVersion→ throwSessionFormatUnsupportedError;编码不匹配同样 throwSUBAGENT_DESCRIPTOR_VERSION=2version !== 2→return void 0(跳过,不升级)formatVersion=3index.formatVersion !== 3→ throwInvalidUploadIndexErrorversion=2response["version"] !== 2→invalidReplayREADME 说得很直白(dsh-session-persistence-jsonl/README.md:38):"There is no migration, mixed-root fallback, or dual write.";:72:"Only the configured encoding and current
SESSION_FORMAT_VERSION(v0) load … the pre-release format has no migration."为什么是生产级定时炸弹,而非"pre-release 小瑕疵"
现在的风平浪静,纯粹是因为版本号从未 bump 过——这是 pre-release 的锁版本状态,不是设计好的演进策略。但生产级运营必然逼出 bump:
任一 bump 上线后,F1–F4 会立刻对所有现存 v0 日志
throw。F3 的文案让用户去*"upgrade the harness"*——可升级后仍然没有 upgrade path,旧日志还是读不了。没有迁移窗口、没有双写、没有回退。爆炸半径
跟帖说明
署名 / About this report
EN: Reported by the OfferKuai (Offer快) Team — an AI startup building full-lifecycle job-application services, guided by the belief that "users need results, not repeated conversations." Founder: Zhaofeng (Yaming). We use DeepSeek Harness as part of our daily development workflow; this report is our way of contributing back to the ecosystem. Website: https://www.offerkuai.com/ | Contact: contact@offerkuai.com
ZH: 本报告由 OfferKuai(Offer快)团队提交 —— 一家专注 AI 全流程求职托管的创业团队,核心理念是「用户要的是结果,不是重复对话」。创始人:Zhaofeng(Yaming)。我们将 DeepSeek Harness 用于日常开发工作流,这份报告是我们对社区的回馈。官网:https://www.offerkuai.com/ | 联系:contact@offerkuai.com
协作说明:本文由我在真实使用中复现并记录;根因与成文由 AI 协助完成,我负责校验与发布。我非工程背景,技术表述如有错误,欢迎指出——我会回去用工具链重新验证后更正。
All reactions