From 5d9b951a4e76d821be2b5576bf57dbb8ae14c7a5 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Thu, 16 Jul 2026 11:25:54 +0100 Subject: [PATCH] Delete pre_build's two dead failure-tolerant sites (#156 step 1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per the audit merged in #157 (docs/pre_build_failure_audit.md): the root-glob staging line was a measured no-op in all 13 repos (unmatched globs poison the whole pathspec, exit 128 swallowed by || true), and the README version bump's sed output was never staged while the runner-side bump was removed under #120 — the banner printed a false claim on every release. Both sites deleted along with the unused readme_pkg parameter and its 13 call-site args; skill doc and internals.md synced (including the stale pre-#150 "git add -f dataset" claim). Behaviour on main unchanged by construction: neither site produced anything that ever landed. README-pin ownership moves to campaign Phase 4 (#155). Co-Authored-By: Claude Fable 5 --- docs/internals.md | 4 +-- pre_build.sh | 49 ++++++++++++++++------------------- skills/pre_build/pre_build.md | 4 +-- 3 files changed, 27 insertions(+), 30 deletions(-) diff --git a/docs/internals.md b/docs/internals.md index b03ca5c..9062f68 100644 --- a/docs/internals.md +++ b/docs/internals.md @@ -67,12 +67,12 @@ Each workspace repo (`autofit_workspace`, `autogalaxy_workspace`, `autolens_work | Folder / file | autofit | autogalaxy | autolens | Notes | |---|---|---|---|---| | `config/` | yes | yes | yes | PyAutoConf config files | -| `dataset/` | yes | yes | yes | Input data; force-added with `git add -f` | +| `dataset/` | yes | yes | yes | Allowlisted real observational data only; simulated datasets are never committed (#126/#150) | | `notebooks/` | yes | yes | yes | Generated from `scripts/` by `generate.py` | | `scripts/` | yes | yes | yes | Source Python scripts | | `slam_pipeline/` | no | no | yes | autolens only | | `output/` | — | — | — | **Always empty** — kept under git with a `.gitignore` only | -| Root-level files | yes | yes | yes | `README.md`, `setup.py`, `pyproject.toml`, `requirements.txt`, `*.cfg`, `*.ini`, `*.yml`, `*.yaml`, `LICENSE*` | +| Root-level files | yes | yes | yes | `README.md`, `llms-full.txt`, `workspace_index.json`, `requirements.txt`, `LICENSE*` — committed by `release.yml` on the runner, not by `pre_build.sh` (#156) | ### Paths that must NEVER be committed diff --git a/pre_build.sh b/pre_build.sh index 500411b..330b6a6 100644 --- a/pre_build.sh +++ b/pre_build.sh @@ -38,7 +38,6 @@ run_workspace() { local project="$2" local generate="${3:-true}" local slam="${4:-false}" - local readme_pkg="${5:-}" local dir="$PYAUTOBASE/$repo" echo "" @@ -49,12 +48,6 @@ run_workspace() { echo " Running black..." black . - if [ -n "$readme_pkg" ]; then - echo " Bumping README version → $readme_pkg v$VERSION..." - sed -i "s/$readme_pkg v[0-9]\{4\}\.[0-9]*\.[0-9]*\.[0-9]*/$readme_pkg v$VERSION/g" \ - README.rst README.md 2>/dev/null || true - fi - if [ "$generate" = "true" ]; then echo " Running generate.py ($project)..." PYTHONPATH="$PYTHONPATH_EXTRA" python "$AUTOBUILD/generate.py" "$project" @@ -84,8 +77,10 @@ run_workspace() { if [ "$slam" = "true" ] && [ -d "slam_pipeline" ]; then git add slam_pipeline/ fi - # Stage root-level recognised files only (no output/, output_model/, or stray .fits) - git add -- *.py *.md *.txt *.cfg *.ini *.toml *.yml *.yaml LICENSE* requirements* setup* 2>/dev/null || true + # Root-level artifacts (llms-full.txt, workspace_index.json, README Colab + # URLs) are produced and committed by release.yml's release_workspaces job + # on the runner — pre_build deliberately does not stage root files. The + # former glob line here was a measured no-op in all 13 repos (#156). echo " Committing and pushing..." if git diff --cached --quiet; then @@ -96,27 +91,29 @@ run_workspace() { fi } -# Positional args: repo project [generate=true] [slam=false] [readme_pkg=""] -# readme_pkg: when non-empty, the README's " vYYYY.M.D.B" pin is bumped to -# the new VERSION. Empty for workspaces with no README version pin. +# Positional args: repo project [generate=true] [slam=false] # The repo names are checked against PyAutoMind/repos.yaml (the body map) by # `repos_sync.py --check`; the flags are Build policy and live only here. -run_workspace "autofit_workspace" "autofit" true false PyAutoFit -run_workspace "autogalaxy_workspace" "autogalaxy" true false PyAutoGalaxy -run_workspace "autolens_workspace" "autolens" true true PyAutoLens -run_workspace "autofit_workspace_test" "autofit" false false PyAutoFit -run_workspace "autogalaxy_workspace_test" "autogalaxy" false false PyAutoGalaxy -run_workspace "autolens_workspace_test" "autolens" false false PyAutoLens -run_workspace "euclid_strong_lens_modeling_pipeline" "" false false "" -run_workspace "HowToGalaxy" "howtogalaxy" true false PyAutoGalaxy -run_workspace "HowToLens" "howtolens" true false PyAutoLens -run_workspace "HowToFit" "howtofit" true false PyAutoFit -run_workspace "autofit_workspace_developer" "" false false "" -run_workspace "autolens_workspace_developer" "" false false "" -# The AI assistant repo. No notebook generation or README pin; release.yml's +# (The former readme_pkg arg / README version bump was deleted per the audit in +# docs/pre_build_failure_audit.md: its sed edit was never staged, the runner +# side was removed under #120, and the pins it targeted are owned by Phase 4 of +# the build-chain campaign — PyAutoBuild#155/#156.) +run_workspace "autofit_workspace" "autofit" true false +run_workspace "autogalaxy_workspace" "autogalaxy" true false +run_workspace "autolens_workspace" "autolens" true true +run_workspace "autofit_workspace_test" "autofit" false false +run_workspace "autogalaxy_workspace_test" "autogalaxy" false false +run_workspace "autolens_workspace_test" "autolens" false false +run_workspace "euclid_strong_lens_modeling_pipeline" "" false false +run_workspace "HowToGalaxy" "howtogalaxy" true false +run_workspace "HowToLens" "howtolens" true false +run_workspace "HowToFit" "howtofit" true false +run_workspace "autofit_workspace_developer" "" false false +run_workspace "autolens_workspace_developer" "" false false +# The AI assistant repo. No notebook generation; release.yml's # release_workspaces job stamps its workspace version and regenerates # wiki/core/api_audit_baseline.json against the released wheels. -run_workspace "autolens_assistant" "autolens" false false "" +run_workspace "autolens_assistant" "autolens" false false # Commit and push PyAutoBuild itself echo "" diff --git a/skills/pre_build/pre_build.md b/skills/pre_build/pre_build.md index 90e9c2b..1adc36b 100644 --- a/skills/pre_build/pre_build.md +++ b/skills/pre_build/pre_build.md @@ -55,7 +55,7 @@ bash $HOME/Code/PyAutoLabs/PyAutoBuild/bin/autobuild pre_build The script handles every mechanical step of the pre-build flow: 1. Ensures the canonical `pending-release` label exists on each release-window repo. -2. For every workspace, runs `black .`, bumps the README version pin (` vYYYY.M.D.`) where applicable, runs `generate.py` for projects with a notebook target, and stages only the safe directories (`config/`, `notebooks/`, `scripts/`, `dataset/`, plus `slam_pipeline/` for `autolens_workspace`). +2. For every workspace, runs `black .`, runs `generate.py` for projects with a notebook target, and stages only the safe directories (`config/`, `notebooks/`, `scripts/`, `dataset/`, plus `slam_pipeline/` for `autolens_workspace`). Root-level artifacts and README Colab URLs are committed by `release.yml` on the runner, not here. 3. Commits and pushes each workspace (skipping if no changes are staged). 4. Commits and pushes PyAutoBuild itself. 5. Dispatches `gh workflow run release.yml --repo PyAutoLabs/PyAutoBuild --field minor_version=`. @@ -89,4 +89,4 @@ The release workflow is now running. Use the `review-release` skill ## Notes - The same operation is callable from the shell as `autobuild pre_build ` (or `autobuild-help pre_build` for documentation). Use this skill when you want the agent validation and summary wrapper; use the bash CLI when you just want to fire off the build. -- README version-bump is now handled inside `pre_build.sh` (it used to live only in this skill). +- There is no README version-bump step: the audit (`docs/pre_build_failure_audit.md`, #156) found the old local sed's output was never staged and the runner-side step was removed under #120 — README pin ownership is a Phase 4 decision of the build-chain campaign (#155).