Repository navigation
feat: publish forked Hypit Runtime for Piko - #4
Merged
Merged
Conversation
Handanhhhy
approved these changes
Oct 20, 2026
Handanhhhy
approved these changes
Oct 20, 2026
Handanhhhy
left a comment
There was a problem hiding this comment.
审查提交:bc4d90d1526978c8531558148cc3d3952f37490f(base 7cdc9866)。本 PR 修改了 CI/发布工作流,按完整深度审查。
结论:建议 APPROVE(建议合并),无 P0/P1;以下 P2/P3 作为后续跟进。
P2 — fork 发布 npm 上不存在的版本时,Runtime 资产不会挂到 Release
- 位置:
.github/workflows/publish-npm.yml中release-assets声明needs: [package, publish],没有!failure()之类的放行条件。 - 触发:版本在 npm 上不存在(例如 0.3.2;npm 上
@hypit/hypit已到 0.3.1)时,publish会以@hypit/hypit名义执行npm publish。它只能用 OIDC trusted publishing 认证,而该包归上游所有,fork 无法认证,于是 publish 失败,release-assets被跳过,tarball 和 manifest 都不会上传。 - 本次的 v0.2.16 不受影响:npm 上已有 0.2.16,publish 会被跳过。
- 证据:静态证明,未实际执行(需要真实发布一次 Release);npm 包的 trusted publishing 配置在仓库中不可见,属于推断。已经过独立复核。
- 建议:fork 不向 npm 发布
@hypit/hypit,例如移除publishjob,或让release-assets只依赖package。另外,Release 上的hypit-hypit-0.2.16.tgz与 npm 上的@hypit/hypit@0.2.16名字和版本相同但内容不同,建议在文档中说明。
P3 — scripts/pack-piko-runtime.mjs 不可移植,输出目录参数无效
execFileSync("npm", …)未开 shell,在 Windows 上会失败(npm 是npm.cmd);pack-distribution.mjs为此专门改用process.execPath加npm_execpath,新脚本没有沿用。argv[2]输出目录没有传给pack:distribution(后者固定写到dist/release),传其他目录会报 "Expected exactly one …"。- CI 只在 Linux 上运行且传的正是
dist/release,目前不受影响。另外 Linux job 会打两次包。
P3 — manifest 脚本写死了 Chrome 153.0.8010.12 和 Node >=22.15.0
以后升级 captureBrowser.version 或 engines.node 时,每个 PR 的 npm-package CI 和发布都会失败,直到回来修改这个脚本。如果是有意锁定,建议加注释说明;否则改为从 package.json 读取。
验证范围
- 本地:只运行了
packages/desktop-setup/test/piko-runtime.test.ts,2/2 通过(Node 22);没有安装依赖,没有跑全量测试或打包。 - GitHub CI:4/4 通过。
- 没有实际触发 Release 发布流程。
Collaborator
Author
|
感谢详细审查。已按建议处理并推送后续提交:
验证结果:
|
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.
变更说明
Piko 需要使用
dramaclaw/hypitfork 自己的 Skill 和 Runtime,这样安装后会加载@dramaclaw/provider-newapi,而不是官方的hypit/hypit。本 PR 增加 Piko PR #7 所需的 Runtime 发布流程。hypit-hypit-<version>.tgz和 Runtime manifest。验证结果
npm run checknode --import tsx --test packages/desktop-setup/test/piko-runtime.test.tsnpm test:1778 个通过,25 个跳过,0 个失败。hypit-hypit-0.2.16.tgz,大小 2,847,828 字节,SHA256 为b8d0d3318afdb954dcc888be3756406b0b2374c3bfc73ae5813eb24be75d6e0f。对应的 Piko 修改见 claymorelab/piko-plugins#7。本 PR 合并后,还需要发布
v0.2.16GitHub Release;发布流程会自动上传 tarball 和 manifest。Windows CI 的 check job 当前受到仓库已有的跨平台测试 fixture 问题影响,首个错误是 Windows runner 执行 macOS fixture 时报告
FFmpeg is not executable;Ubuntu check、Ubuntu package 和 Windows package 均已通过。