fix: respect disabled test mode in output paths#1368
Merged
Conversation
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.
Summary
Use PyAutoConf's canonical numeric test-mode state when selecting AutoFit's output namespace. This prevents the release profile's
PYAUTO_TEST_MODE=0from writing real-search results underoutput/test_mode/, where database scripts cannot find them, while preserving isolation for active test-mode levels.Addresses #1367.
Corrective Heart RED authorization
release validation FAILED (stage integrate)pending-releasePRCausal mapping
The release integration profile sets
PYAUTO_TEST_MODE=0. AutoFit used raw environment-string truthiness, so the non-empty string"0"incorrectly enabled thetest_modepath segment. Fits were written belowoutput/test_mode/database/..., while the database scrapers readoutput/database/...; the aggregator therefore contained zero searches and raisedAssertionError. This change delegates path selection to PyAutoConf's numericis_test_mode()API, so level 0 uses the normal output root and active levels remain isolated.The reported
Failed to load latent variableswarning is incidental: the failing run did not reach latent-variable scraping. SQLAlchemy 2.0.51, dill 0.4.1, and NumPy 2.4.6 do not flip the result.API Changes
Changed behavior only:
DirectoryPaths.output_pathnow treatsPYAUTO_TEST_MODE=0as disabled, consistently with the rest of the test-mode API. Active levels continue to useoutput/test_mode/. No symbols or signatures changed.Test Plan
python -m pytest test_autofit/ -x— 1475 passed, 1 skippedSQLAlchemy 2.0.51,dill 0.4.1,numpy 2.4.6) — all 6 database scripts passed withPYAUTO_TEST_MODE=0git diff --checkPost-merge validation
Merge remains a separate human decision. After merge, build fresh wheels, rerun release integration validation, and obtain a new Heart verdict before any release decision.
Full API Changes (for automation & release notes)
Removed
Added
Renamed
Changed Signature
Changed Behaviour
autofit.non_linear.paths.directory.DirectoryPaths.output_path—PYAUTO_TEST_MODE=0now writes to the normal output root; values greater than zero continue to write underoutput/test_mode/.Migration
PYAUTO_TEST_MODE=0.Generated by the PyAutoLabs agent workflow.