fix: delete dead PYAUTOFIT_TEST_MODE fixture in aggregator conftest - #96
Merged
Conversation
) The autouse `set_test_mode` fixture set `PYAUTOFIT_TEST_MODE`, which nothing reads — the canonical knob is `PYAUTO_TEST_MODE` (autonerves/test_mode.py). The fixture has therefore always been a silent no-op. Renaming it to the live variable is NOT the right fix: it makes test mode actually take effect, which bypasses sampling so the aggregator has no samples to iterate, and 6 of the 13 aggregator tests fail. These tests were written against — and only pass under — normal sampling. Verified three ways: dead var present (baseline) -> 13 passed renamed to PYAUTO_TEST_MODE -> 6 failed, 7 passed fixture deleted (this fix) -> 13 passed So the fixture is deleted rather than renamed: behaviour-preserving, and it removes a trap that autocti_workspace_test/AGENTS.md and autocti_assistant had resorted to documenting instead of deleting. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01JiU4VbBD9X6jPYJMCx3boh
This was referenced Jul 22, 2026
Merged
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.
Closes #95.
What
Deletes the
autouseset_test_modefixture intest_autocti/aggregator/conftest.py, which setPYAUTOFIT_TEST_MODE— a variable nothing in the stack reads. The canonical knob isPYAUTO_TEST_MODE(PyAutoNerves/autonerves/test_mode.py:14). The fixture has always been a silent no-op.Why delete rather than rename
Renaming it to the live variable looks like the obvious fix, but it is wrong — it makes test mode genuinely take effect, which bypasses sampling, so the aggregator has no samples to iterate and 6 of 13 tests fail. These tests were written against, and only pass under, normal sampling.
Verified three ways (
pytest test_autocti/aggregator):main)PYAUTO_TEST_MODESo deletion is behaviour-preserving and removes the trap outright.
pytestandosremain used elsewhere in the file, so no import changes.Context
autocti_workspace_test/AGENTS.md:42andautocti_assistant/skills/ac_fit_cti_model.md:126already documented thatPYAUTOFIT_TEST_MODEdoes not exist. The trap was documented instead of deleted; this deletes it.Companion docstring fix in PyAutoFit names
PYAUTO_TEST_MODEexplicitly (that prose is what invites the wrong name).