Repository navigation
Test guards: empty port waves fail, no oracle fallback, scoped matmul precision (#2494, #2444, #2428) - #213
Merged
Merged
Conversation
…matmul precision
- #2494: an explicitly selected AMINX_PORT_WAVE that collects zero items for that
wave, or any item generated from an empty parameter set, raises UsageError naming
the wave (tests/port_guards.py check_selected_wave, called from tests/conftest.py).
- #2444: with AMINX_PORT_WAVE unset only the pyproject default wave runs; other
waves skip with "set AMINX_PORT_WAVE=<wave>" (unset_wave_skip_reason, tests/port/conftest.py).
- #2428: the four global jax.config.update("jax_default_matmul_precision") calls are
replaced by a scoped @highest_matmul_precision decorator; autouse guards in
tests/parity and tests/model fail any test that leaves the precision changed.
- tests/test_port_guards_controls.py: pytester negative controls for each guard.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SGHJhq24fYihaMivnXNhro
…h has no wheel -- main fails the same way) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014bjCGQZgFEE6nR8cGTMFt7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes debts #2494, #2444 and #2428: three ways the test suite could report green, or use the wrong reference, without anyone noticing.
#2494: a selected port wave that collects nothing now fails. When
AMINX_PORT_WAVEis set and no items for that wave remain, or a comparison was parametrised from an empty set, the session fails and names the wave (tests/port_guards.py, wired intests/conftest.py). With no wave selected, the guard does nothing.#2444: no silent fallback to another wave's oracle. Without
AMINX_PORT_WAVE, only the defaultport_selftesttarget runs. Every other wave's tests skip with "set AMINX_PORT_WAVE= to run this wave" instead of loading the self-test oracle (tests/port/conftest.py). A plainpytestrun still collects and passes.#2428: matmul precision no longer leaks between tests. The four global
jax.config.update("jax_default_matmul_precision", "highest")calls are now a scoped decorator (tests/matmul_precision.py). An autouse fixture intests/parity/conftest.pyand in a newtests/model/conftest.pyfails any test that leaves the precision changed.Controls (
tests/test_port_guards_controls.py, pytester): a selected wave with items passes; a selected empty wave and an empty parameter set fail; an unselected wave is inert; an unset wave skips non-default waves and runs the default; the scoped decorator restores the value; a deliberate leak is caught. The controls drive the guard functions through a test conftest that mirrors the real hooks.Run on titanix:
tests/test_port_guards_controls.py tests/model tests/parity: 382 passed, 12 skipped, 1 xfailed. Ruff is clean on the changed files.🤖 Generated with Claude Code
https://claude.ai/code/session_01SGHJhq24fYihaMivnXNhro