Repository navigation
fix(deepseek-harness): emit session format v4 message sources - #2408
Pasitearko wants to merge 4 commits into
Conversation
🤖 Open Code ReviewTarget: PR #2408 🔍 OpenCodeReview found 1 issue(s) in this PR. 1.
|
|
|
Independent verification of this change on a live DSH 0.1.7 host Adding field evidence for the two points that are hard to settle from the diff alone: that this PR changes the correct thing, and that the automated-test Environment
1. The PR's final shape passes the check that throws The production error comes from the released admission validator: // node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/lib/index.js:126
if (!isSessionFormatJsonObject(value) || typeof value["kind"] !== "string"
|| value["kind"].length === 0 || value["kind"] === "plugin")
throw new SessionFormatError("format v4 message requires a producer-owned source kind");The same check is duplicated in the bundled persistence worker ( Feeding that validator four candidate sources (via So the diff is sufficient: no non-empty-string kind other than 2. Agreed with the note already posted on #2405. 3. End-to-end result on a live host Before the change, a turn died during Scanning every session log on that host:
This confirms the change is forward-compatible with old rows: pre-existing v3 sessions keep being read through the migration, while new writes are already canonical. Conclusion The change is verified working against the real failing host, and the One suggestion for whoever finishes this: the adapter README still describes the recall source as |
|
@Memtensor-AI 补一份 DSH 侧的独立验证,供这个 PR 参考。 环境:DSH 1. 现象与定位:升级后并非每轮都失败,而是只在自动召回真的注入消息的那一轮失败——界面「本轮运行失败」,异常为 2. 落库证据:memos 自己记下了这次的 {"dshTurn":7,"turnEndReason":{"kind":"error","error":{"message":"format v4 message requires a producer-owned source kind","code":"UNKNOWN"}},"initialUserText":"继续","lastAssistantText":""}失败轮的 v4 日志停在 3. 本 PR 的改动经真机验证通过:在本地按本 PR 的形状改掉两处来源后(
4. 关于 5. 附带的运行时提醒(与本 PR 无关,但会掩盖本次修复): English summary Independent live verification on DSH |
|
Verified independently here too: Windows 11, DSH Desktop 0.2.0-rc.2, npm still ships 2.0.20, so anyone on the released plugin hits this on the first turn that produces a recall. Could a maintainer take a look? The fix has now been reproduced and verified by several independent users. |
DSH 0.1.7 introduced session format v4, which retires the
kind: "plugin"+pluginsource shape in favour of producer-owned kinds. The DeepSeek Harness adapter still writes the retired shape in two places, so every turn fails withformat v4 message requires a producer-owned source kindduringagent/pre-step.adapters/deepseek-harness/index.ts— recall message source →kind: `plugin:${DEEPSEEK_HARNESS_PLUGIN}`(drops thepluginfield)adapters/deepseek-harness/host-llm.ts— host LLM message source →kind: `plugin:${HOST_LLM_MESSAGE_SOURCE}`This matches the shape DSH's own v3→v4 migration produces for the same rows, so it stays readable on DSH 0.1.5 as well. No other plugin-side change is needed: the v4 check only requires
source.kindto be a non-empty string other than"plugin", and the plugin's own filters match onsource.kind === "user".Unit test assertions updated accordingly.
Fixes #2405
Prior automation: PR #2406 carried the same change but was closed without merging (commit
5f5d63f2), so it can be cherry-picked instead of re-applied if that is easier.