Skip to content

Commit 72fbf3d

Browse files
vdavezclaude
andcommitted
build(sdist): drop .github/workflows so CI-only commits stop moving the sdist hash
The sdist whitelist included `/.github/workflows`, which meant any commit touching CI changed the sdist for an otherwise-unchanged package. That defeats `uv publish --check-url`: it compares the freshly-built file against the index and errors on a mismatch, so a version already on PyPI can no longer be recognized as already-published. v1.5.0 is the worked example. It was published by hand from the release commit, then #57 added `--check-url` to publish.yml — a workflow-only change that nonetheless altered the sdist, because the workflow file ships inside it. The Release's publish run skipped the wheel correctly ("already exists, skipping") and then failed on the sdist with a sha256 mismatch. No tag target could have avoided it: the release event takes both the workflow and the checkout from the tagged commit, so tagging the pre-fix commit runs a publish without `--check-url` and fails on the duplicate instead. 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. Verified: building the sdist, appending a line to `.github/workflows/lint.yml`, and rebuilding now produces an identical sha256, where before the hash moved. `uv build` still builds the wheel from the sdist, so the whitelist remains complete. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 83c3003 commit 72fbf3d

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,19 @@ packages = ["tango"]
126126
# diaries, scratch reports, etc.) when anyone runs `uv publish` locally.
127127
# The explicit whitelist is belt-and-suspenders for that foot-gun: even
128128
# from a developer laptop, only these paths can ever end up on PyPI.
129+
#
130+
# `.github/workflows` is deliberately NOT included. CI definitions are not
131+
# buildable-from-source content, and shipping them makes the sdist hash move
132+
# on every CI-only commit even though the package is unchanged — which breaks
133+
# `uv publish --check-url`'s ability to recognize an already-published version
134+
# and turns the Release that triggers it red. That is not hypothetical: it is
135+
# what happened to v1.5.0.
129136
[tool.hatch.build.targets.sdist]
130137
include = [
131138
"/tango",
132139
"/tests",
133140
"/docs",
134141
"/scripts",
135-
"/.github/workflows",
136142
"/README.md",
137143
"/LICENSE",
138144
"/CHANGELOG.md",

0 commit comments

Comments
 (0)