Repository navigation
Wait for npm metadata after trusted plugin publication - #9410
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.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · max
动机 / Motivation
已发布的 DSH beta.8 在同一秒回读时尚未出现在 npm 公共注册表。实际下载、latest 和 DSH Hub 发现随后均通过。发布工作流需要识别这个传播窗口。用 GitHub Actions 发布不可变 DSH 归档的维护者。维护者发布新版本后,校验器读到版本与 latest 均已传播,再检查字节与仓库发现。注册表实测覆盖版本和 latest 先后可见、实际安装与移除,以及错误标签、字节和发现目标。npm 发布身份、发布归档和 stable 核验条件沿用现行契约。发布日志
改动思路 / Approach
沿用原有只读校验器。新发布后最多等待三分钟,确认指定版本和 latest 同时可见,再核对归档和发现结果。独立验证和已有版本按原路径立即核验。审查范围是 DSH 新发布后的 npm 只读核验。沿用现有发行校验器,由实际发布的工作流传入等待窗口。发布契约
核验项 verify_published_archive_and_latest 对应 基线发布约定。
具体改动 / Changes
关键代码讲解
- 工作流仅在本次产生新发布时传入等待窗口。两条分支都用同一个归档调用一次校验器。工作流
- 校验器在等待窗口内读取版本和 latest。归档摘要和发现结果继续决定最终成败。校验器
- 注册表测试模拟版本和 latest 分别延迟,经真实 DSH 安装和移除验证,并覆盖错误标签、字节和发现目标。分发测试
两项工作流测试、固定 pnpm 版本的注册表 smoke、Bash 正反路径和实际 npm 读回通过。预合并的 DSH 子检查在 120 秒时超时,原命令单独完整执行通过,其中 402 项测试通过。预合并的直接检查、类型词汇和公开边界检查通过。
对主干的风险 / Risks
传播超过三分钟时仍会报告核验失败。后续可对同一不可变归档进行只读核验。下一次新版本将提供更新工作流的托管发布证据。超过等待时间时应保留原失败回执,并从公共注册表再次核验同一版本、标签与归档,确认传播完成。
语义与 CI 对齐
沿用既有 npm 发布身份和 DSH 归档契约,等待只读,错误的完整性和发现结果仍会令作业失败。
我的整体评价 / Verdict
同意合并。该改动让发布能跨越注册表传播延迟自行完成校验,现有归档校验和发布权限保持原契约。直接执行 DSH 校验成功后,确认发布流程的变更范围和保留的失败检查均符合要求。
English verdict: APPROVE. The exact artifact checks and permission boundary hold. The publisher waits for version and latest visibility after a new write.
Problem
GitHub Actions successfully published
dsh-loopx-plugin@0.1.1-beta.8through npm Trusted Publishing. The following readback ran in the same second and failed because the public registry had yet to expose that version. A later public read verified the immutable bytes, latest tag, and DSH Hub discovery.Change
After a new publish, wait up to three minutes for the public registry to show the exact version and latest tag. Then run the existing integrity and discovery verification. Existing versions go straight to verification, and a readback retry performs no publish or tag writes.
Verification
Observed hosted publish and immediate readback