Skip to content

ci(release): verify a release tag matches the declared version - #2

Draft
a7vinx wants to merge 1 commit into
mainfrom
feat/preview-release
Draft

ci(release): verify a release tag matches the declared version#2
a7vinx wants to merge 1 commit into
mainfrom
feat/preview-release

Conversation

@a7vinx

@a7vinx a7vinx commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Draft: the guard is untested against a real tag build, which only happens at release time.

Summary

The package version is declared in pyproject.toml and in src/pine_assistant/__init__.py, and a release tag names it a third time. Nothing compared them.

PyPI does not permit a version to be replaced once uploaded. A tag naming one version while the package declares another publishes the package under a name nobody was given, and the only remedy is to yank and re-cut under a version number that is then spent.

Changes

A tag build verifies all three agree before anything is built, and identifies the files that disagree when they do not. RELEASING.md documents the guard alongside the release steps.

The README documents how to install unreleased work:

pip install "git+https://github.com/19PINE-AI/pine-assistant-python@main"

pip builds any branch or commit directly from the repository.

Not included

No pre-release publishing. An earlier revision added a manual trigger that stamped a .dev version and published a preview to PyPI; it was removed. Installing from the repository serves the same purpose without consuming version numbers, which on PyPI can be yanked but never deleted or reused.

Verification

  • --check passes on a matching version and fails on a mismatch, naming both files.
  • pip install "git+https://github.com/19PINE-AI/pine-assistant-python@main" resolves, builds, installs and imports in a clean virtualenv.
  • The guard runs only on a tag build, which this pull request does not trigger. It is untested end to end.

🤖 Generated with Claude Code

Two files declare the version and nothing compared them to the tag. PyPI
refuses to replace an uploaded version, so a tag naming one version while the
package declares another cannot be corrected in place — only yanked and re-cut
under a version number that is then spent.

A tag build now checks all three agree before anything is built, naming the
files that disagree.

The README says how to install unreleased work: pip builds any branch or commit
straight from the repository, which is what someone trying the latest actually
needs. No pre-release is published.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@a7vinx
a7vinx force-pushed the feat/preview-release branch from 954565d to 4c3a0c6 Compare August 8, 2026 14:29
@a7vinx a7vinx changed the title ci(release): publish a preview on demand ci(release): fail a tag that disagrees with the declared version Aug 8, 2026
@a7vinx a7vinx changed the title ci(release): fail a tag that disagrees with the declared version ci(release): verify a release tag matches the declared version Aug 8, 2026
@a7vinx
a7vinx marked this pull request as draft August 8, 2026 14:59
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