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
88 changes: 88 additions & 0 deletions complete/2026/08/notebook-setup-notebook-regen-drift.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
Regenerated the 285 autolens_workspace notebooks that had drifted from
PyAutoHands generator output. autolens_workspace#481 MERGED 2026-08-07
(f3006b3d), closing issue #480. Branch `claude/dev-script-title-underline-5d3c3p`,
restarted from main 573bde8 after #478 merged (same session-designated branch,
new PR — merged-branch restart rule).

- **The drift:** PyAutoHands build_util.py uncomments
`# from autolens import setup_notebook; setup_notebook()` when generating
notebook cells, but committed notebooks carried the commented form — so
none of them called setup_notebook() on main, and every notebook-touching
PR either dragged the churn or hand-restored around it (as #478 did).
- **Sweep:** clean-main `generate.py autolens`, notebooks-only, 285 files /
288±288 lines. Audited: 285 setup_notebook flips + 2 JSON-indent
normalizations of a hand-inserted batch_size comment line (imaging/ and
multi_galaxy/ start_here.ipynb) — direct evidence committed notebooks were
hand-edited rather than generated. Catalogue zero diff. Count came in at 285,
not the prompt's ~290 estimate.
- **Verification:** second regeneration on the swept tree is a no-op (same
285-file set, stable); check_navigator --banners fail green; underline state
from #478 preserved (0 typos / 14 banners); CI both smoke legs + all three
navigator checks green (~9 min).
- **SIBLING DRIFT MEASURED AND FILED (not fixed):** clean-tree dry-runs
2026-08-07 with PyAutoHands 2a4fb11 — autogalaxy_workspace 127 modified
(126 flips + 6 OTHER diff lines, audit before committing),
autofit_workspace 31 (32 flips), HowToFit 13 (13 flips); HowToLens and
HowToGalaxy CLEAN. Follow-up prompt:
`draft/maintenance/workspaces/notebook_setup_notebook_drift_siblings.md`
(one task, three PRs — mge-sigma phase-2 precedent).
- **Environment trap (repeat of #478's):** ipynb-py-convert cannot pip-install
on modern setuptools; vendor the package into site-packages + a CLI shim.

## Original prompt

# Regenerate 331 autolens_workspace notebooks drifted from generator output (setup_notebook line)

Difficulty: small
Autonomy: supervised
Priority: low

## The problem

A full PyAutoHands regeneration dry-run (`generate.py autolens`) against
**unmodified** scripts on `@autolens_workspace` main modifies **331 committed
notebooks by exactly one line each**: `PyAutoHands:autohands/build_util.py`
(line ~204) uncomments

```
# from autolens import setup_notebook; setup_notebook()
```

into the active form for notebook cells, but the committed notebooks carry the
commented form. Net effect: every one of those notebooks on main currently
**never calls `setup_notebook()`**, and any PR that regenerates notebooks drags
this 331-file churn into its diff (or must hand-restore, as the underline task
did).

Measured 2026-08-07 on autolens_workspace `8f1965c` with PyAutoHands `2a4fb11`.

## Likely cause

The committed notebooks were last produced either by a generator version
predating the uncomment transformation or by lockstep hand-edits. The
transformation itself predates the autobuild→autohands rename, so the drift has
been accumulating across recent notebook commits.

## Proposed fix

One dedicated sweep PR: run `generate.py autolens` on clean main, commit the
notebook-only diff (expected: 331 files × 1 line, the setup_notebook flip —
verify nothing else rides along), and confirm `check_navigator.py` stays green.
Check whether `autogalaxy_workspace` / `autofit_workspace` / the HowTo repos
have the same drift and file siblings if so.

41 notebooks were already brought to generator truth by the underline task
(autolens_workspace#476), so the count at sweep time will be ~290.

## Verification

- After the sweep, a regeneration dry-run on clean main is a no-op
(`git status` empty).
- No notebook diff lines other than the setup_notebook flip.

## Provenance

Surfaced as a side-observation while shipping the title-underline fix
(autolens_workspace#476, PyAutoMind
`active/script_title_underline_off_by_one.md`), which introduced none of it —
that task's regeneration dry-run against unmodified scripts is the measurement.
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
Fixed the off-by-one RST title underlines across autolens_workspace scripts.
autolens_workspace#478 MERGED 2026-08-07 (573bde8c, merge commit; single change
commit 5844ad5), closing issue #476. Branch `claude/dev-script-title-underline-5d3c3p`
(session-designated — a Claude Code web session may push only that branch, so it
replaced the `feature/<name>` convention; the same-named PyAutoMind branch
carries this record until merged to Mind main).

- **Scope grew 29 → 41.** The prompt's 2026-07-30 measurement at 726d060d found
29 typos; 12 more landed since with the scaling-relation and datacube feature
families. Each fix is one line: rule set to exactly `len(title)` `=` chars.
- **Banner guard held.** Discriminator `abs(len(title)-len(rule)) <= 2` = typo,
wider = deliberate full-width banner. Control-tested at 726d060d in a temp
worktree, reproducing the recorded 29/15 split exactly before being trusted
on main. Current main has 14 banner rules (one block removed upstream since);
all 14 byte-untouched, re-verified after the fix (0 typos / 14 banners).
- **Notebooks**: the 41 paired notebooks regenerated via PyAutoHands
generate.py; catalogue (llms-full.txt / workspace_index.json) regenerated
with zero diff — underline rules do not flow into catalogue summaries.
check_navigator --banners fail green, check_sizes green, all 41 scripts
byte-compile. CI: both smoke legs (3.12/3.13) + all three navigator checks
green in ~9 min.
- **KEY FINDING — repo-wide notebook regeneration drift (FILED, not fixed):**
a generate.py dry-run against *unmodified* scripts modifies **331 committed
notebooks by one line** — PyAutoHands build_util.py uncomments
`# from autolens import setup_notebook; setup_notebook()` for notebook
cells, but committed notebooks carry the commented form, so main's notebooks
never call setup_notebook(). This PR brought only its own 41 notebooks to
generator truth (39 carry the flip; 2 lack the line) and hand-restored the
other ~290 regenerated files to keep the diff scoped. Follow-up prompt:
`draft/maintenance/workspaces/notebook_setup_notebook_regen_drift.md`.
- **Environment trap:** `pip install ipynb-py-convert` fails on modern
setuptools (`install_layout` AttributeError in bdist_wheel). Workaround:
`pip download --no-deps --no-binary :all:`, copy the `ipynb_py_convert`
package into site-packages, and write a 4-line `/usr/local/bin/ipynb-py-convert`
entry-point shim — generate.py shells out to the CLI name.
- **Sizing note:** the Feature Agent's heuristic said large (score 8) /
split-into-phases; overridden — prose-driven overestimate (same pattern as
the mge-sigma-min sizing-note). Actual: small, single-phase, one PR.

## Original prompt

# Fix 29 off-by-one script title underlines in @autolens_workspace

Difficulty: small
Expand Down
4 changes: 3 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.

927 records across 7 buckets.
929 records across 7 buckets.

<!-- CURATED:START -->
## Highlights
Expand Down Expand Up @@ -41,6 +41,7 @@ _(curate hard-won records here — survives regeneration.)_
- [missing-auto-simulate-guards](2026/08/missing-auto-simulate-guards.md)
- [multi-start-auto-convergence-real-search](2026/08/multi-start-auto-convergence-real-search.md) — `scripts/jax_assertions/multi_start_gradient_auto_convergence.py` failed
- [nautilus-1core-serial-pool](2026/08/nautilus-1core-serial-pool.md) — corrective for the Heart RED "release validation FAILED (stage
- [notebook-setup-notebook-regen-drift](2026/08/notebook-setup-notebook-regen-drift.md)
- [nufft-parity-full-datasets](2026/08/nufft-parity-full-datasets.md)
- [plot-array-stale-kwargs](2026/08/plot-array-stale-kwargs.md)
- [point-source-defaults-campaign](2026/08/point-source-defaults-campaign.md) — took the point-source likelihood options from "several undocumented
Expand All @@ -52,6 +53,7 @@ _(curate hard-won records here — survives regeneration.)_
- [purge-autocti-dataset-1d-overview](2026/08/purge-autocti-dataset-1d-overview.md) — no GitHub issue — the leftover from `autocti-util-dataset-export`, executed on direct human instruction "do th…
- [pyautobrain-pr-test-ci](2026/08/pyautobrain-pr-test-ci.md) — auto-closed by the merge
- [pyautogalaxy-mge-sigma-test](2026/08/pyautogalaxy-mge-sigma-test.md)
- [script-title-underline-off-by-one](2026/08/script-title-underline-off-by-one.md)
- [simulator-util-to-af-ex](2026/08/simulator-util-to-af-ex.md) — moved the four 1D-Gaussian simulator helpers out of the duplicated
- [small-datasets-loader-pixel-scales](2026/08/small-datasets-loader-pixel-scales.md)
- [smoke-runner-jupyter-guard](2026/08/smoke-runner-jupyter-guard.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Regenerate setup_notebook-drifted notebooks in autogalaxy/autofit/HowToFit workspaces

Difficulty: small
Autonomy: supervised
Priority: low

## The problem

The same generator/notebook drift fixed in @autolens_workspace (#480/#481 —
committed notebooks carry the commented `# from auto* import setup_notebook;
setup_notebook()` form while PyAutoHands regeneration uncomments it, so the
notebooks never call it) exists in three sibling repos. Measured 2026-08-07 by
clean-tree `generate.py` dry-runs with PyAutoHands `2a4fb11`:

| Repo | Modified notebooks | setup_notebook flips | Other diff lines |
|---|---|---|---|
| @autogalaxy_workspace | 127 | 126 | **6 — audit before committing** |
| @autofit_workspace | 31 | 32 | 0 |
| @HowToFit | 13 | 13 | 0 |
| @HowToLens | 0 | — | — |
| @HowToGalaxy | 0 | — | — |

## Proposed fix

Mirror of autolens_workspace#481: one dedicated regeneration sweep per repo
(three PRs under this one task, mge-sigma phase-2 precedent), committing the
clean-main `generate.py <project>` notebook diff. In autogalaxy_workspace,
audit the 6 non-flip diff lines first — in autolens_workspace the analogous
extras were harmless JSON-indent normalizations of hand-edited lines, but
verify before committing.

## Verification (per repo)

- Second regeneration on the swept tree is a no-op.
- No diff content beyond the setup_notebook flip + audited/explained extras.
- Each repo's navigator/catalogue checks stay green.

## Provenance

Sibling check registered in the notebook-setup-notebook-regen-drift task
(autolens_workspace#480), run 2026-08-07 while that task's PR was in CI.
Loading