ci: publish threadplane-middleware with uv, ending the twine metadata skew - #873
Merged
Conversation
… skew The real-release path used the pinned pypa/gh-action-pypi-publish image, whose bundled twine rejects the Metadata-Version 2.5 that current uv build emits: 'InvalidDistribution: 2.5 is not a valid metadata version'. The dry-run path already used uv publish and passed — the two paths disagreed about the artifact between them. Observed on the first real 0.0.2 publish attempt (dry-run green, real release red, nothing uploaded). Build, dry-run, and publish now share one toolchain. PyPI trusted publishing binds to repo + workflow filename, not the action, so the same OIDC grant works; uv consumes it via --trusted-publishing always. Trade-off, stated: the pypa action also uploaded PEP 740 attestations. uv publish does not yet; losing them is acceptable against a publish path that cannot ship at all. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
blove
enabled auto-merge (squash)
August 30, 2026 16:42
blove
added a commit
that referenced
this pull request
Aug 30, 2026
…e 0.0.3 (#878) Restores what #873 traded away, without reintroducing the toolchain skew. uv publish UPLOADS attestation files found beside the dists by default (--no-attestations is the opt-out) — it just doesn't MINT them. Astral's own publishing example pairs it with astral-sh/attest-action for exactly that. One toolchain end to end, attestations back. - attest step gated to the real release (a dry run uploads nothing for attestations to accompany); SHA pin f589a42a verified against tag v0.0.6 (lightweight tag, commit direct); the action's input is (glob) — caught by reading action.yml at the pinned SHA, not the README - middleware bumped to 0.0.3: attestations are only provable on a fresh upload, and PyPI versions are immutable. No code change; consumers pin >=0.0.2 and are unaffected. The 0.0.3 upload doubles as the verification (simple-API provenance must flip from 'none') Verified locally: 0.0.2 artifacts pass current twine check (Metadata 2.5), YAML parses. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.
The first real publish attempt for middleware 0.0.2 failed after a green dry-run, uploading nothing:
Root cause is toolchain skew inside our own workflow:
uv build(latest) emits Metadata-Version 2.5; the dry-run step validates withuv publish --dry-run(accepts it); the real step used the pinnedpypa/gh-action-pypi-publishimage whose bundled twine predates 2.5 (rejects it). The two paths disagreed about the same artifact, so the dry-run could not have caught this — by construction.Fix
Real release now uses
uv publish --trusted-publishing always— the same toolchain as build and dry-run, so this class of skew is gone rather than patched. PyPI trusted publishing binds to repo + workflow filename, not to the publishing action, so the existing OIDC grant works unchanged (id-token: writealready present).Trade-offs stated plainly
attestations: true);uv publishdoesn't support them yet. Acceptable against a publish path that cannot ship at all; worth revisiting when uv grows support.dc37677b). Rejected because it re-introduces the same skew the next time uv's metadata gets ahead of the action's twine — this failure mode recurs by design with two toolchains.Verification note
This can only be truly verified by the next real publish (workflow_dispatch is manual). YAML validated; the dry-run path is untouched and stays green. I'll run the 0.0.2 publish immediately after this merges.
🤖 Generated with Claude Code