Skip to content

fix(generations): honor approved plugin builds - #270

Open
yaojin3616 wants to merge 1 commit into
mainfrom
codex/propagate-generation-build-approvals
Open

fix(generations): honor approved plugin builds#270
yaojin3616 wants to merge 1 commit into
mainfrom
codex/propagate-generation-build-approvals

Conversation

@yaojin3616

Copy link
Copy Markdown
Contributor

问题

dsh-market 的「放行构建脚本并重试」把 allowBuilds 写在真实 web Profile,但 Desktop 的 generation 安装在独立 staging workspace 中运行,审批没有跨过这层边界。Git 子目录依赖在打包 pnpm 10 下还会要求 commit + subpath 精确 resolution key,因此仅复制稳定 Git key 仍会被 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 拒绝。

新插件 generation 即使安装成功,dsh-market 也会立即检查 Profile node_modules;完全等到冷启动才创建链接会被误报为 nothing installable。

修改

  • 仅提取 Profile allowBuilds 中显式为 true 且形状安全的包名、GitHub stable key 和 codeload key,写入 staging pnpm-workspace.yaml;不继承 workspace globs、patchedDependencies 或其他 Profile 配置。
  • 对 commit-pinned GitHub 子目录源,仅在同包名、同仓库已获批准时生成 pnpm 10 实际匹配的 SSH resolution key。
  • Profile pnpm shim 遇到 Git prepare 拒绝时,校验 pnpm 提示的 key 与既有仓库审批一致后持久化更窄的精确 key并自动重试一次;未批准或其他仓库不会放行。
  • 已批准 Git prepare 可按 pnpm 建议忽略源码仓库内部 packageManager 版本声明冲突;普通包和未批准源不受影响。
  • generation 源码构建上限由 5 分钟调整为 12 分钟,仍低于 Desktop 15 分钟操作上限。
  • 新安装仅创建缺失的 generation link 供 dsh-market 即时校验;已有活动链接不会在 Harness 运行时替换,更新仍由冷启动 projector 切换。被拒绝安装留下的未激活校验链接可在重试时安全替换。

验证

  • 真实安装 github:zhu1090093659/dsh-web#c36e0d9992d31a81972e8eebe5208eab7d2e7ed3&path:/packages/dsh-remote-web-ui
    • @linxin666/dsh-remote-web-ui@0.3.11
    • 完整 prepare 成功,lib/index.js 存在(144276 bytes)
    • generation promotion 成功,React/ReactDOM host singleton 已移除
    • 总安装约 239 秒
  • npm test:76 files / 620 tests
  • npm run typecheck
  • npm run build
  • git diff --check

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