Skip to content

fix(release): declare repository in npm sub-package manifests - #320

Merged
upsetbit merged 1 commit into
masterfrom
fix/npm-provenance-repository
Jul 25, 2026
Merged

fix(release): declare repository in npm sub-package manifests#320
upsetbit merged 1 commit into
masterfrom
fix/npm-provenance-repository

Conversation

@upsetbit

Copy link
Copy Markdown
Contributor

Why

The v0.27.7 release pipeline failed at the npm step:

npm error code E422
npm error 422 Unprocessable Entity - PUT https://registry.npmjs.org/@c3-oss%2fprosa-darwin-arm64
  - Error verifying sigstore provenance bundle: Failed to validate repository information:
    package.json: "repository.url" is "", expected to match "https://github.com/c3-oss/prosa" from provenance

--provenance (now always on under OIDC trusted publishing, #318) makes npm
compare each manifest's repository.url against the repo recorded in the
sigstore bundle. The four platform sub-packages only declared homepage, so the
very first publish was rejected. This was invisible under NPM_TOKEN because no
provenance statement was generated at all.

What changed

  • repository added to all four npm/prosa-*/package.json manifests, matching
    the metapackage's existing value. The metapackage already had it and would
    have passed.
  • A pre-flight assertion in scripts/publish-npm.sh, sitting next to the
    existing version-coherence check. It matters that this runs before the
    publish loop: a mismatch caught mid-loop would leave some sub-packages
    published and others not, and npm will not let you re-publish a version.
  • docs/distribution/npm.md updated to describe the check.

Release state this leaves behind

v0.27.7 is currently half-shipped and this PR does not by itself finish it:

Channel v0.27.7
GitHub Release + checksums published (13 assets)
Homebrew casks pushed
npm not published — failed on the first sub-package, so nothing landed; latest is still 0.27.6
GHCR images not pushed — the step never ran

Re-running the failed job on the existing tag will not help, since the workflow
checks out the tag and the tag predates this fix. Recovering v0.27.7 needs a
tag decision, which is left to the maintainer.

🤖 Generated with Claude Code

The v0.27.7 release failed at the npm step with 422 Unprocessable Entity:
"repository.url is '', expected to match https://github.com/c3-oss/prosa from
provenance".

OIDC trusted publishing publishes with --provenance, and npm validates the
manifest's repository.url against the repo recorded in the sigstore bundle. The
four platform sub-packages only declared homepage, so the check failed on the
first publish. This never surfaced under NPM_TOKEN because no provenance
statement was generated.

Adds the repository field to all four sub-packages and a pre-flight assertion
next to the existing version check, so a future mismatch aborts before any
package is published rather than midway through the loop.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@upsetbit
upsetbit merged commit d0bd610 into master Jul 25, 2026
4 checks passed
@upsetbit
upsetbit deleted the fix/npm-provenance-repository branch July 25, 2026 14:35
upsetbit added a commit to c3-oss/q that referenced this pull request Jul 25, 2026
OIDC trusted publishing publishes with --provenance, and npm validates each
manifest's repository.url against the repo recorded in the sigstore bundle. The
four platform sub-packages only declared homepage, so the first publish would
fail with 422 Unprocessable Entity — as it did for c3-oss/prosa#320. Nothing
surfaces this under NPM_TOKEN, because no provenance statement is generated.

Adds the repository field to all four sub-packages and a pre-flight assertion
next to the existing version check, so a mismatch aborts before any package is
published rather than midway through the loop.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
upsetbit added a commit to c3-oss/slack-mcp-server that referenced this pull request Jul 25, 2026
OIDC trusted publishing publishes with --provenance, and npm validates each
manifest's repository.url against the repo recorded in the sigstore bundle. The
four platform sub-packages only declared homepage, so the first publish would
fail with 422 Unprocessable Entity — as it did for c3-oss/prosa#320. Nothing
surfaces this under NPM_TOKEN, because no provenance statement is generated.

Adds the repository field to all four sub-packages and a pre-flight assertion
next to the existing version check, so a mismatch aborts before any package is
published rather than midway through the loop.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
upsetbit added a commit to c3-oss/mcp-plane that referenced this pull request Jul 25, 2026
OIDC trusted publishing publishes with --provenance, and npm validates each
manifest's repository.url against the repo recorded in the sigstore bundle. The
four platform sub-packages only declared homepage, so the first publish would
fail with 422 Unprocessable Entity — as it did for c3-oss/prosa#320. Nothing
surfaces this under NPM_TOKEN, because no provenance statement is generated.

Adds the repository field to all four sub-packages and a pre-flight assertion
next to the existing version check, so a mismatch aborts before any package is
published rather than midway through the loop, and documents the check in
AGENTS.md.

Co-Authored-By: Claude Opus 5 (1M context) <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.

1 participant