Skip to content

ci: the release job installs the declared test extra, so tagging works again - #55

Merged
MuteJester merged 1 commit into
masterfrom
ci/release-test-deps
Nov 6, 2026
Merged

MuteJester merged 1 commit into
masterfrom
ci/release-test-deps

Conversation

@MuteJester

Copy link
Copy Markdown
Owner

Pushing v2.4.0 failed. Nothing was published — the publish job
needs the test job, so sdist, wheels and the PyPI upload were all
skipped. PyPI still returns 404 for 2.4.0, the latest release is still
v2.3.1, and the version number is free.

What happened

Every release test job died 0.85s in:

ERROR collecting tests/biology/test_pass_isolation.py
  tests/support/pipelines/registry.py:43: in <module>
      from hypothesis import strategies as st
  E   ModuleNotFoundError: No module named 'hypothesis'
1 skipped, 1 error in 0.85s

pytest -x reports a collection error as a single failure, which is why
twelve platforms produced one line of output each.

Why it was invisible

build-wheels.yml installed pytest pandas by name and then the built
wheel with the [mcp] extra alone. test.yml installs the same wheel
with [test,mcp]. The hand-written list was accurate until a test
module imported something outside it — hypothesis entered
tests/support/pipelines/registry.py on 2026-10-31.

So every release since 2026-10-31 would have failed, and nobody
could know: no release was attempted in between, and the suite CI
actually runs was green throughout. The first evidence of the break was
a failed release.

This is not fallout from #54. #54 was 13/13 green on the exact tree that
was tagged.

The fix

The release job installs the extras rather than restating them. [test]
is where pytest, pandas, hypothesis, pytest-xdist and airr are
declared, so pyproject.toml stays the only place that knows the list,
and this particular drift cannot recur.

The pin

What makes this class of bug expensive is that a tag is the first place
it shows, so a guard belongs in the suite rather than in the release.
tests/support/meta/test_ci_contract.py gains a pin asserting the
release job installs the wheel with [test] and names no test
dependency by hand.

Verified by pointing it at the pre-fix workflow — it fails and quotes
the offending line:

AssertionError: the release job installs the built wheel without the [test] extra:

Verification

  • pytest tests/support/meta/test_ci_contract.py — 2 passed
  • ruff check tests/ src/ tools/ — clean
  • The pin fails against the workflow as it stood on master

After this merges

The v2.4.0 tag points at the #54 merge commit, which does not carry
this fix, so it has to be moved to the new master before the release
will run. Nothing has consumed that tag — no PyPI artifact, no GitHub
release — so moving it costs nothing, but it is your call.

Pushing v2.4.0 failed. Every release test job died 0.85s in with
`ModuleNotFoundError: No module named 'hypothesis'` while collecting
`tests/biology/test_pass_isolation.py`, and `-x` turned that into one
line of output. Nothing was published: the publish job needs the test
job, so sdist, wheels and the PyPI upload were all skipped and the
version number is still free.

The cause is dependency drift with a long fuse. `build-wheels.yml`
installed `pytest pandas` by name and then the built wheel with the
`[mcp]` extra alone, while `test.yml` installs it with `[test,mcp]`.
That hand-written list was accurate until a test module imported
something outside it. `hypothesis` entered
`tests/support/pipelines/registry.py` on 2026-10-31, so every release
has been broken since -- invisibly, because no release was attempted
between then and now, and because the suite CI actually runs was green
the whole time.

So the release job now installs the extras rather than restating them:
`[test]` is where pytest, pandas, hypothesis, pytest-xdist and airr are
declared, and `pyproject.toml` stays the only place that knows the list.

A pin in the CI contract enforces it, since the thing that makes this
class of bug expensive is that a tag is the first place it shows. It
asserts the release job installs the wheel with `[test]` and names no
test dependency by hand. Verified by pointing it at the pre-fix
workflow: it fails and quotes the offending line.
@MuteJester
MuteJester merged commit ae6e7d8 into master Nov 6, 2026
13 checks 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