From f89ddf58a4d5e12beaf43f9e89768d4c2d3241b9 Mon Sep 17 00:00:00 2001 From: n1ckyb Date: Sun, 9 Aug 2026 09:37:35 +0100 Subject: [PATCH 1/3] ci: normalise versions before comparing tag and manifest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/publish.yml | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index eac3770..57a8c75 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -106,13 +106,34 @@ jobs: GIT_TAG: ${{ github.ref_name }} run: | tag="${GIT_TAG#v}" - project=$(python -c "import pathlib,tomllib; print(tomllib.loads(pathlib.Path('pyproject.toml').read_text(encoding='utf-8'))['project']['version'])") - echo "tag=$tag pyproject=$project" - if [ "$tag" != "$project" ]; then - echo "::error::tag $tag does not match the pyproject version $project" >&2 - exit 1 - fi - echo "INTENTUMDIFF_EXPECTED_VERSION=$tag" >> "$GITHUB_ENV" + # Compare NORMALISED versions, not strings. Every IntentumDiff component is tagged + # with one estate-wide string (v0.0.2-beta.1) so the release does not look like + # several different releases, 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") — and a string compare would reject a + # perfectly correct pairing. + # + # 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 + + tag_raw = sys.argv[1] + project_raw = tomllib.loads( + pathlib.Path("pyproject.toml").read_text(encoding="utf-8") + )["project"]["version"] + try: + tag, project = Version(tag_raw), Version(project_raw) + except InvalidVersion as exc: + sys.exit(f"::error::version is not PEP 440 parseable: {exc}") + print(f"tag={tag_raw} ({tag}) pyproject={project_raw} ({project})") + if tag != project: + sys.exit( + f"::error::tag {tag_raw} normalises to {tag}, which does not match the " + f"pyproject version {project_raw} ({project})" + ) + PY + echo "INTENTUMDIFF_EXPECTED_VERSION=$(python -c "from packaging.version import Version; print(Version('$tag'))")" >> "$GITHUB_ENV" - name: Install uv uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 From 089ea62006bcca356c0dd77b27cc10f162fc87d4 Mon Sep 17 00:00:00 2001 From: n1ckyb Date: Sun, 9 Aug 2026 11:01:31 +0100 Subject: [PATCH 2/3] ci: re-run against the fixed engine 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 From 9fd15675551ea5c2bf0edca8ed0dc00813596d55 Mon Sep 17 00:00:00 2001 From: n1ckyb Date: Sun, 9 Aug 2026 13:03:13 +0100 Subject: [PATCH 3/3] ci: re-run against the completed rename fix 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