Repository navigation
Keep DSH registry qualification on the same registry through removal - #10120
loopx-agent wants to merge 1 commit into
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-astra · OpenAI · runtime_reported · high
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
HEAD: 3ce503a2839b4466d0ab02144326d8dc63593e97
动机 / Motivation
发布维护者按包名验证 DSH 插件的安装与卸载。基线在 pnpm 11 上安装成功,卸载却转向公共注册表比对 tarball 地址,导致健康包也无法完成验收。修复后,卸载从安装时的测试注册表复核锁文件,临时 web profile 中的插件条目随之消失。验收覆盖本地注册表和真实 DSH,公共 npm 发布及桌面客户端加载另行验证。
改动思路 / Approach
保留现有测试注册表作为安装和卸载的共同来源。注册表是包元数据和下载地址的来源。一次安装先把归档地址写入锁文件,卸载时包管理器还可能回查来源。两步使用同一个地址,才能区分真正的完整性错误与测试配置导致的失败。错误摘要只在负例期间生效,验收脚本等到验证器返回预期错误才恢复它。
具体改动 / Changes
我在 macOS 上使用同一份 npm 格式归档和真实 DSH 0.2.2-rc.3,分别运行基线和候选的仓库验收命令。pnpm 10.33.0 两端均通过。pnpm 11.25.0 的基线能按包名安装,卸载时却因锁文件中的回环地址和公共 npm 返回的地址不同,报 ERR_PNPM_TARBALL_URL_MISMATCH。候选两组均通过,实际子进程的 remove 参数指向本轮 add 使用的同一个注册表,卸载后重新读取 web 配置,插件条目已消失。
错误摘要、错误 latest 标签与错误搜索结果的拒绝断言仍然运行。另在隔离副本中保留正确摘要,完整性负例立即报 Missing expected rejection,说明误放行会触发测试失败。该路径对应发布指南的 release-step-1,见 packages/dsh-loopx-plugin/README.md,版本 3ce503a2839b4466d0ab02144326d8dc63593e97。查看改动
对主干的风险 / Risks
唯一变动的文件在 smoke 目录,包的导出、安装器、依赖锁和生产卸载命令均无差异。这个测试使用真实的包管理器和同进程启动的临时 HTTP 注册表,因而能够查出 pnpm 版本之间的锁文件行为差异。其余宿主依赖仍可能从公共源解析,测试成功不能推出整个安装完全离线。本次独立验证限于 macOS,未在 Windows 或 Linux 原生环境重复运行。
本机首次运行 premerge 时依赖尚未准备好。安装锁定依赖后,并行运行仍有一次打包失败;单独打包以及串行 premerge 均通过。打包阶段没有调用本 PR 修改的注册表脚本,具体并发触发条件未确认。
我的整体评价 / Verdict
改动限于一份验收脚本,无需为生产安装器增加配置或兼容层。保留现有测试注册表作为安装和卸载的共同来源。当前提交解决了可复现的误报,同时保留了对错误包信息的拒绝。我没有发现阻塞项。回归时应继续保留 pnpm 11 的对照,因为只跑 CI 当前固定的 pnpm 10 无法暴露原故障。
English verdict: APPROVE. The exact head restores same-registry removal on pnpm 11 and preserves the integrity rejection on both tested versions.
Running package-name installation qualification for #10118 exposed a failure in the existing registry smoke on pnpm 11. The smoke installed from its temporary registry, then pnpm checked the retained lockfile against the public registry during removal and rejected the different tarball URL.
Restore the fixture’s original integrity value after checking rejection of invalid metadata. Pass the same registry to the removal command so pnpm verifies the lockfile against the source used for installation.
Validated locally on macOS with an npm-packed archive and real DSH. Package-name installation, bundle comparison, negative tag/discovery/integrity checks, removal and final profile readback passed on pnpm 11.25.0 and the CI version 10.33.0. The fixture serves local package bytes. Public npm publication is a separate release step.