Skip to content

fix(verify_install): --pre on the TestPyPI path so Check D tests the candidate build - #134

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/release-validate-correctives
Aug 4, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/release-validate-correctives

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Check D has been failing every rehearsal, and it could not have done otherwise.

The bug

Check D runs pip install --index-url testpypi --extra-index-url pypi "autolens[optional]==$TARGET_VERSION". A rehearsal $TARGET_VERSION is a pre-release (2026.8.3.1.devNNNNN). pip honours a pre-release for a package pinned to one explicitly — so autolens came from the candidate build — but refuses to consider pre-releases for dependencies unless --pre is set. Every intra-family dependency therefore resolved to the last stable PyPI release.

That is not a weaker test, it is a test of the wrong artifact. Resolution ran against already-published metadata, which is frozen and cannot contain any dependency floor the candidate adds. Concretely, on run 30842349506: autolens 2026.8.3.1.dev70001 pulled stable autogalaxy 2026.8.2.1 (published 08-02, before the floors merged), whose bare autofit requirement let pip backtrack to autofit 2026.4.30.582 — April — and import autolens died on module 'autofit' has no attribute 'Latent'.

So the floors added in PyAutoLens#687 were correct and present in source, but no rehearsal could ever exercise them: a fix that only takes effect once published, gated on a check that could only pass once it had taken effect. A genuine chicken-and-egg, not a stale snapshot.

Control test

python3.13 — the interpreter the release job actually uses (setup-python runs 3.11/3.12/3.13, last wins). 3.12 is unaffected and masks this entirely, which is why it needs naming explicitly.

Installing autolens[optional]==2026.8.3.1.dev70001:

autofit autogalaxy autoconf import autolens
without --pre 2026.4.30.582 2026.8.2.1 2026.7.15.1 ❌ no attribute 'Latent'
with --pre 2026.8.3.1.dev70001 2026.8.3.1.dev70001 none ✅ OK

The control reproduces run 30842349506's failure exactly; the patched path clears it. --pre also stops the dead pre-rename autoconf package being dragged in by the ancient autofit.

Scope

--pre is added to PIP_INDEX_ARGS only when --testpypi is set, so it applies to rehearsal/candidate validation. The default release-gate path against PyPI stays stable-only — that is what a user actually gets, and check D must keep testing it that way.

🤖 Generated with Claude Code

…candidate

Check D pins only `autolens[optional]==$TARGET_VERSION`. pip honours a
pre-release for an explicitly pinned package, but refuses to consider
pre-releases for its DEPENDENCIES unless --pre is set. So during a rehearsal
only `autolens` came from the candidate build and every intra-family dependency
resolved to the last STABLE PyPI release instead.

That is not a weaker test, it is a test of the wrong artifact: resolution ran
against already-published metadata, which is frozen and cannot contain any
dependency floor the candidate adds. The floors from PyAutoLens#687 were
present and correct in source, yet no rehearsal could ever exercise them — a
fix that only takes effect once published, gated on a check that could only
pass once it had taken effect.

Control test on python3.13 (the interpreter the release job uses; 3.12 is not
affected and masks this), installing autolens[optional]==2026.8.3.1.dev70001:

  without --pre: autofit 2026.4.30.582 (April), autogalaxy 2026.8.2.1,
                 autoconf 2026.7.15.1  ->  AttributeError: module 'autofit'
                 has no attribute 'Latent'          (reproduces run 30842349506)
  with    --pre: autofit + autogalaxy 2026.8.3.1.dev70001, no autoconf
                 ->  import autolens OK

--pre also stops the dead pre-rename `autoconf` package being dragged in by the
ancient autofit.

Scoped to the TestPyPI path only: the default release-gate path against PyPI
stays stable-only, which is what a user actually gets.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 46a331a into main Aug 4, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/release-validate-correctives branch August 4, 2026 09:49
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