Skip to content

fix: honor .gitignore for dataset/ staging in pre_build (drop -f) [#126 leg 1]#150

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/release-ships-simulated-datasets
Jul 13, 2026
Merged

fix: honor .gitignore for dataset/ staging in pre_build (drop -f) [#126 leg 1]#150
Jammy2211 merged 2 commits into
mainfrom
feature/release-ships-simulated-datasets

Conversation

@Jammy2211

@Jammy2211 Jammy2211 commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

PyAutoBuild#126 legs 1 & 4 — stop the simulated-dataset leak, and guard against recurrence

Leg 1 — stop the leak. pre_build.sh staged dataset/ with git add -f,
force-overriding each workspace's .gitignore and committing simulated datasets
meant to be generated at runtime. Drop the -f so only allowlisted real data
can be staged.

Leg 4 — guard against recurrence. New autobuild/check_dataset_allowlist.py,
wired into pre_build.sh before staging: asserts every tracked dataset/ file is
covered by that workspace's .gitignore !dataset/... allowlist, and aborts the
release loudly otherwise. Allowlist-based (not git check-ignore, which can't see
tracked files); allowlist-presence-gated, so bare-dataset/ Group-B repos
(autofit_workspace, HowTo*) skip with a notice until they adopt the regime.

The guard already earned its keep — it caught a mixed los_halos dir (real .npy
catalogue + simulated .fits) that the manual audit missed.

Companion workspace purge PRs: autolens_workspace#272, autogalaxy_workspace#129
(both smoke-green, both now pass this guard). Group B is a separate prompt.

Gate

  • tests: n/a (shell + stdlib script; guard self-tested against both workspaces + Group-B skip)
  • smoke: n/a (pipeline); downstream workspaces smoke-green (autolens 9/9, autogalaxy 8/8)
  • review: pending
  • heart: pending

🤖 Generated with Claude Code

https://claude.ai/code/session_016CFXggMj2qQz31hWfh1R8M

pre_build.sh force-staged dataset/ with `git add -f`, overriding each
workspace's .gitignore allowlist and force-committing simulated datasets
that are meant to be generated at runtime via should_simulate(). Drop the
-f so only allowlisted real data can be staged; already-tracked real data
stays tracked. Leg 1 of PyAutoBuild#126.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CFXggMj2qQz31hWfh1R8M
@Jammy2211 Jammy2211 added the pending-release Merged PR awaiting inclusion in the next release build label Jul 13, 2026
Asserts tracked dataset/ files are all covered by the workspace .gitignore
allowlist, so a future git-add-f leak fails the release loudly instead of
shipping runtime-generated data. Allowlist-based (git check-ignore can't see
tracked files); allowlist-presence-gated so bare-dataset Group B repos skip
with a notice until they adopt the regime.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CFXggMj2qQz31hWfh1R8M
@Jammy2211
Jammy2211 merged commit a9b2d29 into main Jul 13, 2026
@Jammy2211
Jammy2211 deleted the feature/release-ships-simulated-datasets branch July 13, 2026 13:43
Jammy2211 added a commit that referenced this pull request Jul 15, 2026
…154)

`git add dataset/` exits non-zero when every path it matches is ignored,
and pre_build.sh runs under `set -e`, so the first workspace with a wholly
ignored dataset/ killed the release before anything was dispatched.

7 of 11 release workspaces ignore dataset/ outright (autofit_workspace, the
three *_workspace_test repos, and the three HowTo repos), so this aborted on
the very first repo processed. Staging nothing is the correct outcome there.

Latent since #150 dropped the `git add -f` (correctly — the -f was force-
committing simulated datasets, #126). The live path has not run since: the
2026.7.9.1 release predates #150, and the nightly driver has stopped at
Stage 4 validation every night since, so this is the first execution of the
step post-#150.

Only the failure path changes: where `git add dataset/` already succeeded
(autolens_workspace's 13 allowlisted real datasets, autogalaxy_workspace's 5)
the command is unchanged and real observational data still stages.

Co-authored-by: Jammy2211 <JNightingale2211@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release Merged PR awaiting inclusion in the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant