Skip to content

[spec] 插件发版必须精确 pin 对应 SKILL 版本(装插件自动带新 skill,全技能) #129

Closed

Description

@FeatherHunter

Problem Statement

用户安装/升级 DSH 技能插件后,拿到的 SKILL 正文仍是旧版(旧 description、旧命令),即使插件本身已是最新。根因:插件用 caret range(如 ^0.2.0)声明 skill 依赖,而 lockfile 里已有的旧满足版本会被包管理器原地保留、不重解。已实证:[email protected] 发布后,真机 skill-calorie 仍锁在 0.2.0(description 74 字符而非 499 字符),用户必须再手工补一条 skill 更新命令——而这一点从不被告知。

Solution

每个 DSH 插件必须用精确版本号 pin 住它发布时对应的 SKILL 版本;并用一条 CI lockstep 断言锁死全部 skill/plugin 对;发版清单加一门「插件必带 skill」检查。做到:装新插件 ⇒ 自动装上新 skill,无需第二条命令,未来所有技能同理。

User Stories

  1. As a DSH user, I want installing or updating a skill plugin to automatically bring the matching SKILL, so that I never run a second update command.
  2. As a DSH user, I want the SKILL description and commands I see to always match the plugin version I installed, so that I never act on stale capabilities.
  3. As a DSH user, I want a single install command per plugin update (not one for the plugin plus one for the skill), so that upgrades stay one step.
  4. As a release manager, I want the release checklist to block any plugin release whose pinned SKILL is older than the latest published SKILL without a recorded reason, so that stale pairings never ship again.
  5. As a release manager, I want CI to fail when any plugin's declared SKILL version differs by even one character from that SKILL's current version, so that drift is caught before publish, not by users.
  6. As a QA engineer, I want a fresh-install proof (empty directory plus plugin tarball yields the exact SKILL version), so that the "auto-carry" claim is machine-checked, not documented.
  7. As a future skill owner (bill/chef/home/schedule/memo), I want the same pin-plus-lockstep pattern applied to my skill/plugin pair without inventing a new mechanism, so that all six skills behave identically.
  8. As an on-call engineer, I want a version-mismatch failure to point at the exact dependency line and the expected version, so that diagnosis takes minutes.
  9. As a user with a stale lockfile, I want the plugin update to force re-resolution of the SKILL (because the exact pin no longer matches my locked version), so that I get the new SKILL without clearing caches by hand.
  10. As a maintainer, I want the SKILL content change and its carrying plugin release to land in the same release window, so that users never observe a version skew.
  11. As an auditor, I want every plugin release to record which exact SKILL version it carries (changelog entry), so that pairings are traceable after the fact.
  12. As a DSH host operator, I want no host-side changes for this fix (the provider keeps reading SKILL.md from disk), so that rollout needs no app update.

Implementation Decisions

  • Each DSH plugin declares its SKILL dependency as an exact version (no caret, tilde, or range), updated to the SKILL's current version on every plugin release. Precedent: the calorie fix that motivated this spec.
  • A single CI lockstep assertion covers every skill/plugin pair (extend the existing base-render lockstep pattern): the plugin-declared SKILL version must byte-equal the SKILL package's current version. One seam for all pairs.
  • The release checklist gains a "plugin carries SKILL" gate: dry-run pack inspection plus a fresh-install proof before any plugin publish.
  • Version-bump discipline: a SKILL release always ships with at least a plugin patch in the same window; a plugin release must never pin a SKILL older than the latest published one without a recorded reason in the release notes.
  • No product-code changes and no host changes; the provider keeps resolving and reading SKILL.md from disk as today.

Testing Decisions

  • Good tests assert external behavior (which versions get installed), not resolver internals.
  • The invariant is tested at the CI seam (lockstep assertion across all pairs); each pair also gets a mutation check (roll the SKILL back one version, the assertion must go red; restore byte-identical, it must go green).
  • A fresh-install proof per release (empty directory, add the plugin tarball, assert the installed SKILL version) guards the user-visible claim end to end.
  • Prior art: the base-render version lockstep test (5 cases, mutation red-to-green) and the base- 组件契约重写与三包统一版本 #79 snapshot gates (185 artifacts unchanged).

Out of Scope

  • Changing pnpm/npm resolver behavior or lockfile semantics.
  • Host-side (DSH app) version enforcement, auto-update, or cache clearing on upgrade.
  • The skills-cli (npx skills add) git-based install chain (different mechanism; separate spec if needed).
  • Backfilling or republishing already-published versions (forward releases only).
  • SKILL content work for the five not-yet-migrated skills (their pins still apply mechanically once their versions move).

Further Notes

  • Context: wayfinder map 卡路里·本体图(1/3)parity 极致重做 #63 (calorie) is implementation-complete; this spec generalizes the calorie incident (dsh-calorie 0.2.1 vs locked skill 0.2.0) to all skills and to release time, per maintainer directive.
  • The pending minor changesets mean the next SKILL release may be minor; the exact-pin rule is version-agnostic and still applies.
  • Registry-side tarball caching and whether DSH clears node_modules on plugin upgrade are host concerns, noted but out of scope here.

Activity

  1. added
    ready-for-agent
    on Sep 10, 2026
  2. FeatherHunter commented on Sep 16, 2026

    @FeatherHunter
    OwnerAuthor

    结论:已完成,关闭

    票面 Solution 三条逐条落地(MAP #638 第二轮,认领后实施):

    1. 每个插件精确 pin 发布时 SKILL 版本:六对 dependencies 全精确版、无 caret(HEAD 口径,上一轮已验;本次复验六对逐字相等)。
    2. 单条 CI lockstep 断言锁死全部对:新增 test/skill-pin-lockstep-129.test.mjs(六对 name 映射+逐字相等+精确 x.y.z 三断言,进根 test/*.test.mjs glob,CI build-test 与 win-detail 都会跑)。
    3. 发版清单「插件必带 skill」检查:由上述门机器锁死(偏斜即红),不再靠人肉清单。

    附带收敛:plugin-schedule-ilife 烟囱字面量 0.2.0 改动态 skillVer 比对(照 bill 烟囱同形,挑战席上一轮点名项)。

    机器读数(ticket=129,持锁):

    • 新门绿:GATE-RUN runId=ac7d5fd7-a418-403b-a887-1d4fa077e2a5 cmd=node --test test/skill-pin-lockstep-129.test.mjs waitedMs=0 exit=0(3/3)。
    • 变异自证:声明回退 0.2.0→0.1.0 即红(exit=1,断言点名偏斜对),逐字还原(SHA256 一致)即绿(exit=0);RUN runId=afab8038-fe77-40bd-8cdf-f38be36b1af8 exit=0。
    • 回归:schedule 烟囱+calorie pin+新门共 11/11;GATE-RUN runId=2e6f7e7e-3a7a-43b3-af86-3901df189acb exit=0。
    • 提交:4ea5ee79(仅 test/skill-pin-lockstep-129.test.mjs+packages/plugin-schedule-ilife/test/smoke.test.mjs 两件,持锁,中文信息自检正常)。

    日志 .scratch/map638/t129-*.log(未入仓)。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ready-for-agent

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions