Skip to content

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

Merged
Jammy2211 merged 2 commits into
mainfrom
fix/visualization-jit-test-mode-output-path
Jul 15, 2026
Merged

fix: compose output_search_root with test_mode segment in modeling_visualization_jit scripts#153
Jammy2211 merged 2 commits 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

Jammy2211 and others added 2 commits July 9, 2026 10:48
…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>
@Jammy2211 Jammy2211 merged commit 11e83f7 into main Jul 15, 2026
4 checks passed
@Jammy2211 Jammy2211 deleted the fix/visualization-jit-test-mode-output-path branch July 15, 2026 09:01
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