fix(pre_build): a fully-ignored dataset/ must not abort the release#154
Merged
Conversation
`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: 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.
The bug
pre_build.shruns underset -e. Line 75 was:git add dataset/exits non-zero when every path it matches is ignored(
The following paths are ignored by one of your .gitignore files: dataset).Under
set -ethat aborted the release on the first workspace processed(
autofit_workspace), before anything was committed, pushed or dispatched.Why it went unnoticed
Latent since #150, which dropped the
git add -f— correctly, since the-fwas force-committing simulated datasets meant to be generated at runtime (#126).
But it left the fully-ignored case unhandled.
The live path has not executed since:
2026.7.9.1release (2026-07-09) predates fix: honor .gitignore for dataset/ staging in pre_build (drop -f) [#126 leg 1] #150 (merged 2026-07-13);So this is the first time the step has run post-#150.
Blast radius — 7 of 11 release workspaces
Measured with
git add -n dataset/in each repo:.gitignoredataset/dataset/dataset/dataset/dataset/dataset/**+ 13!allowlistdataset/**+ 5!allowlistThe fix
Tolerate the fully-ignored case; staging nothing is the correct outcome there.
Only the failure path changes. Where
git add dataset/already succeeded,the command is byte-identical, so autolens_workspace's 13 allowlisted real
datasets and autogalaxy_workspace's 5 still stage exactly as before. #150's
leak fix is preserved — no
-fis reintroduced.Found by a human-authorized manual
release --forcefor 2026.7.15.1, which isblocked on this.
🤖 Generated with Claude Code