Skip to content

👷 Drop OTP prompt from npm publish#7011

Merged
dubzzz merged 1 commit into
mainfrom
claude/remove-npm-otp-1Zkx8
May 20, 2026
Merged

👷 Drop OTP prompt from npm publish#7011
dubzzz merged 1 commit into
mainfrom
claude/remove-npm-otp-1Zkx8

Conversation

@dubzzz

@dubzzz dubzzz commented May 20, 2026

Copy link
Copy Markdown
Owner

Description

AI-agent disclosure: this PR was authored by an automated
agent (Claude Code, claude-opus-4-7) and has not been
line-by-line reviewed by a human before submission.

Publishing the seven workspace packages no longer pauses CI to wait for a one-time password from an authenticator app. Maintainers releasing a new version no longer need to be online with their TOTP app at hand when a tag lands on main (or a next-*/fix-v* branch) — the workflow now runs end-to-end on its own as soon as the tag is pushed.

This is a CI-only change: nothing about the published artifacts, their contents, attestations, or the latest / next / legacy dist-tag routing is altered. No bump is needed since no package source is touched.

Fixes #issue-number

The publish jobs were running pnpm publish --otp "$OTP_VALUE" …, with OTP_VALUE populated by a step-security/wait-for-secrets step prompting an authorised maintainer to type in a TOTP code. Under npm's trusted publishing (OIDC) flow — which this repo already uses, as evidenced by the id-token: write permission and the # zizmor: ignore[use-trusted-publishing] markers — npm authenticates the publish via the GitHub OIDC token and ignores any --otp value passed on the CLI. The interactive prompt was therefore pure friction with no security benefit.

Each of the seven publish jobs (fast-check, ava, jest, packaged, poisoning, vitest, worker) has had the wait-for-secrets step, the OTP_VALUE env var, and the --otp "$OTP_VALUE" flag removed in lock-step so the seven jobs stay structurally identical. Net diff: -63 / +7 lines in .github/workflows/build-status.yml. The change is intentionally scoped to OTP removal — the rest of the publish pipeline (renaming the tgz, attestation, GitHub Release update) is untouched.

No tests are added: the file under change is a GitHub Actions workflow whose only real-world signal is "does the next tagged release publish cleanly". This will be exercised the next time a version tag is pushed.

Checklist

Don't delete this checklist and make sure you do the following before opening the PR

  • I have a full understanding of every line in this PR — whether the code was hand-written, AI-generated, copied from external sources or produced by any other tool
  • I flagged the impact of my change (minor / patch / major) either by running pnpm run bump or by following the instructions from the changeset bot
  • I kept this PR focused on a single concern and did not bundle unrelated changes
  • I followed the gitmoji specification for the name of the PR, including the package scope (e.g. 🐛(vitest) Something...) when the change targets a package other than fast-check
  • I added relevant tests and they would have failed without my PR (when applicable)

Generated by Claude Code

npm ignores --otp under trusted publishing, so the wait-for-secrets step
that asked for an OTP from an authenticator app is no longer needed.
@changeset-bot

changeset-bot Bot commented May 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2e5d8fe

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dubzzz dubzzz changed the title 🔥 Drop OTP prompt from npm publish 👷 Drop OTP prompt from npm publish May 20, 2026
@pkg-pr-new

pkg-pr-new Bot commented May 20, 2026

Copy link
Copy Markdown
@fast-check/ava

npm i https://pkg.pr.new/@fast-check/ava@7011

fast-check

npm i https://pkg.pr.new/fast-check@7011

@fast-check/jest

npm i https://pkg.pr.new/@fast-check/jest@7011

@fast-check/packaged

npm i https://pkg.pr.new/@fast-check/packaged@7011

@fast-check/poisoning

npm i https://pkg.pr.new/@fast-check/poisoning@7011

@fast-check/vitest

npm i https://pkg.pr.new/@fast-check/vitest@7011

@fast-check/worker

npm i https://pkg.pr.new/@fast-check/worker@7011

commit: 2e5d8fe

@dubzzz dubzzz enabled auto-merge (squash) May 20, 2026 22:16
@dubzzz dubzzz merged commit bcdc67c into main May 20, 2026
58 checks passed
@dubzzz dubzzz deleted the claude/remove-npm-otp-1Zkx8 branch May 20, 2026 22:21
@codecov

codecov Bot commented May 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.81%. Comparing base (1748fd1) to head (2e5d8fe).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7011   +/-   ##
=======================================
  Coverage   94.81%   94.81%           
=======================================
  Files         212      212           
  Lines        5868     5868           
  Branches     1540     1539    -1     
=======================================
  Hits         5564     5564           
  Misses        296      296           
  Partials        8        8           
Flag Coverage Δ
tests 94.81% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

dubzzz added a commit that referenced this pull request May 21, 2026
## Description

> AI-agent disclosure: this PR was authored by an automated agent
(Claude Code) and has not been line-by-line reviewed by a human before
submission.

Switches every `publish_package_*` job in
`.github/workflows/build-status.yml` from `pnpm publish` to [`npm stage
publish`](npm/cli#9201). With staged publishing,
CI uploads the tarball into a holding area on the registry instead of
releasing it immediately — a maintainer then has to approve the staged
version (with 2FA) before it becomes installable. End users still
receive the same artifacts on npm, but the release step is no longer
fully automated: there is now an explicit approval gate between a tag
being pushed and the package going live. This is a follow-up to #7011
(which already removed the OTP prompt from the publish call); together
they move the workflow toward npm's recommended staged-release flow.

Each publish job now:

- installs `npm@latest` so the runner-provided npm is upgraded before
publishing — the `stage` subcommand landed in npm 11.15.0 and is not yet
bundled with Node 24's default npm;
- runs both `npm install -g` and `npm stage publish` from the parent
directory (`cd ..`), because the repo's `package.json` pins pnpm via
`devEngines` and would otherwise block npm from executing inside the
workspace;
- no longer needs the `pnpm/action-setup` step or the pnpm-specific
`--no-git-checks` flag, both of which were dropped from the seven
affected jobs.

Non-publish jobs were intentionally left alone and still install pnpm —
only the release plumbing changes. Because the diff only touches the
workflow file, there are no source, dependency, or published-artifact
changes, no semver impact to flag, and no changeset to add; the new code
path is exercised the next time a `v*` tag is pushed.

## Checklist

— _Don't delete this checklist and make sure you do the following before
opening the PR_

- [x] I have a full understanding of every line in this PR — whether the
code was hand-written, AI-generated, copied from external sources or
produced by any other tool
- [x] I flagged the impact of my change (minor / patch / major) either
by running `pnpm run bump` or by following the instructions from the
changeset bot
- [x] I kept this PR focused on a single concern and did not bundle
unrelated changes
- [x] I followed the [gitmoji](https://gitmoji.dev/) specification for
the name of the PR, including the package scope (e.g. `🐛(vitest)
Something...`) when the change targets a package other than `fast-check`
- [x] I added relevant tests and they would have failed without my PR
(when applicable)

Co-authored-by: Claude <noreply@anthropic.com>
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