Skip to content

fix(release): correct npm storage-record payload (sha256 + bare repo name)#39

Merged
kboshold merged 1 commit into
mainfrom
fix/linked-artifacts-storage-record
Jun 29, 2026
Merged

fix(release): correct npm storage-record payload (sha256 + bare repo name)#39
kboshold merged 1 commit into
mainfrom
fix/linked-artifacts-storage-record

Conversation

@kboshold

Copy link
Copy Markdown
Member

Problem

The Register npm storage records step added in #38 failed with HTTP 422 on
every package during the v0.8.4 release (best-effort, so the release still succeeded,
but no linked artifacts were created).

Verified the exact API errors with a throwaway probe workflow:

Invalid /digest: ... does not match /^sha256:[a-f0-9]{64}$/
Invalid /github_repository: boshold/zaps does not match /^[A-Za-z0-9.\-_]+$/

Two bugs:

  1. The Artifact Metadata API accepts only sha256 digests — we sent sha512.
  2. github_repository must be the bare repo name (zaps), not owner/repo.

Fix

  • Compute sha256 of the published tarball (dist.tarballsha256sum).
  • Pass github_repository as ${{ github.event.repository.name }} (bare name).
  • Retry npm view dist.tarball to absorb registry propagation lag (the main
    package was skipped in v0.8.4 because it queried too early).
  • Print the response body + HTTP status on non-200 so future failures aren't opaque.

Verification

Proven end-to-end against the already-published v0.8.4 packages via the probe:
all 5 POSTs returned HTTP 200, and a read-back GET confirms the records exist.
As a side effect v0.8.4 is now linked on https://github.com/orgs/boshold/artifacts.
Future releases will populate automatically.

No version bump needed — this is a workflow-only fix.

…e repo name)

The Artifact Metadata API rejected the original payload with HTTP 422:
- digest must be sha256 (algorithm:64-hex); we sent sha512
- github_repository must be the bare repo name, not owner/repo

Compute sha256 of the published tarball, pass github_repository as the bare
name, retry npm view for registry propagation, and print the response body on
non-200 for diagnosability. Verified end-to-end against the live 0.8.4
packages (all 5 returned HTTP 200).
@github-actions

Copy link
Copy Markdown

Coverage Report for Unit Tests

Status Category Percentage Covered / Total
🔵 Lines 92.08% (🎯 85%) 4769 / 5179
🔵 Statements 91.95% (🎯 85%) 4927 / 5358
🔵 Functions 89.34% (🎯 85%) 1098 / 1229
🔵 Branches 86.72% (🎯 85%) 2593 / 2990
File CoverageNo changed files found.
Generated in workflow #147 for commit b016396 by the Vitest Coverage Report Action

@github-actions

Copy link
Copy Markdown

Coverage Report for Integration Tests

Status Category Percentage Covered / Total
🔵 Lines 41.86% (🎯 85%) 2395 / 5721
🔵 Statements 41.48% (🎯 85%) 2455 / 5918
🔵 Functions 39.13% (🎯 85%) 515 / 1316
🔵 Branches 33.95% (🎯 85%) 1104 / 3251
File CoverageNo changed files found.
Generated in workflow #147 for commit b016396 by the Vitest Coverage Report Action

@kboshold kboshold merged commit a4e132b into main Jun 29, 2026
6 checks passed
@kboshold kboshold deleted the fix/linked-artifacts-storage-record branch June 29, 2026 20:34
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