Skip to content

fix(ci): release page before npm, surface the OIDC trust failure, re-publish an existing tag - #67

Merged
mabry1985 merged 2 commits into
mainfrom
fix/npm-oidc-trust-diagnostics
Oct 12, 2026
Merged

mabry1985 merged 2 commits into
mainfrom
fix/npm-oidc-trust-diagnostics

Conversation

@mabry1985

@mabry1985 mabry1985 commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Why

v2.6.0's release run tagged and moved v2, then died at npm publish with a bare ENEEDAUTH. The GitHub release step came after npm, so v2.6.0 never got a release page (closes the open half of #62's diagnosis).

Root cause, confirmed

A diagnostic dispatch of this branch (ref=v2.6.0, run 38214072665) printed the OIDC lines from npm's debug log:

http fetch POST 404 https://registry.npmjs.org/-/npm/v1/oidc/token/exchange/package/@protolabsai%2frelease-tools
verbose oidc Failed token exchange request with body message: OIDC token exchange error - package not found

So npm does attempt the OIDC exchange, and npmjs.com rejects it. npm masks a trusted-publisher mismatch as "package not found" and logs it only at verbose level, so the publish surfaces as ENEEDAUTH. The old workflow comment recorded the grant as protolabsai / release-tools / release.yml. That lowercase org is the case-sensitive mismatch that broke protoPatch's publishing in September. GitHub's OIDC claim carries protoLabsAI.

This needs a maintainer on npmjs.com; no workflow change can fix it. Go to npmjs.com/package/@protolabsai/release-tools/access → Trusted publishing, delete the grant, and re-create it as protoLabsAI / release-tools / release.yml, with no environment and "allow publishing directly" ticked. The fields are immutable, so it has to be deleted and re-created. Then run gh workflow run Release -R protoLabsAI/release-tools -f ref=v2.6.0.

Changes

  • GitHub release before npm: consumers resolve @v2 from git, so an npm failure no longer leaves a tag with no release page. The diagnostic run already created the v2.6.0 release.
  • On npm failure, print the OIDC lines from the debug log, plus an error naming the exact grant to check.
  • workflow_dispatch input ref: re-publishes an existing tag byte-for-byte using the fixed workflow file from main.
  • Re-publishing an older tag uses npm dist-tag backfill, so it doesn't take latest from a newer version.
  • Major alias only moves forward: re-publishing v2.6.0 after a later v2.x can't drag every consumer's @v2 back.
  • npm pkg fix: removes the ./ from bin paths and adds git+ to the repository url. This silences the misleading "script name … was invalid and removed" warnings; npm was normalizing those entries, not dropping them.

🤖 Generated with Claude Code

mabry1985 and others added 2 commits October 11, 2026 23:45
…h an existing tag

v2.6.0's run tagged and moved v2, then died at npm publish with ENEEDAUTH, so no
GitHub release page was ever created (it came after npm).

- Create the GitHub release before npm publish: consumers resolve @v2 from git,
  so an npm failure must not leave a tag without a release page.
- On npm failure, print the OIDC lines from npm's debug log. A failed token
  exchange is logged only at verbose level, which is why the run showed only a
  bare ENEEDAUTH.
- Document the exact, case-sensitive trusted-publisher grant. The old comment
  recorded it as 'protolabsai', the casing that broke protoPatch's publishing.
- workflow_dispatch takes an optional ref, so an existing tag can be
  re-published byte-for-byte from the fixed workflow on main.
- The major alias only moves forward, so re-publishing an old tag can't drag
  @v2 back.
- npm pkg fix: bin paths without ./ and git+ repository url (silences the
  'script name was invalid and removed' warnings on every publish).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@protoreview protoreview Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA panel review — PASS

code-review-structural · head 723ae4773058 · formal

Clean pass. The panel raised no findings across all four LLM lanes (correctness, removed-behavior, cross-file, conventions) and the protoPatch engine's four items were all pre-existing conditions outside this diff's scope. The verifier confirmed nothing-to-verify. No prior requests to disposition. No coverage gaps: release.yml was read in full by every LLM finder and all cross-file contracts were checked.

No findings — the review came back clean.

findings JSON (machine-readable)
[]

@protoreview protoreview Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Promoting the PASS verdict for head 723ae4773058: all checks terminal-green, zero unresolved review threads. (approve-on-green)

@mabry1985
mabry1985 merged commit d23a59f into main Oct 12, 2026
3 checks passed
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