[BUG] Fresh trusted-publisher entry rejected with "package not found" for hours before the exchange accepts it
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- github-actions, nodejs
调研方向
The report gives example token exchange requests and workflow runs, but names no npm CLI source file or test. Start by tracing the trusted publisher token exchange path and how it looks up package configuration; compare that behavior with the reported delay. Done when the cause is identified and the issue's expected behavior is addressed with a regression test.
由索引模型根据 Issue 内容生成。
描述
Is there an existing issue for this?
Searched: "trusted publisher", "token exchange delay/propagation/activate", "package not found oidc" — no issue covers a freshly created entry taking time to become exchange-active. Related but distinct: #9969 (immutable sub claims — permanent mismatch), #8976 (scoped/changesets E404), #9088 (misleading error text).
Current Behavior
A trusted-publisher entry created (or deleted and re-created) on npmjs.com is rejected by the token exchange for hours, then starts succeeding with no field changes in between.
Observed 2026-11-08 UTC on @igorjpimenta/doppler-opencode (repo igorjpimenta/doppler-harness, workflow publish.yml, no environment, actions publish + dist-tag):
| UTC | Action | Result |
|---|---|---|
| ≈17:15 | Re-created the entry (old one had never completed a first publish inside the 2-day window) | entry saved |
| 17:21 | workflow_dispatch publish |
POST /-/npm/v1/oidc/token/exchange/package/@igorjpimenta%2fdoppler-opencode → 404, body OIDC token exchange error - package not found, then ENEEDAUTH |
| 17:39 | Same dispatch, retry | same 404 |
| 20:11 | Same dispatch, same entry, same workflow ref, same OIDC claims | → 201, publish succeeded |
Between the failures and the success nothing changed: npm trust list --json before the success showed exactly {file: publish.yml, repository: igorjpimenta/doppler-harness, permissions: [createPackage, createStagedPackage, manageDistTags]} with no environment; the ID token claims were the same immutable-sub shape throughout (the sibling package @igorjpimenta/doppler-harness publishes through the same repo/workflow and worked both before and after the window). The only variable that changed was time (~3 hours).
Expected Behavior
Either the entry is active when it is saved, or the exchange error says the configuration is not active yet (and roughly when it will be), instead of package not found — which reads as a package-name problem and sent us debugging the wrong layer (package.json repository.directory, claim formats, entry field typos) for the whole window.
Environment
- npm: 12.2.2 (both locally and
npm install -g npm@lateston the runner) - Registry: registry.npmjs.org
- Runner: GitHub Actions ubuntu-latest,
id-token: write,NODE_AUTH_TOKEN: "" - Failing runs (public): igorjpimenta/doppler-harness runs 42504541130, 42506054593; success run 42518861191
Suggestion
Document the activation delay wherever the 2-day first-publish rule is documented, and consider a distinct exchange error (or a Retry-After) when the package exists but its publisher configuration is not yet active.
- 主要语言
- JavaScript
- 星标
- 10.3k
- 派生
- 5k
- 平均合并
- 4 天 11 小时
- 30 天内合并 PR
- 26
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
npm/cli 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 2 天内回复
-
[BUG] scripts/dependency-graph.js splits npm-cli-repos.txt on os.EOL, so DEPENDENCIES.md depends on the checkout's line endings可能已有人在做 @saruk-vedant 于 7 天前认领。 未关闭Bug Needs Triage Triage Requested
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 2 天内回复
-
[BUG] npm pkg delete removes the first array item for a nonexistent property可能已有人在做 @drawliin 于 42 天前认领。 未关闭cmd:delete Priority 3
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 2 天内回复
-
create node pr: Node.js 20 deprecation & `DEP0040` warnings logged可能重新可做 关联的 PR 已关闭且未合并。 未关闭Engineering Priority 1
难度 1/5 1 小时以内 新手友好度 80/100
维护者通常 2 天内回复
-
`npm audit signatures` does not report how many packages it skipped for want of registry keys可能已有人在做 @greenlincoln05 于 63 天前认领。 未关闭Priority 3
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 2 天内回复
相似的 Issue
-
documentation
难度 1/5 1 小时以内 新手友好度 88/100
githubnext/gh-aw-workshop#6332 ·
维护者通常 1 天内回复
-
App Designer bug
难度 2/5 1-3 小时 新手友好度 78/100
avniproject/avni-webapp#1858 ·
-
bug
难度 1/5 1 小时以内 新手友好度 96/100
hiero-ledger/hiero-sdk-js#4834 ·
维护者通常 1 天内回复
-
[组件名称] 描述问题的标题未关闭🐞 bug 🧐 unconfirmed
难度 2/5 1-3 小时 新手友好度 68/100
Tencent/tdesign-miniprogram#4744 · 1 条评论 ·
维护者通常 1 天内回复
-
Y-axis tooltip hides near the bottom of the plot while the y crosshair stays visible可能已有人在做 @lazerg 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 82/100
apexcharts/apexcharts.js#5449 ·
维护者通常 3 天内回复