Repository navigation
Description
Overview
copy_files.yaml lists script paths that the notebook build copies verbatim into notebooks/ instead of converting to .ipynb. The mechanism is wired into PyAutoHands/autobuild/generate.py, but a deep dive on 2026-07-23 established it is completely dead organism-wide — every config entry is stale or empty, is_copy_file() is unconditionally False, and it has produced zero output in any current build. This task removes the feature outright, mirroring the earlier removals of notebooks_remove.yaml and the autobuild-level env_vars.yaml.
Run mode: --auto, effective autonomy supervised (min(header supervised, refactor cap safe)). Merge and issue-close remain human acts.
Evidence that it is dead
- Every config entry is stale or empty.
autofit_workspacelists 3 paths (howtofit/chapter_1_introduction/gaussian.py,profiles.pyx2) that exist in no repo — the howtofit content moved toHowToFit/, and they are not there either.autolens_workspacelistsimaging/advanced/chaining/hyper_mode/extensions.py; nohyper_modedirectory exists at all. The other four workspace files are[]. The PyAutoHands fallback keyed dict has 4 keys (howtogalaxy,howtolens,howtofit,BSc_Galaxies_Project), all null — andBSc_Galaxies_Projectis not even in the workspace. is_copy_file()is therefore unconditionallyFalse.- Zero output artifacts. No
.pyfile exists in anynotebooks/tree across all 9 build targets (the 6 workspaces + HowToFit/HowToGalaxy/HowToLens). Sincegenerate.pyrmtreesnotebooks/and rebuilds it, and copy-as-is is the only path that writes a.pythere, this proves the feature produced nothing in any current build. - No consumer outside
generate.py. An exhaustive grep across all repos and file types (incl..yml/.sh/.toml) found no CI workflow, release pipeline, packaging manifest, or second copy ofgenerate.py. Every remaining hit is a comment, a test, a doc, or a historical PyAutoMind record. - The HowTo* repos have
config/build/but nocopy_files.yaml, so they take the fallback branch — which yields[]. The fallback branch, its precedence test, and the "not yet migrated" note inbin/autobuildall guard an empty dict.
Plan
- Delete the copy-as-is notebook-build feature outright; it is provably inert.
- Ship PyAutoHands first, the workspaces second, behind the library-first merge gate (2 PRs).
- Keep
copy_to_notebooks()and the<project>CLI arg — both are still load-bearing elsewhere. - Convert the existing dead-file guard test into the regression that keeps this deleted.
- Defer the PyAutoMind
spawn.pyhalf until PyAutoMind PR release.yml: skip PyAutoFit NSS tests in release_test_pypi pytest #93 clears the repo claim. - Prove behaviour-preservation empirically by diffing generated
notebooks/trees before and after, rather than assuming the removed branch was never taken.
Detailed implementation plan
Affected Repositories
- PyAutoHands (primary)
- PyAutoBrain (one doc line)
- autofit_workspace, autogalaxy_workspace, autolens_workspace
- autofit_workspace_test, autogalaxy_workspace_test, autolens_workspace_test
- PyAutoMind — deferred, see below
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./PyAutoHands | main | clean |
| ./PyAutoBrain | main | clean |
| ./autofit_workspace | main | clean |
| ./autogalaxy_workspace | main | clean |
| ./autolens_workspace | main | 1 untracked dataset.fits (pre-existing, unrelated — not touched) |
| ./autofit_workspace_test | main | clean |
| ./autogalaxy_workspace_test | main | clean |
| ./autolens_workspace_test | main | 2 modified dataset/point_source/* (pre-existing, unrelated — not touched) |
Suggested branch: feature/remove-dead-copy-files
Implementation Steps
PR 1 — PyAutoHands (+ 1 PyAutoBrain line)
autobuild/generate.py:36-45— delete thecopy_files.yamlloader block (the workspace-vs-fallback precedence logic).autobuild/generate.py:48-49— deleteis_copy_file().autobuild/generate.py:142-164— collapse theif is_copy_file(script_path): ... else: ...branch, keeping only the convert path, de-indented.- Delete
autobuild/config/copy_files.yaml. bin/autobuild:181-182— drop thecopy_files.yamlrationale fromhelp_generate. Keep theprojectargument and re-justify it viabuild_util.inject_colab_setup.docs/internals.md:175,178— drop thecopy_files.yamlbullet and its mention in the fallback paragraph.tests/test_workspace_config_precedence.py— deletetest_copy_files_workspace_winsandtest_copy_files_falls_back_to_autobuild_keyed; drop"copy_files.yaml"from the tuple intest_actual_workspace_files_exist; add acopy_files.yamlassertion totest_dead_autobuild_files_removed.PyAutoBrain/agents/conductors/build/BUILD_CAPABILITIES.md:49—{no_run,env_vars,copy_files,visualise_notebooks}->{no_run,env_vars,visualise_notebooks}.
PR 2 — the 6 workspaces (opened after PR 1 merges)
- Delete
config/build/copy_files.yamlfromautofit_workspace,autogalaxy_workspace,autolens_workspace,autofit_workspace_test,autogalaxy_workspace_test,autolens_workspace_test.
Verification
pytest tests/test_workspace_config_precedence.pygreen in PyAutoHands.- Behaviour-preservation proof: run
autobuild generate autofitinautofit_workspaceonmain, snapshot thenotebooks/tree (find … | sort | sha256sum), repeat on the branch, diff. Must be byte-identical. - Repeat the generate check for one HowTo repo (
howtofit), since those exercised the now-deleted fallback path.
Key Files
PyAutoHands/autobuild/generate.py— the sole consumer; loader +is_copy_file+ the dead branchPyAutoHands/autobuild/config/copy_files.yaml— the all-null fallback keyed dictPyAutoHands/tests/test_workspace_config_precedence.py— 2 tests deleted, 2 assertions adjustedPyAutoHands/bin/autobuild—help_generatetext onlyPyAutoHands/docs/internals.md— config-file documentation<6 workspaces>/config/build/copy_files.yaml— deleted
Guardrails
- Keep the
<project>argument toautobuild generate— its help text justifies it viacopy_files.yaml, butprojectis genuinely still used bybuild_util.inject_colab_setup. copy_to_notebooks()stays — the normal conversion path and the.rst/.mdsweeps both call it.- Leave
PyAutoMind/complete/**records untouched — historical ledger; several record the original seeding of these configs.
Deferred follow-up (PyAutoMind)
scripts/spawn.py:523 emits autoproject_workspace/config/build/copy_files.yaml into every spawned workspace, and docs/pyautobrain/spawn_spec.md:76 specifies it. Both must go, but PyAutoMind is currently claimed by task arxiv-digest-strong-lensing-term (branch feature/arxiv-digest-strong-lensing-term, PR #93 open). File as a small follow-up once #93 merges. Until then spawn keeps seeding a config nothing reads — harmless once the reader is gone.
Phasing note — Brain override
The Feature Agent scored this too-large (25) and proposed a 4-phase split (design / core-api / workspace / docs). Rejected by the user and by inspection: the score is driven by the 9-repo count, not complexity — the change is ~13 lines removed from one file plus 7 deletions and 4 doc/test edits. The flagged "public-API ripple" risk does not apply: is_copy_file is module-local to generate.py and its branch is provably never taken. Structured instead as the standard library-first 2-PR split.
Original Prompt
Click to expand starting prompt
Check if the copy_files.yaml config/build file is actually used anywhere (it may be in autofit_workspace, but this may also be legacy) and if not remove it or consider if we can remove it somewhere.
Do B, but do one file deep dive to make sure its used nowhere
("B" = full removal of the feature, as opposed to "A" = purging only the stale entries while keeping the mechanism.)
Activity
Jammy2211 commentedon Jul 23, 2026
Scope expanded — the sweep found 2 siblings, one of them a live crash
Following a request to extend the sweep to the HowTo* and
_testworkspaces, I audited everyconfig/build/*.yamlacross all build targets. Two files sharecopy_files.yaml's legacy-fallback pattern and are being folded into this task.Correction to the plan above: there are 10 build targets, not 9.
autobuild/config/workspaces.yamlalso listseuclid->euclid_strong_lens_modeling_pipeline. It has nonotebooks/and nocopy_files.yaml, so it falls back to the keyed dict, resolvesNone or [], and stays inert — thecopy_filesconclusion is unchanged.Sibling A —
autobuild/config/visualise_notebooks.yamlcrashes--visualiseThe file is comment-only — it has no keys at all.
run.py:63-64doesyaml.safe_load(f).get(project), andsafe_loadof a comment-only file returnsNone. Reproduced against the real repo:autobuild run <target> --visualisetherefore crashes for the 4 targets with novisualise_notebooks.yamlof their own: HowToFit, HowToGalaxy, HowToLens, euclid. (copy_filesused.get(...) or []and survived; this call site omits theor []after the.get, so the husk file is what kills it.)Sibling B —
autobuild/config/no_run.yamlis an unreachable traprun.py:42-44reads the fallback only when the workspace file is missing — and all 10 targets have their ownconfig/build/no_run.yaml(HowToFit's is empty, but it exists). The fallback is never read, yet holds ~50 lines of stale duplicated skip rules forautofit/autogalaxy/autolens/autofit_test/howtolens. Editing it to skip a script silently does nothing. This is also the file behind the knowntest_parse_no_run_reasonsGetDistvsget_distmismatch.Revised scope
Delete all three fallbacks and their branches, making workspace-owned
config/build/the single source of truth:autobuild/config/copy_files.yamlautobuild/config/visualise_notebooks.yaml--visualiseautobuild/config/no_run.yamlautobuild/config/workspaces.yamlCode changes:
generate.pyloses thecopy_filesloader +is_copy_file+ its branch;run.pyloses theno_runfallback branch (and with it theisinstance(dict)keyed-dict path, since only flat lists remain) and thevisualisefallback branch.Behaviour after removal:
no_run.yaml— raise a clear, actionable error naming the workspace rather than falling back silently (all 10 targets have one, so this never fires today).visualise_notebooks.yaml— resolve to[]with an explanatory message instead ofAttributeError. This is what fixes the crash.Also folded in: the PyAutoMind piece
PyAutoMind PR #93 merged mid-run, releasing the repo claim that forced the deferral.
scripts/spawn.py:523(stops emittingcopy_files.yamlinto spawned workspaces) anddocs/pyautobrain/spawn_spec.md:76are back in scope for this task.Run mode remains
--autoat effective autonomysupervised; merge and issue-close stay human.Jammy2211 commentedon Jul 23, 2026
Shipped — 9 PRs open, awaiting merge
All work is implemented, verified and pushed. Merge and issue-close remain human acts (
--auto, effective autonomysupervised).Merge order — PyAutoHands#176 first
Wave 1 (library + docs)
spawn.pyseedsno_run.yamlinsteadWave 2 (workspace config deletions, after #176)
Verification
autofit_workspaceon the branch and diffed againstmain— byte-identical (39 files; only the config deletion shows ingit status). Repeated for HowToLens, a target that actually used the deleted fallback — also byte-identical.--visualisecrash reproduced onmain(AttributeError) and confirmed fixed (EXIT=0).ruffclean;yaml/os.path/CONFIG_PATH/AUTOBUILD_CONFIGremoved once unused.test_every_public_agent_has_a_skill_wrapper(missingsizingwrapper) — confirmed failing onmainbefore any edit here.Net effect
generate.py−46 lines,run.py+3, 60 lines of dead config deleted, 7 files removed.config/build/is now the single source of truth;autobuild/config/holds onlyworkspaces.yaml(build policy).Note for whoever merges
The new
test_copy_files_mechanism_fully_removedasserts no workspace still carries acopy_files.yaml. In PyAutoHands CI this passes trivially (sibling repos aren't checked out); in a full local checkout it stays red until the wave-2 PRs merge. That is the intended signal, not a regression.Jammy2211 commentedon Jul 23, 2026
All 9 PRs merged.
autobuild/config/now holds onlyworkspaces.yaml; each workspace'sconfig/build/is the single source of truth.no_run.yaml)Verified before merge: 132/132 tests;
autofit_workspaceandHowToLensboth regenerate byte-identicalnotebooks/trees vsmain; the--visualiseAttributeErroron HowToFit/HowToGalaxy/HowToLens/euclid is fixed.Closing.