Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,62 @@
# cli-noise-autonerves-batch

**Completed:** 2026-08-18 · **Type:** maintenance · **Target:** PyAutoNerves
**PRs:** PyAutoNerves#149 (fixes), PyAutoMind#232 (implementation notes) — both
merged 2026-08-18. No GitHub issue (small `Autonomy: safe` batch, driven
straight from the draft prompt in a remote session).

## What shipped

The three autonerves-rooted CLI-noise sources from the 2026-08-06
`/cli_noise_clean` audit, all fixed in one PyAutoNerves PR with regression
tests:

1. **fits leak** — `fitsable.ndarray_via_fits_from` called `fits.open` without
closing, emitting `ResourceWarning: unclosed file` in every downstream repo
that loads FITS. Now `with fits.open(...)`. The same fix was applied to
`header_obj_from`, which had the identical unclosed-handle pattern a few
lines below the one the audit named — an astropy `Header` stays valid after
the file closes, so the `with` block is safe there too.
2. **pytest collection** — `test_test_mode.py` imported the real API functions
`test_mode_level`/`test_mode_samples` by bare name, so pytest collected them
as tests (`PytestReturnNotNoneWarning`, an ERROR in a future pytest). The
unused `test_mode_level` import was dropped; `test_mode_samples` is aliased
to `_test_mode_samples`, with a comment so nobody "cleans up" the alias.
3. **`check_version` false positive** — fix option (b) from the prompt:
`check_version` now returns silently when its root (defaulting to cwd) is a
package source checkout (`setup.py` or `pyproject.toml` at its top level)
and no version floor is recorded. A recorded floor is still enforced even in
a source checkout, and a genuine workspace missing its version keys still
warns. Chosen over option (a) (per-library conftest env vars) because it is
self-contained in autonerves — no changes needed in the five library repos.

Full `test_autonerves` suite green (157/157) under `pytest -W all`; verified
`check_version()` is silent with cwd at a library repo root and that
`test_mode_*` no longer appear in `pytest --collect-only`.

## Surface decision (the prompt's item-3 open question)

The prompt flagged that PyAutoArray/PyAutoNerves don't call `check_version` at
all, unlike autofit/autogalaxy/autolens. Decided: **the asymmetry is intended,
not drift.** `check_version` is the surface of the *workspace-facing* libraries
only — users run scripts from workspace clones that import those three.
autoarray and autonerves are infrastructure layers never driven from a
workspace cwd directly. No library `__init__` was changed.

## Traps / findings

- The audit named one leak site (`fitsable.py:210`); the sibling
`header_obj_from` had the same leak and would have kept a residual
ResourceWarning trickle if only the named line were fixed. When fixing a
pattern-shaped noise source, grep the module for the pattern, not the line.
- The downstream ResourceWarning surfaces the audit lists
(`autofit/database/aggregator/scrape.py`, `autoarray` visibilities /
interferometer dataset, Galaxy/Lens runs) all route through these two
helpers, so no downstream-repo changes are needed — re-run the audit after
the next release picks up autonerves to confirm the stack-wide clearance.

## Original prompt

# Silence the three autonerves-rooted CLI-noise sources (fits leak, pytest collection, check_version false positive)

Type: maintenance
Expand Down
3 changes: 2 additions & 1 deletion complete/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Token-light navigation over the finished-work records (schema:
only then grep a dated bucket. Curators: edit the band between the CURATED
markers; everything below GENERATED is rebuilt.

1020 records across 7 buckets.
1021 records across 7 buckets.

<!-- CURATED:START -->
## Highlights
Expand All @@ -33,6 +33,7 @@ _(curate hard-won records here — survives regeneration.)_
- [border-relocator-backend-parity](2026/08/border-relocator-backend-parity.md) — Isolated the native NumPy/JAX likelihood gap to mathematically non-unique PCA axes for a near-isotropic border…
- [border-relocator-degenerate-pca](2026/08/border-relocator-degenerate-pca.md) — Stabilized near-isotropic border PCA axes with a deterministic axis-aligned branch at a scale-aware eigenvalue…
- [circular-ell-comps-image-gradient](2026/08/circular-ell-comps-image-gradient.md) — Replaced the Sersic image path's Cartesian-to-polar ellipticity conversion with an algebraically equivalent Ca…
- [cli-noise-autonerves-batch](2026/08/cli-noise-autonerves-batch.md)
- [clipper-usage-in-search-summary](2026/08/clipper-usage-in-search-summary.md) — `search.summary` now reports prior-support clipping. `n_clipped_lane_steps`
- [clipper-validation-campaign](2026/08/clipper-validation-campaign.md)
- [compile-axis-campaign-coverage](2026/08/compile-axis-campaign-coverage.md)
Expand Down
8 changes: 3 additions & 5 deletions dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Tasks only — the organism's health lives with the Heart (`/health`), not here.
| [In flight](#in-flight) (`active/`) | 3 |
| [Parked](#parked) (`parked.md`) | 1 |
| [Planned](#planned) (`planned.md`) | 7 |
| [Backlog](#backlog) (`draft/`) | 130 |
| [Backlog](#backlog) (`draft/`) | 129 |

Live on GitHub: [open issues](https://github.com/search?q=org%3APyAutoLabs+is%3Aissue+is%3Aopen&type=issues) · [open pull requests](https://github.com/search?q=org%3APyAutoLabs+is%3Apr+is%3Aopen&type=prs)

Expand All @@ -36,7 +36,6 @@ Live on GitHub: [open issues](https://github.com/search?q=org%3APyAutoLabs+is%3A

- [PyAutoFit CLI-noise batch: unclosed search.log handler + four small warning](draft/maintenance/pyautofit/cli_noise_pyautofit_batch.md) — pyautofit · small · safe · normal
- [Tenant firewall: release_run.py carries an unlisted 'PyAutoLabs' instance fact](draft/bug/pyautoheart/tenant_firewall_release_run_instance_fact.md) — pyautoheart · small · safe · normal
- [Silence the three autonerves-rooted CLI-noise sources (fits leak, pytest collection,](draft/maintenance/pyautonerves/cli_noise_autonerves_batch.md) — pyautonerves · small · safe · normal
- [add-vincken-2026-wiki-and-cite-in-euclid](draft/docs/workspaces/add_vincken_2026_wiki_and_cite_in_euclid.md) — workspaces · small · safe · normal
- [`add_notebook_quotes` mistakes a code string literal's closing delimiter for a](draft/bug/hands/notebook_quotes_string_literal_closing_delimiter.md) — hands · small · safe · low
- [Markdown renderings batch 2a — leftovers (ellipse/modeling + PNG size)](draft/docs/pyautobuild/markdown_renderings_2a_leftovers.md) — pyautobuild · small · safe · low
Expand Down Expand Up @@ -81,7 +80,7 @@ Scoped but not started; some are not yet prompt files. Full detail in [`planned.

## Backlog

**130** filed prompts, not started. Each section is sorted most-pickable first (priority, then size).
**129** filed prompts, not started. Each section is sorted most-pickable first (priority, then size).

<details>
<summary><b>bug</b> — 35</summary>
Expand Down Expand Up @@ -158,11 +157,10 @@ Scoped but not started; some are not yet prompt files. Full detail in [`planned.
</details>

<details>
<summary><b>maintenance</b> — 20</summary>
<summary><b>maintenance</b> — 19</summary>

- [autolens_workspace_developer rectangular experiments — Gut stash + rename](draft/maintenance/autolens_workspace_developer/rectangular_experiments_gut_stash.md) — autolens_workspace_developer · small · supervised · normal
- [PyAutoFit CLI-noise batch: unclosed search.log handler + four small warning](draft/maintenance/pyautofit/cli_noise_pyautofit_batch.md) — pyautofit · small · safe · normal
- [Silence the three autonerves-rooted CLI-noise sources (fits leak, pytest collection,](draft/maintenance/pyautonerves/cli_noise_autonerves_batch.md) — pyautonerves · small · safe · normal
- [Mirror drifted library config keys into the workspace configs](draft/maintenance/workspaces/config_key_mirror_drift.md) — workspaces · small · supervised · normal
- [Un-park imaging/features/scaling_relation/slam once PyAutoArray#431 merges](draft/maintenance/workspaces/unpark_imaging_scaling_relation_slam.md) — workspaces · small · supervised · normal
- [autolens_workspace_developer: broad stale-API rot (56 symbols, no CI)](draft/maintenance/autolens_workspace_developer/stale_api_rot_audit.md) — autolens_workspace_developer · medium · supervised · normal
Expand Down
Loading