Skip to content

docs(should_simulate): the point-source "not in this gap" note is repo-specific - #480

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/dataset-allowlist-small-datasets-guard
Aug 22, 2026
Merged

docs(should_simulate): the point-source "not in this gap" note is repo-specific#480
Jammy2211 merged 1 commit into
mainfrom
feature/dataset-allowlist-small-datasets-guard

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Docstring only — no behaviour change. Refs #470. Paired with PyAutoHands#253, which adds the guard that enforces what a docstring cannot.

The wrong sentence

should_simulate's "Known gap" section currently ends:

Note that point-source datasets are not in this gap: they write a top-level data.fits alongside their JSON and are covered normally. The original issue text grouped them with weak lensing as "JSON with no FITS"; that is true of weak lensing only.

That holds in autolens_workspace. It is false in autolens_workspace_test, whose .gitignore lists data.fits under "Generated artifacts — never check in":

$ git -C autolens_workspace_test ls-files dataset/point_source/simple
dataset/point_source/simple/point_dataset_positions_only.json
dataset/point_source/simple/point_dataset_with_fluxes_and_time_delays.json
dataset/point_source/simple/tracer.json

No data.fits ⇒ no SMALLDAT stamp ⇒ _is_capped_at_the_current_cap returns False ⇒ the capped branch deletes the directory.

That is precisely the directory #470 was about, so as written the paragraph reassures the reader about the one case that actually bit us — a committed, allowlist-protected dataset destroyed on every smoke run and replaced with degenerate output (PointSolver.solve short-circuits to a fixed position pair under the cap).

What it says now

The generalisation is replaced with the rule that actually governs: whether a dataset family is reachable by the stamp is decided per repository by that repo's .gitignore, never by the family name. "Point-source is safe" becomes "point-source is safe wherever a top-level data.fits is actually written", with the counter-example named.

It also points at PyAutoHands' check_dataset_allowlist guard (PyAutoHands#253), which fails a pre_build run when a should_simulate call site that has not released PYAUTO_SMALL_DATASETS would delete git-tracked files.

Verification

test_autoarray/util — 88 passed. -k "should_simulate or small_datasets" — 8 passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01F11sMzmaVWfU6NCz1PKVVb

…o-specific

The Known-gap section stated that point-source datasets "are not in this gap:
they write a top-level `data.fits` alongside their JSON and are covered
normally". That holds in autolens_workspace. It is false in
autolens_workspace_test, whose `.gitignore` lists `data.fits` under "Generated
artifacts — never check in", so `dataset/point_source/simple` is three tracked
JSON files and nothing else — no `SMALLDAT` stamp can exist there under any
placement.

That is precisely the directory PyAutoArray#470 was about, so the paragraph
reassured the reader about the one case that bit us: the capped branch deleted
that committed, allowlist-protected directory on every smoke run.

Whether a dataset family is reachable by the stamp is decided per repository by
that repo's `.gitignore`, never by the family name. Says so, and points at the
PyAutoHands guard (PyAutoHands#252) that enforces what a docstring cannot.

Docstring only — no behaviour change.

Refs #470

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01F11sMzmaVWfU6NCz1PKVVb
@Jammy2211
Jammy2211 merged commit f50d28c into main Aug 22, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the feature/dataset-allowlist-small-datasets-guard branch August 22, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant