Repository navigation
Description
Overview
PyAutoHeart/workspace-validation has been red since 2026-07-26 on the
run_scripts (3.12, autofit_test, searches) shard — four failures with two
independent root causes, both confirmed by local reproduction. One is a
missing test-harness declaration; the other is a real user-facing packaging
gap (pip install autolens[jax] does not install optax, so
af.MultiStartAdam / af.MultiStartProdigy raise ImportError for users).
scripts/searches/BlackJAXNUTS.py FAIL ModuleNotFoundError: No module named 'blackjax'
scripts/searches/MultiStartAdam.py FAIL ImportError: requires optional `jax` and `optax`
scripts/searches/MultiStartProdigy.py FAIL AssertionError: 1.0
scripts/searches/MultiStartResurrect.py FAIL KeyError: 'n_resurrections'
Plan
- (a)
MultiStartProdigy.pyandMultiStartResurrect.pycarry no__Env__
declaration, so they inherit the smoke defaultsPYAUTO_TEST_MODE=2+
PYAUTO_DISABLE_JAX=1and run the bypass path instead of a real JAX search.
Add the missing declaration to both. - (b) The validation smoke leg installs
autolens[optional], whose extras
chain stops atautonerves[jax]and never reachesautofit[jax](optax) or
autofit[optional](blackjax). Fix the chain in PyAutoGalaxy so optax follows
thejaxextra everywhere, and installautofit[optional]in the workflow for
blackjax. - Audit the sibling JAX search scripts and report (do not silently fix).
Detailed implementation plan
Affected Repositories
- autofit_workspace_test (primary)
- PyAutoGalaxy
- PyAutoHeart
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./autofit_workspace_test | main | clean |
| ./PyAutoGalaxy | main | clean |
| ./PyAutoHeart | main | clean |
Suggested branch: feature/validation-searches-env-optax
Reproduction (local, byte-identical to CI)
cd autofit_workspace_test
PYAUTO_TEST_MODE=2 PYAUTO_DISABLE_JAX=1 PYAUTO_SKIP_WORKSPACE_VERSION_CHECK=1 \
python3 scripts/searches/MultiStartProdigy.py
# Recovered: centre=50.000, normalization=1.000, sigma=15.000
# AssertionError: 1.01.0 is the LogUniform(1e-2, 1e2) midpoint the bypass returns for
normalization (truth 25.0). n_resurrections is absent because the bypass
never builds a search_internal. Both scripts pass on a normal run.
Cause: the #187/#189 ENV migration (2026-07-23) named only the two siblings
(MultiStartAdam, BlackJAXNUTS) and missed these two.
Implementation Steps
-
autofit_workspace_test — append an
__Env__section carrying
ENV: real_search jaxto the end of the module docstring of
scripts/searches/MultiStartProdigy.pyand
scripts/searches/MultiStartResurrect.py. Mirror
scripts/searches/MultiStartAdam.py:24-30exactly: column-0__Env__
header, exactly oneENV:line, no leading#— the legacy comment form
now raises (PyAutoHands/autohands/env_config.py:82-92). The tokens release
PYAUTO_TEST_MODEandPYAUTO_DISABLE_JAX(env_config.py:43-54). -
PyAutoGalaxy —
pyproject.tomljaxextra:"autonerves[jax]"→
"autofit[jax]". Strictly additive (autofit[jax] = ["autonerves[jax]", "optax>=0.2.5"]), and PyAutoGalaxy already depends onautofit
(pyproject.toml:29), so no new dependency edge.autolens[jax] → autogalaxy[jax]inherits it. -
PyAutoHeart —
.github/workflows/workspace-validation.yml, smoke
install step (~236-248): addpip install "autofit[optional]"for blackjax,
commented in the style of the existingnufftaxprecedent directly above.
mode=releasealready installsautofit[optional]==$TESTPYPI_VERSION, so
only the smoke leg changes. -
Audit / report only —
Nautilus_jax.pyandDynesty_jax.pyalso use JAX
with no declaration. They do not fail (no truth-recovery assert) but are
therefore running the numpy path under smoke, contributing zero JAX
coverage. Report and recommend; do not fold in silently. The remaining
searches scripts are numpy-only and correctly need nothing.
Key Files
scripts/searches/MultiStartProdigy.py— add__Env__sectionscripts/searches/MultiStartResurrect.py— add__Env__sectionscripts/searches/MultiStartAdam.py— the reference form to mirrorPyAutoGalaxy/pyproject.toml—jaxextraPyAutoHeart/.github/workflows/workspace-validation.yml— smoke install step
Verification
- Both scripts pass under the exact smoke defaults that currently fail.
PyAutoHands/autohands/validate_env_profiles.pyreports both as declared, and
the resolved-env diff shows the two vars released for them and unchanged
for every other script (config changes are verified by resolved-env diff, not
smoke alone).- Scratch venv:
pip install -e PyAutoGalaxy[jax]thenimport optax. workspace-validationgreen on the next scheduled run — read the verdict via
the Actions API (gh pr checksis unparseable on thisghbuild). Do
not hand-dispatch the nightly release.
Notes
- Brain phase-split overridden.
pyauto-brain featurescored this
too-large (score 20)and proposed a 4-phase split. That score tracks the repo
count (4), not change size — the total diff is two docstring sections, one
pyproject.tomlline and onepip installline, with no API change and no
public-API ripple. Kept as one easy task; one PR per repo. - The morning
/wake_updigest first attributed these failures to the MultiStart
cadence PRs (#1421/#1423). That was wrong — they merged 2026-07-27 16:00 BST,
~10h after the 06:15 failing run. - Do not "fix"
BlackJAXNUTS.pyby deleting it or dropping blackjax —
blackjax is a kept dependency.
Original Prompt
Click to expand starting prompt
Original request:
can we sequentially tackle everything in 3 overnight jobs red
(from the 2026-07-27 /wake_up digest; this is the first of the three red jobs.)
Activity
Jammy2211 commentedon Jul 27, 2026
Library PRs created
All three fixes are open and labelled
pending-release:__Env__declarations (cause a)All three are needed for a green
autofit_test/searchesshard.Verification done
PYAUTO_TEST_MODE+PYAUTO_DISABLE_JAX; the other 61 byte-identical. This is the authoritative check for a config change — smoke alone would not prove the absence of collateral effects.MultiStartProdigy→centre=50.154, normalization=25.195, sigma=9.858MultiStartResurrect→n_resurrections0 (off) / 1 (on), identical basin,np.allclosesafety property holdsRequires-Dist: autofit[jax]; extra == "jax"— chain tooptax>=0.2.5closed.workspace-validation.ymlparses; only themode=smokestep changed.Heart gate
YELLOW (score 65), no RED — acknowledged by the human. None of the yellow reasons is caused by this change, and the first (
workspace validation not passing (13 failed)) is what this fixes.Audit finding — reported, not fixed
Nautilus_jax.pyandDynesty_jax.pyalso carry no ENV declaration. They do not fail, because neither asserts truth recovery — butanalysis.py:68silently forcesuse_jax=FalsewhenPYAUTO_DISABLE_JAX=1, anduse_jax=Trueis the only thing separating them from theirNautilus.py/DynestyStatic.pysiblings. So under smoke they are duplicate numpy runs contributing zero JAX coverage.Left out of this PR deliberately — it changes what those scripts exercise (and their runtime), which is a separate call. Recommend adding
ENV: jaxto both as a follow-up.Correction
The morning
/wake_updigest attributed these failures to the MultiStart cadence PRs (#1421/#1423). That was wrong — they merged 2026-07-27 16:00 BST, ~10h after the 06:15 failing run. The real trigger is the #187/#189 ENV migration (2026-07-23).Jammy2211 commentedon Jul 27, 2026
Shipped — all three PRs merged 2026-07-27: autofit_workspace_test#78, PyAutoLabs/PyAutoGalaxy#530, PyAutoLabs/PyAutoHeart#111.
__Env__declarations added to MultiStartProdigy/MultiStartResurrect (real_search+jax), optax now follows the jax extra, blackjax installed via autofit[optional] in the smoke leg. Completion recorded in PyAutoMind (merged by the #657 session to clear the PyAutoGalaxy worktree claim; local worktree cleanup deferred to the owning session).