Skip to content

fix(release): unblock v0.8.0 dispatch by dropping smoke job permissions override#480

Merged
Luis85 merged 1 commit into
mainfrom
fix/release-smoke-permissions
May 10, 2026
Merged

fix(release): unblock v0.8.0 dispatch by dropping smoke job permissions override#480
Luis85 merged 1 commit into
mainfrom
fix/release-smoke-permissions

Conversation

@Luis85
Copy link
Copy Markdown
Owner

@Luis85 Luis85 commented May 10, 2026

Summary

The v0.8.0-rc.1 dispatch (run 25639883562) failed Layer 1 readiness with `RELEASE_READINESS_WORKFLOW_PERMISSIONS` because `jobs.smoke.permissions.contents` is `read` but the readiness check enforces strict equality against the top-level `contents: write` (`scripts/lib/release-readiness.ts` `diagnosticsForPermissions`, line ~852).

Drop the smoke job's `permissions:` block so it inherits the top-level `{ contents: write, attestations: write, id-token: write }`. The reusable smoke-test workflow is read-only in practice (`npm pack` + install + CLI smoke); the inherited write scopes are unused.

Why this is a fix and not a check change

The release.yml header comment block (lines 53-63) says "job-level overrides may only narrow, never widen", and `scripts/lib/release-readiness.ts` line ~775 says "Each job-level block — if present — must also be a subset of the least-privilege set". But the actual implementation in `diagnosticsForPermissions` (line ~852) requires `actual === expected` for every permission key on every job — not subset, not narrowing. Smoke's `contents: read` is therefore a violation under the current check.

Two ways to fix:

  1. (this PR) Align the workflow with the check — drop the job-level override, smoke inherits top-level.
  2. (follow-up) Relax the check to allow narrowing (`read` for `write` is the canonical least-privilege override under GitHub Actions semantics).

Option 1 unblocks v0.8.0 dispatch immediately. Option 2 is a separate PR — the comment block already advertises subset semantics, so the implementation is the bug, not the intent. Filed as follow-up after v0.8.0 ships.

Test plan

  • `npx vitest run tests/scripts/release-readiness.test.ts` — 36/36 pass.
  • `npm run check:fast` — green.
  • `npm run sites:install` then `npx vitest run --no-file-parallelism` — 445/445 pass.
  • CI green on this PR.
  • Post-merge: re-cut/move `v0.8.0-rc.1` tag (or cut `v0.8.0-rc.2`), then re-dispatch `release.yml` with `--ref v0.8.0-rc.X` to validate npmjs.com Trusted Publishing (ADR-0044). The earlier dispatch also failed because `gh workflow run` defaulted `--ref` to `develop` (which still has 0.7.0); the next dispatch needs an explicit ref.

Out of scope

  • Relaxing the readiness check to allow subset semantics (follow-up).
  • v0.8.0-rc.2 cut + dispatch (handled after this merges).

🤖 Generated with Claude Code

The v0.8.0-rc.1 dispatch (run 25639883562) failed Layer 1 readiness with
RELEASE_READINESS_WORKFLOW_PERMISSIONS — `jobs.smoke.permissions.contents`
was `read` but the readiness check enforces strict equality with the
top-level `contents: write` value (scripts/lib/release-readiness.ts
diagnosticsForPermissions, line ~852).

Drop the job-level `permissions:` block so smoke inherits the top-level
{ contents: write, attestations: write, id-token: write } block. The
reusable smoke-test workflow is read-only in practice (npm pack +
install + CLI smoke); the inherited write scopes are unused.

Comment block in release.yml header already says "job-level overrides
may only narrow, never widen" — the actual readiness check enforces
equality, not subset. The narrowing-allowed semantics is documented as
intent (line ~775) but the implementation is exact-match. Either the
comment is wrong or the check is too strict; aligning the workflow with
the implementation unblocks v0.8.0-rc.1 / v0.8.0 dispatch immediately.
A follow-up may relax the readiness check.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Luis85 Luis85 merged commit 8bba0a5 into main May 10, 2026
12 checks passed
@Luis85 Luis85 deleted the fix/release-smoke-permissions branch May 10, 2026 21:36
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.

2 participants