Skip to content

fix: compose output_search_root with test_mode segment in modeling_visualization_jit scripts#153

Open
Jammy2211 wants to merge 1 commit into
mainfrom
fix/visualization-jit-test-mode-output-path
Open

fix: compose output_search_root with test_mode segment in modeling_visualization_jit scripts#153
Jammy2211 wants to merge 1 commit into
mainfrom
fix/visualization-jit-test-mode-output-path

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

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 both the pre-clean and the fit.png assertion point at the wrong tree: the cleanup misses the cached samples and the rglob finds 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 (where config/build/env_vars.yaml unsets PYAUTO_TEST_MODE for 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.py passes under both the runner env (real Nautilus, fit.png produced) and PYAUTO_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

…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>
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