Skip to content

feat(plugin-host): Enforce plugin compatibility - #7

Draft
Quorafind wants to merge 1 commit into
mainfrom
feat/plugin-compatibility-e3
Draft

Quorafind wants to merge 1 commit into
mainfrom
feat/plugin-compatibility-e3

Conversation

@Quorafind

Copy link
Copy Markdown
Collaborator

目的

仅供 E3 兼容性切片 review 与 CI 验证;保持草稿,不合并、不打 tag、不发布版本。

改动

  • 安装和加载前校验显式 format、formatVersion、adapterRevision 与 SDK 约束;adapter 通过 Rust/Node wire 明确传递。
  • Rust npm-range 求值器用 npm semver 7.7.2 的 includePrerelease golden 固定语义;未知 DSH 宿主版本拒绝第三方依赖,第一方四包按 S1 snapshot 校验。
  • 新 Claude Code mod 安装时合成并记录兼容契约,不改写上游 plugin.json。
  • 旧市场 mod 仅在安装来源身份、位置和 runtime ids 匹配时进入 legacy-1.9;首次记录明确标为 first_seen 的摘要,不冒充安装证据,随后内容漂移拒绝。首次写入失败诊断但本次允许加载,下次重试;每进程一次提示重装和下个大版本移除。
  • CI verify 的 macOS runner 增加 rebon-plugin-package 完整测试,覆盖 Unix .bin 内部/外部链接策略。

覆盖矩阵与本地结果

  • 格式/SDK/adapter:缺失、畸形、未知格式、未知版本、SDK不满足、prerelease、snapshot漂移与第一方安装。
  • 安装/来源:拒绝不破坏既有安装,声明与内容固定,marketplace来源和runtime身份冲突。
  • legacy:未记录安装来源拒绝;first_seen首次写入、未变重载、漂移拒绝、来源/位置/runtime ids不匹配、写失败继续/重试、声明绕过拒绝、一次性诊断;摘要计算期间新增其他安装或目标记录变化时不覆盖。保存前重新读取记录不等同于跨进程事务,重读至写入之间的既有无锁窗口仍存在。
  • Windows 本次通过:package 104、runtime plugin链 99、host mods 36、harness plugin_plane_e2e 14;rustfmt --check 与 git diff --check 通过。
  • 此前通过且相关实现未再变更:protocol 83、supervisor 91、Node 433。

CI 必须实际验证

以下 Unix 测试尚不能用 Windows 结果替代,等待本 PR 的 macOS 日志:

  • integrity::tests::legacy_npm_bin_links_inside_the_package_keep_the_original_digest
  • integrity::tests::legacy_npm_bin_links_outside_the_package_are_refused
  • compatibility::tests::legacy_marketplace_mod_only_accepts_internal_npm_bin_links

Windows 上 WSL 无法启动,未修改系统资源或以跳过测试代替验收。

文档

THIRD_PARTY_NOTICES 已记录 DSH 上游 commit 未知与 S1 hash;配套 Unreleased changelog 位于独立 rebon 仓库 docs/changelog/cli.md,此 PR 不包含该仓库的发布操作。

Resolve package formats and SDK ranges before installation or loading,
and carry the selected adapter explicitly across the plugin protocol.
Keep the bundled DSH payload identified by its snapshot rather than
claiming unknown upstream versions.

Preserve bounded legacy behavior only for attributable old installs.
Record legacy marketplace mods' first-seen digests as observations, not
installation evidence, and refuse later drift. Keep new mod contracts
in installer records without rewriting upstream manifests.

Run package compatibility and integrity tests in the macOS CI gate.

Ref: E3

This branch has not been deployed

No deployments
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.

1 participant