Skip to content

Prepare guarded CLI npm dev prerelease publishing - #38

Merged
purpshell merged 1 commit into
devfrom
codex/cli-npm-prerelease
Sep 26, 2026
Merged

purpshell merged 1 commit into
devfrom
codex/cli-npm-prerelease

Conversation

@purpshell

@purpshell purpshell commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

@polymorfa/cli is still absent from npm. Its manifest requested provenance that npm cannot issue for a private source repository, and the README's future untagged install could select latest instead of the development channel. This PR prepares a manual dev prerelease path while leaving publication to a separate release decision.

The workflow accepts an exact current dev commit and package version, checks the published SDK artifact against the lockfile, runs the CLI verification gate, and smoke tests a packed tarball. A separate GitHub-hosted job with OIDC permission checks the tarball digest and publishes that exact artifact to dev through a protected environment. It refuses to publish while the CLI package is absent, since the npm owner must bootstrap the first package before configuring trusted publishing. The operator runbook names the npm and GitHub configuration required after bootstrap. Follow-up #43 corrects its first-publish tag guidance: npm documents --tag dev as overriding default latest; the first public, immutable package version remains an owner release decision. The README now names @dev as the future prerelease install selector.

Verification: actionlint, formatting, lint, typecheck, four release-guard tests, build, npm audit --omit=dev (zero vulnerabilities), and clean installation of the packed 0.1.0-dev.0 tarball passed. The installed binary reported SDK 0.1.0-dev.20260926005918. The full local Vitest run hit unrelated 5-second command-test timeouts while the host load average exceeded 140; the one-worker run had the same issue. Hosted PR CI is the full-suite gate. Neither OIDC nor an npm publish can be exercised before the first package and trusted publisher exist.

Five-part impact:

  • API — unaffected. No handler, authorization, OpenAPI, webhook, or stream contract changes. The CLI still consumes the merged API contract.
  • SDKs — unaffected. No SDK source or package publication changes. The CLI remains pinned to published @polymorfa/sdk@0.1.0-dev.20260926005918; the release workflow compares its registry integrity with the lockfile before packing.
  • CLI — updated. Public-registry dev publication defaults, guarded workflow, release check, and tarball smoke path are new. No command behavior changes and no CLI package is published by this PR.
  • Docs — updated. The CLI README and private release runbook describe the prerelease selector and bootstrap. Public Mintlify docs and changelog do not announce an unavailable package; they require an update when a version is actually installable.
  • Feature releases — unchanged. No feature flag, entitlement, enrollment, rollout, or production audience changes. The owner must choose and authorize the first public CLI version, configure the protected environment and trusted publisher, then separately authorize npm publication and customer documentation. The --tag dev bootstrap is expected to leave latest unset; verify the registry tags after publication.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

@coderabbitai

coderabbitai Bot commented Sep 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 15 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available. Your 63 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

The included review limit has been reached and this organization has disabled usage-based review continuation. Wait for reviews to reset or ask a billing admin to change After included review limits.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 27667145-e9a6-4a87-a472-75f4e2b87302

📥 Commits

Reviewing files that changed from the base of the PR and between fad2cf7 and f171671.

📒 Files selected for processing (6)
  • .github/workflows/publish-dev.yml
  • README.md
  • internal/npm-prerelease.md
  • package.json
  • scripts/check-prerelease.mjs
  • test/release/check-prerelease.test.ts

Comment @coderabbitai help to get the list of available commands.

@purpshell
purpshell merged commit 82c9726 into dev Sep 26, 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