fix(release): correct the checksum manifest and the provenance declaration - #17
Merged
Merged
Conversation
…ation 0.1.1 reached npmjs with provenance, but the PyPI and GitHub Packages jobs both failed. Two separate bugs, both mine, both of which a local test would have caught before a tag was cut. Checksum manifest paths `sha256sum dist/*` embeds the `dist/` prefix in every line, while the publish job verifies the manifest after `cd dist`. So each path resolved to `dist/dist/...` and could not be opened. The npm job survived only because it happens to checksum a bare filename. Now generated from inside dist/ with explicit *.whl and *.tar.gz patterns, so the manifest holds bare names and can never checksum itself. publishConfig.provenance is baked into the tarball I omitted --provenance from the GitHub Packages publish and withheld id-token from that job on purpose, since GitHub Packages neither displays nor verifies provenance. But `publishConfig.provenance: true` travels inside the published tarball, so npm attempted provenance anyway and failed with "requires write access to the id-token permission". Removed the declaration. The npmjs job passes --provenance explicitly, so the intent is per-registry rather than per-tarball. npmjs provenance is unaffected -- 0.1.1 already carries attestations, proving the flag alone is sufficient. CI now round-trips the checksum manifest exactly as the release verifies it, and asserts it still fails on a tampered artefact. A path-prefix mistake there is invisible until a tag is cut and immutable, which is precisely why it needed a test rather than care. Released as 0.1.2 because version tags cannot be moved here. 0.1.1 stays on npmjs as a superseded version rather than being retracted; PyPI has no 0.1.1, and the three ecosystems are aligned again from 0.1.2. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CEdTd43qLEEE5qCsL1A7gW
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
0.1.1reached npmjs with provenance, but the PyPI and GitHub Packages jobs both failed. Two separate bugs, both mine, both of which a local test would have caught before a tag was cut and made immutable.1. Checksum manifest paths
sha256sum dist/*embeds thedist/prefix in every line, while the publish job verifies the manifest aftercd dist. Every path therefore resolved todist/dist/…:The npm job survived only because it happens to checksum a bare filename.
Now generated from inside
dist/with explicit*.whl/*.tar.gzpatterns, so the manifest holds bare names and can never checksum itself.2.
publishConfig.provenanceis baked into the tarballI omitted
--provenancefrom the GitHub Packages publish and withheldid-tokenfrom that job deliberately, since GitHub Packages neither displays nor verifies provenance. ButpublishConfig.provenance: truetravels inside the published tarball, so npm attempted provenance anyway:Removed the declaration. The npmjs job passes
--provenanceexplicitly, so intent is per-registry rather than per-tarball. npmjs provenance is unaffected —0.1.1already carries attestations, which proves the flag alone suffices.The missing test, now present
CI round-trips the checksum manifest exactly as the release verifies it, and asserts it still fails on a tampered artefact — a check that always passes is worse than none. Verified locally in both directions.
A path-prefix mistake here is invisible until a tag is already cut and immutable, which is why it needed a test rather than care.
Version
0.1.2, because tags cannot be moved here.0.1.1stays on npmjs as a superseded version rather than being retracted; PyPI has no0.1.1. The three ecosystems are aligned again from0.1.2onward, and the changelog records the split so nobody has to work it out from workflow logs.