Skip to content

docs: require Trusted Publisher grant before first CI publish#129

Merged
Goosterhof merged 1 commit into
mainfrom
docs/trusted-publisher-gate
Jun 15, 2026
Merged

docs: require Trusted Publisher grant before first CI publish#129
Goosterhof merged 1 commit into
mainfrom
docs/trusted-publisher-gate

Conversation

@Goosterhof

Copy link
Copy Markdown
Contributor

What

Adds step 6 to the ## Adding a Package runbook in CLAUDE.md: wiring the npm Trusted Publisher grant is a mandatory gate before a package's first CI publish.

Why

publish.yml authenticates purely by OIDC (no stored token). For the mint to carry publish rights, the npm package must have a Trusted Publisher config (GitHub Actions · script-development/fs-packages · publish.yml · env npm-publish).

A manual 0.1.0 bootstrap creates the package but NOT the TP grant — so without this step the package sits stuck at the bootstrap version and every later CI bump fails E404 PUT … Not found. npm returns 404, not 403, for "no publish permission" (it masks existence), so the error reads like a missing-package problem when it's actually missing-permission. It is structural, not a transient CI bug — re-running won't self-heal it.

Recurrence

  • fs-cached-adapter-store — 2026-05-27
  • fs-theme + fs-translation — 2026-06-15 (both stuck at 0.1.0 since April; sibling fs-loading republished 0.1.0→0.1.4 cleanly across the same window because it had TP wired)

Both resolved by wiring TP, re-running the failed Publish job, and approving the npm-publish environment gate. theme/translation are now live at 0.1.1 with provenance.

🤖 Generated with Claude Code

@Goosterhof Goosterhof requested a review from a team as a code owner June 15, 2026 13:32
@Goosterhof Goosterhof added the Agent Review Requested Requesting review of specialized AI review agents. label Jun 15, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 15, 2026

Copy link
Copy Markdown

Deploying fs-packages with  Cloudflare Pages  Cloudflare Pages

Latest commit: d8b9e85
Status: ✅  Deploy successful!
Preview URL: https://5e3ca4aa.fs-packages.pages.dev
Branch Preview URL: https://docs-trusted-publisher-gate.fs-packages.pages.dev

View logs

@Goosterhof Goosterhof left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

✅ Approve-worthy

0 blockers · 0 concerns · 0 nits · 1 praise · 0 inline
Round 1 · CI green (check, Cloudflare Pages both pass).

Single-line addition of step 6 to the ## Adding a Package runbook in CLAUDE.md, codifying that the npm Trusted Publisher grant must be wired before a package's first CI publish. Verified against origin/main:CLAUDE.md — the diff appends to the existing 5-step list, and the PR body's scope claim ("adds step 6") matches the hunk exactly with no understatement.

The captured detail is correct and load-bearing: npm masks "no publish permission" as E404 rather than 403, so the failure reads like a missing-package problem when it's actually a missing-grant problem — that's the non-obvious diagnostic that justifies the doctrine entry, and the two-time recurrence (fs-cached-adapter-store; fs-theme/fs-translation) earns the promotion from spy memory into the front-door runbook. Pointing the reader at a known-good template (fs-loading) is the right operational hook.

Automated war-room agent review — posted because this PR carries the Agent Review Requested label.

@jasperboerhof

Copy link
Copy Markdown
Contributor

Review Loop · 10/10 · PASS

fs-packages #129 · AC anchor: none (no issue_key / plan_dir / PR AC section) · head e6bc81c5de

Tip

No findings — clean against the review checklist.

Action

merge-ready

@jasperboerhof jasperboerhof left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Auto-approved — review-loop verdict PASS, CI green, no human blocker, no open MAJOR+ threads. See the verdict comment + inline notes.

A manual 0.1.0 bootstrap creates the npm package but not the OIDC
Trusted Publisher grant, leaving the package stuck at the bootstrap
version with every later CI bump failing E404 (npm masking
permission-denied as not-found). Make the per-package TP config an
explicit mandatory step in the Adding a Package runbook.

n=2: fs-cached-adapter-store (2026-05-27), fs-theme + fs-translation
(2026-06-15).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Goosterhof Goosterhof force-pushed the docs/trusted-publisher-gate branch from e6bc81c to d8b9e85 Compare June 15, 2026 13:54
@Goosterhof Goosterhof enabled auto-merge June 15, 2026 13:54
@Goosterhof Goosterhof merged commit 19b4349 into main Jun 15, 2026
2 checks passed
@Goosterhof Goosterhof deleted the docs/trusted-publisher-gate branch June 15, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Agent Review Requested Requesting review of specialized AI review agents.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants