fix: honor .gitignore for dataset/ staging in pre_build (drop -f) [#126 leg 1]#150
Merged
Merged
Conversation
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
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PyAutoBuild#126 legs 1 & 4 — stop the simulated-dataset leak, and guard against recurrence
Leg 1 — stop the leak.
pre_build.shstageddataset/withgit add -f,force-overriding each workspace's
.gitignoreand committing simulated datasetsmeant to be generated at runtime. Drop the
-fso only allowlisted real datacan be staged.
Leg 4 — guard against recurrence. New
autobuild/check_dataset_allowlist.py,wired into
pre_build.shbefore staging: asserts every trackeddataset/file iscovered by that workspace's
.gitignore!dataset/...allowlist, and aborts therelease loudly otherwise. Allowlist-based (not
git check-ignore, which can't seetracked 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_halosdir (real.npycatalogue + 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
🤖 Generated with Claude Code
https://claude.ai/code/session_016CFXggMj2qQz31hWfh1R8M