Skip to content

chore(deps): 宿主开发依赖对齐 0.2 线(0.1.0-rc.6 → 0.2.0-rc.1) - #344

Merged
modusensus merged 1 commit into
mainfrom
feat/dsh-0.2-compat
Sep 30, 2026
Merged

modusensus merged 1 commit into
mainfrom
feat/dsh-0.2-compat

Conversation

@modusensus

Copy link
Copy Markdown
Member

问题

peerDependencies 从 #121 起就声明覆盖 0.2.x:

>=0.1.0-rc.6 <0.2.0 || >=0.1.5-rc.0 <0.3.0 || >=0.2.0-rc.0 <0.3.0

但 devDependencies 一直停在 ^0.1.0-rc.6 —— 在 0.x 语义下这等于 >=0.1.0-rc.6 <0.2.0,永远装不到 0.2.x —— lockfile 锁在 0.1.0-rc.8,CI 的 npm ci 装的也是这套。

结果:声明支持 0.2,却没有任何测试跑在 0.2 上。中间隔着 0.1.5 / 0.1.6 / 0.1.7 三条线,外加整个 0.2.0。而当前桌面端 DSH NEXT 2.0.16-next 内置的内核已经是 0.2.0-rc.1 —— 用户跑在从未被验证过的版本上。

改动

  • 四个 @deepseek-ai/dsh-* 开发依赖 ^0.1.0-rc.6 → ^0.2.0-rc.1(现锁 0.2.0-rc.2,caret 覆盖整个 0.2.x)
  • README 前置条件的兼容性说明改为与 peer 声明一致(原文只写「兼容 DSH 0.1.x」)

运行时代码零改动:src/ 未动、lib/ 未重新生成(check-sync 通过)。peerDependencies 未改,0.1.x 仍可安装。

验证

测试 1437 项,两个内核版本都跑过:

内核 结果 说明
0.2.0-rc.1 1436 通过 / 0 失败 / 1 跳过 当前桌面端 2.0.16-next 内置
0.2.0-rc.2 1436 通过 / 0 失败 / 1 跳过 ^0.2.0-rc.1 解析到的最新

另有完整 CI 路径回放(npm ci → check-sync → npm test)全绿。

依赖面本身很小,升级无需改代码。src/ 只用到宿主四个 API:

API 包 0.2 线上状态
createUserMessage dsh-llm 在,签名不变({content, source})
BlockAssembler dsh-llm 在
defineTool dsh-tools 在
z schemastery 在(3.18.4)

另注:createMessage 在 0.2 上仍是 structuredClone + deepFreeze、不带 schema 校验,所以 source.kind: "plugin:dsh-mneme" 这类自定义取值不会被拦。

一个遗留问题(不在本 PR 范围)

改完之后,0.1.x 变成了「声明但不再被 CI 覆盖」的那一侧。本 PR 保留 peer 里的 0.1.x 分支(老桌面端仍可安装,且运行时代码零改动所以行为不变),但要让两边都有覆盖,需要给 CI 加一个宿主版本矩阵维度——代价是 CI 时间翻倍。要不要做、怎么做,想听意见。

peerDependencies 自 #121 起已声明覆盖 0.2.x,但 devDependencies 与 lockfile
一直停在 0.1.0-rc.8,CI 的 npm ci 装的也是这套——声明支持 0.2 却从未验证,
中间隔着 0.1.5 / 0.1.6 / 0.1.7 三条线外加整个 0.2.0。本次把四个
@deepseek-ai/dsh-* 开发依赖提到 ^0.2.0-rc.1(现锁 0.2.0-rc.2),并让
README 的兼容性说明与 peer 声明一致(原文只写「兼容 DSH 0.1.x」)。

运行时代码零改动:src/ 未动、lib/ 未重新生成,check-sync 通过。测试 1437 项
在 0.2.0-rc.1(当前桌面端 2.0.16-next 内置内核)与 0.2.0-rc.2 上均
1436 通过 / 0 失败 / 1 跳过。

依赖面本身很小,升级无需改代码:src/ 只用到宿主四个 API——dsh-llm 的
createUserMessage 与 BlockAssembler、dsh-tools 的 defineTool、schemastery 的
z;0.2 线上这四个都在,createMessage 仍是 structuredClone + deepFreeze、
不带 schema 校验,故 source.kind: "plugin:dsh-mneme" 之类的自定义取值不受影响。
Copilot AI lite review requested due to automatic review settings September 30, 2026 11:08
@coderabbitai

coderabbitai Bot commented Sep 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 6 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: slow-stack/mneme/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: a7245c9a-342c-4e2d-8295-c3c073e819e8

📥 Commits

Reviewing files that changed from the base of the PR and between 8519f57 and 979fec2.

⛔ Files ignored due to path filters (1)
  • dsh-mneme/package-lock.json is excluded by !**/package-lock.json, !**/package-lock.json
📒 Files selected for processing (2)
  • dsh-mneme/README.md
  • dsh-mneme/package.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Sep 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@modusensus
modusensus merged commit 9968bd0 into main Sep 30, 2026
9 checks passed
modusensus added a commit that referenced this pull request Oct 1, 2026
… 依赖对齐 / #345 CVE 清零 / #346 测试数口径 / #348 CI 兼容腿 / #349 巩固阈值基线
modusensus added a commit that referenced this pull request Oct 1, 2026
* chore: v0.8.12 发布准备(版本号 + 测试徽章 + CHANGELOG/路线图占位行)

请在 CHANGELOG 与两个 README 的占位行补描述后再合并。

* docs(changelog): v0.8.12 发版节承接本轮 9 个 PR——#341–#347 图谱四块 + #344 宿主 0.2 依赖对齐 / #345 CVE 清零 / #346 测试数口径 / #348 CI 兼容腿 / #349 巩固阈值基线

---------

Co-authored-by: modusensus <[email protected]>
@modusensus
modusensus deleted the feat/dsh-0.2-compat branch October 1, 2026 05:54
neoneye pushed a commit to agent-memory-atlas-archive/modusensus--dsh-mneme that referenced this pull request Oct 1, 2026
peerDependencies 声明覆盖三段(0.1.0-rc.6+ / 0.1.5-rc.0+ / 0.2.0-rc.0+),但 CI
只用 lockfile 里那一版(当前 0.2 线)——「声明支持却从没人验证」正是 slow-stack#344 的由来。
新增 test-host-legacy,把 0.1.0-rc.8 与 0.1.7-rc.2 各跑一遍全量测试。

为什么另开作业、而不是给 test 加一个 matrix 维度:test 的四个作业名
(test (os, node))是分支保护的 required status checks,加维度会让名字变成
test (os, node, host)、原名消失 → 所有 PR 立刻卡死无法合并。另开作业完全不碰那
四个必需检查;若要让这条腿也阻断合并,去 Settings → Branches 把
test-host-legacy (*) 加进 required 即可。

实现要点:
- 换掉四个宿主 devDeps 后必须删掉 lockfile 重新解析:带着 0.2 的锁降级会被 peer
  链拦死(dsh-tools 的 peer 要求同版本的 dsh-agent,而锁里是 0.2.x)。因此这条腿
  的树是全新解析的,它只回答宿主 API 面是否兼容;依赖版本一致性仍由 test 腿的
  npm ci 负责。
- 解析与安装分成两步(先 --package-lock-only 再 npm ci):解析失败与下载失败能
  区分开,且安装结果严格等于解析出的锁。
- 新增断言步骤:目标版本没真正装上就响亮失败,避免出现「其实测的是别的版本」的
  假绿。
- 全新解析会把运行时闭包也换成当前最新,而 runtime-manifest.json 由 lockfile
  生成 → 先重建清单再跑测试,否则那条「清单与 lockfile 一致」的用例必红,且与
  本腿要问的问题无关。
- 只跑 ubuntu + node 24 单分片:这条腿问的是宿主 API 面,与 OS / Node 无关(那些
  由 test 腿的四个分片覆盖),单分片足够且最省。
- 顺带同步 AGENTS.md 闸门清单里对 CI 矩阵的描述。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants