[REQ-128][DOC] Phase 4 方案基线入库:managed npm OpenCode Plugin(窄而闭合的竖线) - #806
Merged
Conversation
added 4 commits
August 3, 2026 00:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
这份稿子是什么
REQ-128 Phase 4 的方案基线。让一个真会在引擎进程里跑代码的第三方插件
(
opencode-notify)从签名 Catalog 被发现 → 授权屏说清「与引擎同权限执行代码」→一次事务装上 → 引擎真的重扫并把事件派发给它 → 卸得掉。
范围窄(一个包、只对上游 V1 ABI),但用户路径逐跳闭合 —— Phase 3 验证过的形态。
为什么不是照着
alpha-web#99/alpha-code#699写那两张票判作废重开。 它们写于 2026-07-30,而 Phase 1/2/3 已经把它们引用的东西改掉了。
§3 用表格列了 22 条已作废的旧断言,其中最贵的三条:
ac#699的 ABI 验收门对准了一个不存在的成员 —— 上游 V1 插件Hooks21 键里有
dispose,没有init,也没有cancel(两轴零命中)。照票面写「invalid dispose/cancel」的语料,在真实加载器里根本不会被检查 = 一组恒绿断言。
ConfigExternalPlugin(ABI 完全不同、自己再调一次npm.add、失败被Effect.ignoreCause静默吞掉)。2026-07-30 那份基线全文零字提及。refreshEngine()⇒ 纯 plugin 包装完,界面说「已安装」而用户下一条消息里什么都没有。Phase 3 在本地导入线上修过这个洞(G20),
签名 package 这条线从来没修过,而且三张旧票一张都没提。
审计账(开发前方案,预算 2 轮,未超支)
删掉新造的 capability token、删掉不可达的运行时 probe、删掉整张 T6、删掉 CAS pin 与第 9 类、
删掉三道到不了的 compile gate、删掉第 6 类的生产 else 改造。
按规程走「筛完直接改、改完不复审、直接合」,不开第三轮。
R1 里最该记的一条:我自己设计的 pre-switch 探针没过第零问 —— 打包体没有 Node 可执行文件、
runAsNodefuse 是关的,那个探针在生产里根本跑不起来;而且它的形状断言{}就能满足。R2 里最该记的一条:T7 的两条退出条件按字面互斥,实现方照做会卡死。
九张票与硬序
T1 → {T2a, T2b} → T5;T1 →(**同一 merge unit**)→ T4;T1 → T3 → T3b;汇合T7 → T8。T1 与 T4 必须在同一个 alpha-code PR 里落地 —— 不是形式:
packages/alpha-contracts-consumer/src/extension-package-artifact.test.ts:107要求 vendored 宿主副本与本仓活的 host artifact 逐字节相同,而
scripts/alpha-check.sh会跑 consumer 测试⇒ T1 单独合并时本仓自己的正式门就是红的。
门
bash scripts/alpha-check.sh全绿(7/7 步):north-star 零上游改动、零字面 NUL、typecheck 三包、
Ran 3756 tests across 255 files / 0 fail、闸门文件在位、seed 资产、docs 链接。本 PR 纯文档,
git diff --name-only只有一个 md 文件。Refs #699