Repository navigation
Description
Overview
PyAutoGalaxy's new profile-constructor guards correctly reject unphysical parameters, but raw ValueError now escapes model fitting where invalid candidates must be resampled. The same validation also exposes results tutorials and regression fixtures that construct profile instances from marginal error vectors or deliberately invalid all-ones samples. This task restores release/workspace compatibility without changing prior support.
Heart's exact RED reason is release validation FAILED (stage integrate) in PyAutoHeart Actions run 31354307923. The related workspace validation reports 45 failures.
Plan
- Preserve direct constructor validation while making invalid fit candidates rejectable by PyAutoFit.
- Keep existing priors and scientific parameter support unchanged.
- Avoid constructing physical profiles from marginal/error vectors that are not guaranteed jointly physical.
- Repair deliberately invalid fixtures and move intentional NaN injection downstream of constructor validation.
- Re-run the failed script surface, workspace validation, release integration, and Heart readiness.
Detailed implementation plan
Affected Repositories
- PyAutoGalaxy (primary)
- autogalaxy_workspace
- autolens_workspace
- autogalaxy_workspace_test
- autolens_workspace_test
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| PyAutoGalaxy | main | clean |
| autogalaxy_workspace | main | clean |
| autolens_workspace | main | clean |
| autogalaxy_workspace_test | main | clean |
| autolens_workspace_test | main | clean |
No active task claims these repositories. A clean unregistered autolens workspace worktree exists on feature/point-source-campaign-evidence-tail; it is an acknowledged non-blocking overlap warning.
Suggested branch: feature/profile-validation-resample-recovery
Work Classification: Both — library first, then workspaces.
Worktree root: ~/Code/PyAutoLabs-wt/profile-validation-resample-recovery/
Implementation Steps
- In
PyAutoGalaxy/autogalaxy/exc.py, introduce a narrowly scoped profile-parameter exception inheriting from bothValueErrorandautofit.exc.FitException. - In
PyAutoGalaxy/autogalaxy/profiles/validate.py, raise that exception directly forell_compsand pass it asexc_typeto the shared AutoArray scalar validators. Do not change broadProfileExceptionbehavior or catch arbitraryValueErrorin PyAutoFit. - Extend
PyAutoGalaxy/test_autogalaxy/profiles/test_validate.pyto prove direct calls remainValueError, fitting recognizesFitException, valid values/JAX tracers still pass, and error messages remain actionable. - Update the results guides in
autogalaxy_workspaceandautolens_workspaceso component-wise marginal/error vectors use list/dictionary output where they are not guaranteed to form a valid physical profile. Regenerate affected notebooks. - Replace invalid all-ones ellipticity components in the affected aggregator regression fixtures in
autogalaxy_workspace_testandautolens_workspace_test, preserving unrelated sentinel values and assertions. - Redesign
autolens_workspace_test/scripts/imaging/jax_likelihood/delaunay.pyso its deliberate NaN reaches the downstream likelihood without asking profile constructors to accept NaN parameters. - Run focused PyAutoGalaxy tests and the full library suite; then run all 22 scripts that failed in release integration under their declared environments, verify generated notebook parity, dispatch workspace/release validation, and refresh Heart.
Key Files
PyAutoGalaxy/autogalaxy/exc.py— fit-aware profile parameter exception.PyAutoGalaxy/autogalaxy/profiles/validate.py— constructor validation exception contract.PyAutoGalaxy/test_autogalaxy/profiles/test_validate.py— regression tests.autogalaxy_workspace/scripts/guides/results/— marginal/error summary examples.autolens_workspace/scripts/guides/results/— matching lensing examples.autogalaxy_workspace_test/scripts/misc/aggregator/— physical fixture vectors.autolens_workspace_test/scripts/misc/aggregator/— physical fixture vectors.autolens_workspace_test/scripts/imaging/jax_likelihood/delaunay.py— downstream NaN injection.
Out of Scope
- Joint unit-disk priors or axis-ratio/position-angle reparameterization.
- Global catching of
ValueErrorin PyAutoFit. - Narrowing component priors to an orientation-dependent square.
- Tenant-firewall drift unrelated to this regression.
Original Prompt
Click to expand starting prompt
Can we target making heart red
Should it not be the priors prevent these unphysical values throughout? That might be a big task but worth assessing
Just do 1 i agree 2 is too much
Activity
Jammy2211 commentedon Aug 10, 2026
Library PR Created
ValueError/FitException, allowing stochastic non-linear-search candidates to be rejected through PyAutoFit resampling.Next:
/start_workspacefor the approved narrow compatibility edits. The joint ellipticity-prior redesign remains explicitly out of scope.Jammy2211 commentedon Aug 10, 2026
Smoke Test Results — 2026-08-10
Smoke gate failed. Per the ship-workspace contract, no workspace PRs were opened and no code was changed in response to these failures.
Failures
autofit_workspace/notebooks/overview/overview_1_the_basics.ipynb
autofit_workspace/notebooks/searches/mcmc.ipynb
autogalaxy_workspace/notebooks/imaging/modeling.ipynb
autogalaxy_workspace/notebooks/interferometer/simulator.ipynb
autolens_workspace/scripts/multi_galaxy/features/pixelization/cpu_fast_modeling.py
autolens_workspace/notebooks/imaging/modeling.ipynb
autolens_workspace/notebooks/interferometer/simulator.ipynb
autolens_workspace_test/scripts/interferometer/jax_likelihood/rectangular.py
autolens_workspace_test/scripts/interferometer/jax_likelihood/mge.py
autolens_workspace_test/scripts/interferometer/jax_likelihood/potential_correction.py
autolens_workspace_test/scripts/interferometer/subhalo_recovery_interferometer.py
Jammy2211 commentedon Aug 10, 2026
Smoke Test Results — 2026-08-10 (environment-repaired rerun)
All 143 smoke targets passed across six workspaces after installing the required validation dependencies into the task-local virtual environment.
Jammy2211 commentedon Aug 10, 2026
Shipped — 2026-08-10
PRs
Summary
The approved narrow compatibility fix shipped: invalid profile construction is now both a direct
ValueErrorand a PyAutoFitFitException, and the affected deterministic summaries and invalid fixtures were corrected. The targeted smoke suite passed 143/143, and the library-first merge gate was observed. The explicitly out-of-scope joint-prior redesign was not implemented.Post-merge validation
Fresh release integration later reported 660 passed / 1 failed / 101 skipped / 0 timeouts, with install checks A–F all passing. Issue #567 was reopened for the remaining
extra_galaxies/slam.pyescape path; see the subsequent validation comment.Jammy2211 commentedon Aug 11, 2026
Post-merge release validation — RED (2026-08-10)
Fresh validation run: https://github.com/PyAutoLabs/PyAutoHeart/actions/runs/31441556729
autolens_workspace/scripts/imaging/features/extra_galaxies/slam.pyell_comps=(-0.9257683911051445, -0.5502774378326348), magnitude1.0769644249264025The new library guard is behaving correctly: it rejects an unphysical ellipse. The remaining defect is that this workspace script still has a prior path capable of drawing
|ell_comps| >= 1. Issue reopened so the organism state does not falsely claim GREEN. No live release was performed.Jammy2211 commentedon Aug 11, 2026
The release-validation follow-up is now implemented in PyAutoFit: PyAutoLabs/PyAutoFit#1463
It fixes the
PYAUTO_TEST_MODE=1lifecycle leak that reconstructed thePowerLawpoint after its constructor guard had correctly rejected it withFitException. Full PyAutoFit validation passed (1707 passed, 2 skipped). The PR is a draft withpending-release; nothing has been merged or released.Jammy2211 commentedon Aug 11, 2026
Release validation GREEN — 2026-08-11
Green run: https://github.com/PyAutoLabs/PyAutoHeart/actions/runs/31534325304 (dispatched 20:42:55Z on Heart
mainb7634e2c, completed 21:50:07Z)53 jobs, 52 green,
integrate / run_notebooksskipped by design. Artifacts written:release-stage-report,workspace-validation-report,verify-install-release.What closed the escape path
The reopen (00:22Z) named the open question: is the
ell_compsescape in PyAutoFit's post-likelihood/quick-update reconstruction, or does it need a narrower workspace prior? It was the reconstruction, in three places, plus one workspace guide. No prior was narrowed.Evidence trail
The failing surface shrinks monotonically across four
Release Integratedispatches as the fixes land:Attribution across runs is from job outcomes and merge timestamps, not job logs; the last leg is the firmest (the 18:59Z run's only failure was
autolens/guides, #484 touches exactly that package, and the next dispatch was green).Heart's verdict
Heart has not yet consumed this evidence, so its published board still shows the older tier — that is
release_run.py's cached-artifact pattern working as designed, not a regression. The next dev-box tick reads the latest completed run of this channel, finds no sidecar for run id 31534325304, and self-ingests therelease-stage-report; nothing needs to be run by hand. Tracked in PyAutoMindactive.mdasheart-green-validation-ingest, with the full record atcomplete/2026/08/heart-red-guarded-sample-escape.md.Closing: the regression this issue tracks is fixed and proven green at release fidelity. No live release was performed.
Generated by Claude Code
Jammy2211 commentedon Aug 19, 2026
Closing: the evidence gap this tracked is resolved. The four fixes were already merged (see PyAutoMind
complete/2026/08/heart-red-guarded-sample-escape.md); the outstanding validation ingest completed on the dev box on 2026-08-19 with fresh evidence covering current source — PyAutoHands rehearsal run 32210450811 (TestPyPI 2026.8.19.1.dev72301) + PyAutoHeart Release Integrate run 32264548345 (663 passed / 0 failed), ingested together:rehearse:pass, integrate:pass,release_ready: true, commit_shas matching all five library mains. Full record: PyAutoMindcomplete/2026/08/heart-green-validation-ingest.md.🤖 Generated with Claude Code