Normalise versions before comparing tag and manifest - #18
Conversation
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>
There was a problem hiding this comment.
💡 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" |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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>
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 is0.0.2b1, and that is whatpyproject.tomland the wheel filename must carry.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:
0.0.2-beta.10.0.2b10.0.2-beta.10.0.2b20.0.3-beta.10.0.2b10.0.20.0.2b1Also fails closed on an unparseable version rather than continuing silently.
🤖 Generated with Claude Code