ci(release): switch publish to npm Trusted Publishing (OIDC)#97
Merged
Conversation
Remove NODE_AUTH_TOKEN from the publish step. With a trusted publisher configured on npmjs.com for @salishforge/memforge + this workflow, the npm CLI authenticates via the GitHub Actions OIDC token (id-token: write was already granted for provenance attestations). Benefits over a long-lived token: - No secret to rotate or leak; no 2FA bypass flag required. - Cryptographic proof that the publish came from this specific workflow in this specific repository. - Aligns with npm's recommended practice (classic Automation tokens are being phased out). Requires the trusted publisher to be configured on npmjs.com BEFORE the next release tag is pushed. Once confirmed working, the NPM_TOKEN secret can be deleted from the repo.
salishforge
pushed a commit
that referenced
this pull request
Apr 18, 2026
Ships Phase 2 of the ROADMAP (memory namespaces #16, cold tier search + restoration #14, memory budgeting, adaptive sleep advisory) and closes out related tracker issues. Also fixes #95: schema.sql no longer issues failing CREATE INDEX statements for HNSW on bare halfvec columns (pgvector requires an explicit dimension spec). The two affected indexes are now documented in a new schema/hnsw-indexes.example.sql template that operators apply AFTER choosing their embedding provider's dimension. Fresh installs without embeddings emit no errors; installs with embeddings get a clear, idempotent path to the HNSW indexes. This is the first release publishing via npm Trusted Publishing (OIDC) instead of a long-lived token — validates the infrastructure landed in Sprint A and the Phase 2 follow-up (PR #97). Changes bundled: - package.json: 3.0.0-beta.3 → 3.0.0-beta.4 - CHANGELOG.md: new v3.0.0-beta.4 entry with per-feature and known-gap breakdown - ROADMAP.md: "Where We Are Today" updated; Phase 1 "Remaining" section collapsed (all shipped); Phase 2 marked COMPLETE with per-item PR references; #13 two-pass triage flagged as the one partial item - schema/schema.sql: remove two failing HNSW CREATE INDEX (with documented why-comment pointing at the template) - schema/hnsw-indexes.example.sql: new — template for operators to apply HNSW indexes after pinning halfvec dimension
5 tasks
salishforge
pushed a commit
that referenced
this pull request
Apr 18, 2026
The v3.0.0-beta.4 release attempt failed despite a correctly configured npm Trusted Publisher. Diagnosis: npm Trusted Publishing requires npm >= 11.5.1, but the bundled npm with Node 22 on GitHub runners is 10.x — the OIDC publish flow is silently unsupported, and auth falls through to NODE_AUTH_TOKEN (which we had removed in PR #97, producing the 404 publish failure we observed). Fix: - Add `npm install -g npm@latest` before publish so the runner always has a TP-capable npm. - Reinstate NODE_AUTH_TOKEN as a belt-and-suspenders fallback so the release pipeline isn't single-sourced on OIDC while we gain confidence in it. If OIDC works (expected now that npm is current), the token is ignored; if OIDC fails for any reason, the token keeps us shipping. The NPM_TOKEN secret can be removed after OIDC ships a few releases successfully. The comment in release.yml documents this explicitly.
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.
Summary
Removes `NODE_AUTH_TOKEN` from the publish step so `npm publish` authenticates via the GitHub Actions OIDC token. The `id-token: write` permission was already granted for provenance attestations; Trusted Publishing reuses that same OIDC token.
Prerequisite (one-time, on npm.com)
Before merging this PR, a trusted publisher must be configured for `@salishforge/memforge`:
If this is not configured before merging, the next release tag will fail to publish (beta.3 is already shipped so nothing is at risk until beta.4).
Why
Follow-up (after merge + first successful OIDC publish)
Test plan