Skip to content

Normalise versions before comparing tag and manifest - #18

Merged
n1ckyb merged 3 commits into
release/v0.0.2-rcfrom
fix/normalise-version-assertion
Aug 9, 2026
Merged

Normalise versions before comparing tag and manifest#18
n1ckyb merged 3 commits into
release/v0.0.2-rcfrom
fix/normalise-version-assertion

Conversation

@n1ckyb

@n1ckyb n1ckyb commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Every component is tagged with one estate-wide string (v0.0.2-beta.1) so a single release does not look like several. But PEP 440's canonical spelling is 0.0.2b1, and that is what pyproject.toml and the wheel filename must carry.

>>> Version("0.0.2-beta.1") == Version("0.0.2b1")
True

A string comparison rejected that correct pairing — and would have failed at the very end of the release, after every platform wheel had been built, blaming the artefact when the gate was wrong.

Still fails closed on a genuine mismatch:

Tag Manifest Result
0.0.2-beta.1 0.0.2b1 match
0.0.2-beta.1 0.0.2b2 reject
0.0.3-beta.1 0.0.2b1 reject
0.0.2 0.0.2b1 reject

Also fails closed on an unparseable version rather than continuing silently.

🤖 Generated with Claude Code

Every IntentumDiff component is tagged with one estate-wide string
(v0.0.2-beta.1) so a single release does not look like several different ones.
But PEP 440's canonical spelling is 0.0.2b1, and that is what pyproject and the
wheel filename must carry.

They are the SAME version — Version("0.0.2-beta.1") == Version("0.0.2b1") — so
a string comparison rejected a perfectly correct pairing and would have failed
the release at the very end, after every platform wheel had been built.

Still fails closed on a real mismatch: 0.0.3 vs 0.0.2, or b1 vs b2, do not
normalise away. Also fails closed on an unparseable version rather than
silently continuing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f89ddf58a4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

f"pyproject version {project_raw} ({project})"
)
PY
echo "INTENTUMDIFF_EXPECTED_VERSION=$(python -c "from packaging.version import Version; print(Version('$tag'))")" >> "$GITHUB_ENV"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Normalize the version again in the publish job

For the intended prerelease tag v0.0.2-beta.1, this exports 0.0.2b1 only within each build-wheels job; GITHUB_ENV does not propagate across jobs. The publish job later sets INTENTUMDIFF_EXPECTED_VERSION back to the raw 0.0.2-beta.1 at line 281, while verify_intentumdiff_wheel.py compares that string exactly with the wheel filename's 0.0.2b1, so every wheel can build successfully but the final PyPI verification still rejects the release. Normalize the tag in the publish job as well.

Useful? React with 👍 / 👎.

# This still fails closed on a real mismatch: 0.0.3 vs 0.0.2 does not normalise away.
python - "$tag" <<'PY'
import pathlib, sys, tomllib
from packaging.version import InvalidVersion, Version

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Install packaging before importing it

On a clean actions/setup-python Python 3.12 installation where only the standard bootstrap packages are present, packaging is not importable, and this tag-only step runs before any dependency-installation step. Consequently all four release matrix legs can stop with ModuleNotFoundError before normalization occurs; install a pinned packaging dependency before this step or perform the comparison without an undeclared third-party module.

Useful? React with 👍 / 👎.

The previous run cloned intentumdiff-core's RC before the rename-guard fix
(core#20) landed there, so it failed on the language-agnostic rename regression
rather than on anything in this PR.

CORE_REF resolves to release/v0.0.2-rc, so a fresh run picks the fix up with no
pin change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The previous run cloned intentumdiff-core's RC when it carried only the first
half of the rename fix (core#20), so ini-rename_entity still failed. core#22
completes it by identifying the name-carrying child by node type, and is now on
the RC that CORE_REF resolves to.

Locally against that engine: 2408 passed, 0 failed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@n1ckyb
n1ckyb merged commit 45ef181 into release/v0.0.2-rc Aug 9, 2026
1 check passed
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