fix: repair 1.0.0 publishing - #9
Merged
Merged
Conversation
harley-poly
approved these changes
Sep 22, 2026
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.
Why
The market response type release was intended to publish
1.0.0, but the publish run failed during checkout because its configured personal token could not authenticate. The existing workflow would then have tried to push its generated version commit directly to protectedmain, which the repository rules require to go through a reviewed PR.mainstill declares0.1.2, and PyPI has no1.0.0release.What changes
1.0.0inpyproject.toml.main.After this PR merges, the workflow will test and build
1.0.0, see that both artifacts are absent from PyPI, and publish them with the existing PyPI credential. Later non-release merges with a complete release will rebuild for comparison, then exit without uploading it again.If a partial release's existing wheel or sdist does not match the rebuild byte-for-byte, the workflow stops. This can require manual recovery when builds are not reproducible, but it prevents combining artifacts produced by different source states or toolchains.
Verification
pytest— 148 testsmypy— package, type contracts, release helper, and release-helper tests; 35 filesruff check .ruff format --check .uv buildactionlint .github/workflows/publish.ymlpolymarket-usversion1.0.0Note
Medium Risk
Changes release automation and PyPI upload behavior (idempotent/partial uploads); incorrect guard logic could skip needed uploads or publish wrong artifacts, though SHA256 checks mitigate partial-release risk.
Overview
Bumps the package version to 1.0.0 in
pyproject.tomlso a reviewed release can ship after a failed publish attempt left PyPI without that version.The publish workflow no longer auto-bumps
pyproject.toml, commits, or pushes tomain(and drops the PAT / write permissions). It reads name and version frompyproject.toml, builds, then queries PyPI and runs a newcheck_pypi_artifacts.pyhelper. Publishing runs only when the script returnstrue, uploading frompublish-distinstead of the fulldistfolder.The new script compares built wheel/sdist filenames to PyPI release JSON: skip when both exist; for partial releases, verify SHA256 of already-listed files and stage only missing artifacts; fail on digest mismatch or bad metadata. Offline pytest coverage exercises absent, complete, partial, and failure paths.
Reviewed by Cursor Bugbot for commit 76633dd. Bugbot is set up for automated code reviews on this repo. Configure here.