build(sdist): drop .github/workflows so CI-only commits stop moving the sdist hash - #58
Merged
Merged
Conversation
…he sdist hash The sdist whitelist included `/.github/workflows`, so any commit touching CI changed the sdist for an otherwise-unchanged package. That defeats `uv publish --check-url`, which compares the freshly-built file against the index and errors on a mismatch — so a version already on PyPI stops being recognizable as already-published. v1.5.0 hit exactly this: published by hand from the release commit, then #57 added `--check-url` to publish.yml, a workflow-only change that altered the sdist because the workflow ships inside it. The Release's publish run skipped the wheel and failed on the sdist hash. CI definitions are not buildable-from-source content, so the entry bought nothing and cost hash stability. Also trims the comment #57 left on the publish step, and keeps the note here to one line. Verified: appending a line to `.github/workflows/lint.yml` and rebuilding now yields an identical sha256, where before the hash moved. `uv build` still builds the wheel from the sdist. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
vdavez
force-pushed
the
fix/sdist-excludes-ci-workflows
branch
from
August 4, 2026 14:23
72fbf3d to
975f6b7
Compare
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.
Problem
The sdist whitelist included
/.github/workflows, so any CI-only commit changed the sdist for an otherwise-unchanged package.That defeats the
--check-urlflag added in #57.uv publish --check-urlcompares each freshly-built file against the index and errors on a mismatch — which is correct behavior, since a same-name-different-bytes artifact is exactly what you want a publisher to refuse. But it means a version already on PyPI stops being recognizable as already-published the moment CI changes.The worked example
v1.5.0, which is why this surfaced:
0b1e94c.--check-urltopublish.yml— a workflow-only change that nonetheless altered the sdist, because the workflow file ships inside it.already exists, skipping) and then failed on the sdist:No tag target could have avoided it. A
releaseevent takes both the workflow and the checkout from the tagged commit (confirmed on the failed run:headSha=83c3003,event=release). Tagging the pre-fix commit runs a publish without--check-urland fails on the duplicate instead. The failure was locked in the moment 1.5.0 was published from a tree whosepublish.ymlpredated the fix.Fix
Remove
/.github/workflowsfrom the sdist whitelist, with a comment at the whitelist explaining the omission so it does not get "helpfully" restored later.CI definitions are not buildable-from-source content — nobody runs this project's GitHub Actions from a PyPI tarball — so the entry bought nothing and cost hash stability.
Verification
.github/workflows/lint.yml, rebuilt. Both hash toa53243c1…. Before this change the hash moved.uv buildstill builds the wheel from the sdist, so the whitelist has not lost anything the build needs. Top level istango tests docs scripts README.md LICENSE CHANGELOG.md pyproject.toml.0b1e94clocally reproduced PyPI's remote hash13694bb0…exactly. That is what made this diagnosable rather than guesswork, and it is worth preserving.Scope
This does not retroactively fix v1.5.0's red publish run — nothing can, since its sdist is already on PyPI. It makes 1.6.0 onward clean, and makes
--check-urlreliable rather than conditional on nobody having touched CI.