fix: compose output_search_root with test_mode segment in modeling_visualization_jit scripts#153
Merged
Merged
Conversation
…sualization_jit scripts The five modeling_visualization_jit* scripts compose the Nautilus output path manually as output/<path_prefix>/<name>. Under PYAUTO_TEST_MODE autofit namespaces output under output/test_mode/, so the pre-clean and the fit.png assertion both point at the wrong tree — the cleanup misses the cached samples and the rglob finds nothing, failing the script even though visualization fired. Use autoconf's with_test_mode_segment so the composed path agrees with autofit in both modes (a no-op in the release run, where env_vars.yaml unsets PYAUTO_TEST_MODE for these scripts, but correct for manual triage runs with the suite-default env). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Resolves the conflict in scripts/imaging/modeling_visualization_jit.py, where
both sides changed the same lines for different reasons:
- this branch wrapped the output root in with_test_mode_segment(), so the
rglob finds artifacts under output/test_mode/... when PYAUTO_TEST_MODE is
set (the point of the PR);
- main renamed the artifact this script looks for, fit.png -> fit_quick.png.
Both are wanted, so the resolution takes both. This matches the file's own
interferometer and point_source twins, which auto-merged to exactly that
combination, and the surrounding context here already agreed with main: the
comment above says the visualizer "writes fit_quick.png" and the assertion
below reads "no fit_quick.png produced" — the branch's fit.png was the stale
side.
modeling_visualization_jit_delaunay.py and _rectangular.py keep fit.png: that
asymmetry is pre-existing on main and internally consistent (their assertions
say "no fit.png produced"), so it is left alone.
Merged rather than rebased to avoid rewriting an already-pushed branch.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
The five
modeling_visualization_jit*scripts compose the Nautilus output path manually asoutput/<path_prefix>/<name>. UnderPYAUTO_TEST_MODEautofit namespaces output underoutput/test_mode/, so both the pre-clean and thefit.pngassertion point at the wrong tree: the cleanup misses the cached samples and therglobfinds nothing, failing the script even though visualization fired.This switches the composition to
autoconf.test_mode.with_test_mode_segment, whose docstring exists for exactly this rule. It is a no-op in the release run (whereconfig/build/env_vars.yamlunsetsPYAUTO_TEST_MODEfor these scripts) but makes manual triage runs with the suite-default env behave correctly — which is how this was found while re-validating the 2026-07-08 zero_contour failures.Verified:
point_source/modeling_visualization_jit.pypasses under both the runner env (real Nautilus, fit.png produced) andPYAUTO_TEST_MODE=2... (under mode 2 the sampler is bypassed so the script's part-2 assert can only pass in the runner env — the fix makes the failure message point at the right tree either way).🤖 Generated with Claude Code