Skip to content

fix(pre_build): a fully-ignored dataset/ must not abort the release#154

Merged
Jammy2211 merged 1 commit into
mainfrom
fix/pre-build-dataset-staging-abort
Jul 15, 2026
Merged

fix(pre_build): a fully-ignored dataset/ must not abort the release#154
Jammy2211 merged 1 commit into
mainfrom
fix/pre-build-dataset-staging-abort

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

The bug

pre_build.sh runs under set -e. Line 75 was:

[ -d dataset ] && git add dataset/

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 -e that 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 -f
was 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:

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:

Workspace .gitignore old new
autofit_workspace dataset/ exit 1 exit 0
autofit_workspace_test dataset/ exit 1 exit 0
autogalaxy_workspace_test dataset/ exit 1 exit 0
autolens_workspace_test dataset/ exit 1 exit 0
HowToFit / HowToGalaxy / HowToLens dataset/ exit 1 exit 0
autolens_workspace dataset/** + 13 ! allowlist exit 0 exit 0
autogalaxy_workspace dataset/** + 5 ! allowlist exit 0 exit 0
euclid_…_pipeline, autolens_assistant n/a exit 0 exit 0

The 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 -f is reintroduced.

Found by a human-authorized manual release --force for 2026.7.15.1, which is
blocked on this.

🤖 Generated with Claude Code

`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>
@Jammy2211
Jammy2211 merged commit fc34df7 into main Jul 15, 2026
@Jammy2211
Jammy2211 deleted the fix/pre-build-dataset-staging-abort branch July 15, 2026 10:51
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