Skip to content

fix(skill): point manifest installers at the Node CLI - #187

Open
titanwings wants to merge 1 commit into
atomic/pr-0-verify-pipelinefrom
atomic/pr-9-node-installers
Open

titanwings wants to merge 1 commit into
atomic/pr-0-verify-pipelinefrom
atomic/pr-9-node-installers

Conversation

@titanwings

Copy link
Copy Markdown
Owner

Why

生成的 manifest.json 把宿主安装指到已经不在树里的 Python 脚本。安装动作已经由 Node CLI 完成。这条 PR 让新 manifest 写出可执行的安装命令。栈停在 dot-skill-test,dot-skill 保留。

Scope

install.installers 改为对象数组。每个元素是 host 与 command。host 取自 src/hosts/agents.mjs 的八个 id。command 是 node bin/distilly.mjs install 加上该 host。skill create 与 skill update 都经 buildManifest 写出同一组命令。skill migrate 不改安装器字段。旧 manifest 不迁移。

改动文件如下。

  • src/skill/presets.mjs 增加 manifestInstallers
  • src/skill/schema.mjs 的 buildManifest 改用该函数。三个 tools/*.py 字符串原来在这里,不在 presets.mjs
  • tests/skill-writer.test.mjs 断言每条安装器要么是树中存在的路径,要么是 node bin/distilly.mjs install 加 host
  • tests/audit/skill-artifacts.test.mjs 的 R58 断言改为同一规则。旧断言把安装器值交给 path.join,对象数组会抛错,无法转绿
  • tests/gates/baseline/audit-tests.txt 删一行

Blast Radius

只影响此后 skill create 与 skill update 写出的 manifest。已有目录里的旧安装器字符串保持原样。migrate 的 dry-run 回执 outputs 仍为空数组,不把 manifest.json 列进 outputs。

Verification

T53 由红转绿。Node v22.14.0 改前 TAP 是 not ok 53,用例名是 R58 manifest.json must not point the host at Python installers that are not in the tree。同版本改后该用例 ok。

node scripts/run-gates.mjs --id audit-tests,Node v22.14.0。改前 ratchet failing 22, baseline 22,门禁 PASS。改后 ratchet failing 21, baseline 21,门禁 PASS。

删了基线这一行。R58 manifest.json must not point the host at Python installers that are not in the tree。没有删别的行。

node scripts/run-gates.mjs --without playwright。Node v20.20.2 与 Node v22.14.0 都是 8/8 gates passed。node scripts/run-gates.mjs --requires playwright 在 Node v22.14.0,DISTILLY_PLAYWRIGHT_ROOT 为 /tmp/pw-root,3/3 gates passed。三份 acceptance 都是 18/18。

skill create 之后的 manifest 不含 .py。八条 installers command 加 --dry-run 的退出码都是 0,并打印目标路径。Node v20.20.2 与 Node v22.14.0 生成的 manifest 字节相同。

Rollback

回退本提交。已经写出的 manifest 不会自动改回。需要旧字段时,在回退后的代码上重新 skill create 或 skill update。

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