You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
should_simulate deletes tracked, version-controlled data and replaces it with capped-simulator output. This is independent of the stale-dataset bug it was found alongside, and no variant of that fix addresses it.
The rmtree is unconditional. It does not ask whether the directory holds generated data or committed data.
The live case
In autolens_workspace_test:
.gitignore:13 reads !dataset/point_source/simple/** — an explicit allowlist exception, i.e. this directory is deliberately committed. git ls-files confirms three tracked JSON files under it (point_dataset_positions_only.json, point_dataset_with_fluxes_and_time_delays.json, tracer.json). The allowlist comments describe this class as real/external data that must never be purged.
scripts/point_source/visualization/visualization.py:39 calls should_simulate("dataset/point_source/simple"), and the script declares only ENV: real_plots (line 22), so it keepsPYAUTO_SMALL_DATASETS=1 under the smoke profile defaults.
So an ordinary smoke run deletes committed data. It is then re-simulated through PointSolver.solve, which under the cap short-circuits to a fixed position pair (PyAutoLens autolens/point/solver/point_solver.py:119) — so the replacement content is not merely lower-resolution, it is degenerate.
Seven full-regime scripts then read that same directory, one of them in smoke_tests.txt.
Severity
The deletion is recoverable (git checkout -- dataset/point_source/simple) and shows up as a dirty working tree, so this is not data loss in the unrecoverable sense. But:
it silently violates the invariant the .gitignore allowlist exists to express;
it leaves developers with an unexplained dirty tree after a routine smoke run;
Make the destructive branch respect committed data rather than assuming every dataset directory is disposable. Options worth weighing:
Skip rmtree for tracked paths — cheap to check, but puts a git dependency in a library utility, which is the wrong layer.
Have the workspace declare the exception — give point_source/visualization/visualization.py a full_datasets-style profile entry so it never enters the small regime against committed data. Narrowest fix, but leaves the general footgun armed for the next allowlisted dataset.
Regime path separation — capped runs write to a separate path so the two regimes never share a directory. This removes the collision rather than detecting it, and would also close feat: add title_prefix support to subplot_imaging_dataset #260's remaining gaps, but needs a path-rewrite layer in the IO with real sharp edges (committed read-only inputs like uv_wavelengths/sma.fits need read-fallback, plot outputs, absolute paths).
(2) unblocks the immediate case; (3) is the architecturally correct shape if this class of bug keeps recurring.
Overview
should_simulatedeletes tracked, version-controlled data and replaces it with capped-simulator output. This is independent of the stale-dataset bug it was found alongside, and no variant of that fix addresses it.autoarray/util/dataset_util.py, small-datasets branch:The
rmtreeis unconditional. It does not ask whether the directory holds generated data or committed data.The live case
In
autolens_workspace_test:.gitignore:13reads!dataset/point_source/simple/**— an explicit allowlist exception, i.e. this directory is deliberately committed.git ls-filesconfirms three tracked JSON files under it (point_dataset_positions_only.json,point_dataset_with_fluxes_and_time_delays.json,tracer.json). The allowlist comments describe this class as real/external data that must never be purged.scripts/point_source/visualization/visualization.py:39callsshould_simulate("dataset/point_source/simple"), and the script declares onlyENV: real_plots(line 22), so it keepsPYAUTO_SMALL_DATASETS=1under the smoke profile defaults.So an ordinary smoke run deletes committed data. It is then re-simulated through
PointSolver.solve, which under the cap short-circuits to a fixed position pair (PyAutoLens autolens/point/solver/point_solver.py:119) — so the replacement content is not merely lower-resolution, it is degenerate.Seven full-regime scripts then read that same directory, one of them in
smoke_tests.txt.Severity
The deletion is recoverable (
git checkout -- dataset/point_source/simple) and shows up as a dirty working tree, so this is not data loss in the unrecoverable sense. But:.gitignoreallowlist exists to express;Suggested direction
Make the destructive branch respect committed data rather than assuming every dataset directory is disposable. Options worth weighing:
rmtreefor tracked paths — cheap to check, but puts a git dependency in a library utility, which is the wrong layer.point_source/visualization/visualization.pyafull_datasets-style profile entry so it never enters the small regime against committed data. Narrowest fix, but leaves the general footgun armed for the next allowlisted dataset.uv_wavelengths/sma.fitsneed read-fallback, plot outputs, absolute paths).(2) unblocks the immediate case; (3) is the architecturally correct shape if this class of bug keeps recurring.
Context