fix(publish-fork): derive repository.url from current repo for provenance - #16
Merged
Merged
Conversation
…ance The script rewrote repository.url to a hardcoded dogmar/pacer, left over from before the repo moved to the klink-ing org. npm --provenance signs an attestation from the GitHub OIDC token, and the registry rejects the publish (E422) unless repository.url matches the repo that produced it — so every package failed with dogmar/pacer != klink-ing/pacer. Derive the slug from GITHUB_REPOSITORY (the Actions context) so it tracks the real repo and won't drift on a future rename, falling back to the fork slug for local runs.
dogmar
marked this pull request as ready for review
May 28, 2026 23:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the Publish Fork workflow, where all 10 packages fail with:
Root cause
scripts/publish-fork.mjsrewrote each package'srepository.urlto a hardcodeddogmar/pacer— a stale slug left over from before the repo moved to theklink-ingorg. The workflow publishes with--provenancein CI, which signs a sigstore attestation derived from the GitHub OIDC token (encoding the real source repo,klink-ing/pacer). The npm registry rejects the publish unlessrepository.urlmatches the provenance repo, sodogmar/pacer != klink-ing/pacer→ E422 on every package.(The Publish Dry Run workflow stays green because
--dry-runsigns provenance locally but never does the registryPUT, so the mismatch is never validated.)Change
Derive the slug from
GITHUB_REPOSITORY(the Actions context) instead of hardcoding it, so it tracks the real repo and won't drift on a future rename. Falls back to the current fork slug (klink-ing/pacer) for local runs:Impact
All 10 packages failed in the last run, so nothing was published — no partial/duplicate-version state to clean up. The next version bump (or a manual re-run) will publish cleanly once this lands.
Test plan
main) → confirm packages publish without the E422 provenance error andrepository.urlin the published tarballs readsgit+https://github.com/klink-ing/pacer.git.Generated by Claude Code