You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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_workspace lists 3 paths (howtofit/chapter_1_introduction/gaussian.py, profiles.py x2) that exist in no repo — the howtofit content moved to HowToFit/, and they are not there either. autolens_workspace lists imaging/advanced/chaining/hyper_mode/extensions.py; no hyper_mode directory 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 — and BSc_Galaxies_Project is not even in the workspace.
is_copy_file() is therefore unconditionally False.
Zero output artifacts. No .py file exists in any notebooks/ tree across all 9 build targets (the 6 workspaces + HowToFit/HowToGalaxy/HowToLens). Since generate.pyrmtrees notebooks/ and rebuilds it, and copy-as-is is the only path that writes a .py there, 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 of generate.py. Every remaining hit is a comment, a test, a doc, or a historical PyAutoMind record.
The HowTo* repos have config/build/ but no copy_files.yaml, so they take the fallback branch — which yields []. The fallback branch, its precedence test, and the "not yet migrated" note in bin/autobuild all 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.
Prove behaviour-preservation empirically by diffing generated notebooks/ trees before and after, rather than assuming the removed branch was never taken.
autobuild/generate.py:142-164 — collapse the if 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 the copy_files.yaml rationale from help_generate. Keep the project argument and re-justify it via build_util.inject_colab_setup.
docs/internals.md:175,178 — drop the copy_files.yaml bullet and its mention in the fallback paragraph.
tests/test_workspace_config_precedence.py — delete test_copy_files_workspace_wins and test_copy_files_falls_back_to_autobuild_keyed; drop "copy_files.yaml" from the tuple in test_actual_workspace_files_exist; add a copy_files.yaml assertion to test_dead_autobuild_files_removed.
PR 2 — the 6 workspaces (opened after PR 1 merges)
Delete config/build/copy_files.yaml from autofit_workspace, autogalaxy_workspace, autolens_workspace, autofit_workspace_test, autogalaxy_workspace_test, autolens_workspace_test.
Verification
pytest tests/test_workspace_config_precedence.py green in PyAutoHands.
Behaviour-preservation proof: run autobuild generate autofit in autofit_workspace on main, snapshot the notebooks/ 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 branch
PyAutoHands/autobuild/config/copy_files.yaml — the all-null fallback keyed dict
Keep the <project> argument to autobuild generate — its help text justifies it via copy_files.yaml, but project is genuinely still used by build_util.inject_colab_setup.
copy_to_notebooks() stays — the normal conversion path and the .rst/.md sweeps 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.)
Overview
copy_files.yamllists script paths that the notebook build copies verbatim intonotebooks/instead of converting to.ipynb. The mechanism is wired intoPyAutoHands/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 unconditionallyFalse, and it has produced zero output in any current build. This task removes the feature outright, mirroring the earlier removals ofnotebooks_remove.yamland the autobuild-levelenv_vars.yaml.Run mode:
--auto, effective autonomysupervised(min(header supervised, refactor cap safe)). Merge and issue-close remain human acts.Evidence that it is dead
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..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.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.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
copy_to_notebooks()and the<project>CLI arg — both are still load-bearing elsewhere.spawn.pyhalf until PyAutoMind PR release.yml: skip PyAutoFit NSS tests in release_test_pypi pytest #93 clears the repo claim.notebooks/trees before and after, rather than assuming the removed branch was never taken.Detailed implementation plan
Affected Repositories
Branch Survey
dataset.fits(pre-existing, unrelated — not touched)dataset/point_source/*(pre-existing, unrelated — not touched)Suggested branch:
feature/remove-dead-copy-filesImplementation 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.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)
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.autobuild generate autofitinautofit_workspaceonmain, snapshot thenotebooks/tree (find … | sort | sha256sum), repeat on the branch, diff. Must be byte-identical.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— deletedGuardrails
<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.PyAutoMind/complete/**records untouched — historical ledger; several record the original seeding of these configs.Deferred follow-up (PyAutoMind)
scripts/spawn.py:523emitsautoproject_workspace/config/build/copy_files.yamlinto every spawned workspace, anddocs/pyautobrain/spawn_spec.md:76specifies it. Both must go, but PyAutoMind is currently claimed by taskarxiv-digest-strong-lensing-term(branchfeature/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_fileis module-local togenerate.pyand its branch is provably never taken. Structured instead as the standard library-first 2-PR split.Original Prompt
Click to expand starting prompt
("B" = full removal of the feature, as opposed to "A" = purging only the stale entries while keeping the mechanism.)