Skip to content

fix(release): correct the checksum manifest and the provenance declaration - #17

Merged
Radiergummi merged 1 commit into
mainfrom
fix/release-checksums-and-provenance
Jul 30, 2026
Merged

fix(release): correct the checksum manifest and the provenance declaration#17
Radiergummi merged 1 commit into
mainfrom
fix/release-checksums-and-provenance

Conversation

@Radiergummi

Copy link
Copy Markdown
Member

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 and made immutable.

1. Checksum manifest paths

sha256sum dist/* embeds the dist/ prefix in every line, while the publish job verifies the manifest after cd dist. Every path therefore resolved to dist/dist/…:

sha256sum: dist/matchory_coding_style-0.1.1-py3-none-any.whl: No such file or directory

The npm job survived only because it happens to checksum a bare filename.

Now generated from inside dist/ with explicit *.whl / *.tar.gz patterns, so the manifest holds bare names and can never checksum itself.

2. publishConfig.provenance is baked into the tarball

I omitted --provenance from the GitHub Packages publish and withheld id-token from that job deliberately, since GitHub Packages neither displays nor verifies provenance. But publishConfig.provenance: true travels inside the published tarball, so npm attempted provenance anyway:

npm error Provenance generation in GitHub Actions requires "write" access to the "id-token" permission

Removed the declaration. The npmjs job passes --provenance explicitly, so intent is per-registry rather than per-tarball. npmjs provenance is unaffected — 0.1.1 already 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.1 stays on npmjs as a superseded version rather than being retracted; PyPI has no 0.1.1. The three ecosystems are aligned again from 0.1.2 onward, and the changelog records the split so nobody has to work it out from workflow logs.

…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
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@Radiergummi
Radiergummi merged commit 93383a2 into main Jul 30, 2026
12 checks passed
@Radiergummi
Radiergummi deleted the fix/release-checksums-and-provenance branch July 30, 2026 14:02
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