Repository navigation
cortex: pass each project's declared output roots to its own pull - #373
Merged
Merged
Conversation
Each science project's hpc/sync hard-codes PULL_DIRS, so a run written to a custom PYAUTO_OUTPUT_DIR is never fetched by `pull` or `pull-full`. On 2026-09-09, 173MB of euclid_dr1_prelim ordered-MGE results sat unpulled on RAL and the check-in reported those tasks as FAILED. Cortex now derives the output* roots a project's tasks declare in their "## Where to look" bullets (reusing _path_tokens() from #371) and passes them via the PYAUTO_PULL_DIRS environment variable, extending the override convention hpc/sync.conf.example already documents for HPC_HOST/HPC_BASE/ PROJECT_NAME. Only output*-shaped roots are ever offered — a pull rsyncs remote -> local, so passing results/, wiki/ or scripts/ would overwrite local source with the cluster's copy. Refs #372. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FKSwTBuNwcJc2FPNpSCrkp
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
Each science project's
hpc/synchard-codesPULL_DIRS, and bothpullandpull-fulliterate that same array — so a run written to a customPYAUTO_OUTPUT_DIRis never fetched. On 2026-09-09, 173 MB ofeuclid_dr1_prelimordered-MGE results sat unpulled on RAL and the Cortexcheck-in reported those tasks as FAILED.
The fix
Cortex now derives the
output*roots a project's tasks declare in their## Where to lookbullets — reusing_path_tokens()from #371 — and passesthem to that project's own
hpc/sync pullvia thePYAUTO_PULL_DIRSenvironment variable. This extends the override convention
hpc/sync.conf.examplealready documents forHPC_HOST/HPC_BASE/PROJECT_NAME. Each science script appends the roots to its ownPULL_DIRS(companion PRs: euclid_strong_lens_modeling_pipeline, subhalo_validation,
slope_hierarchy_scale). An unset variable reproduces today's pull exactly, and
pull-fullinherits the change for free because it iterates the same array.Why only
output*A pull rsyncs remote → local. Real tasks name
results/,wiki/…andscripts/…in the same## Where to lookbullets as their output roots —passing those through would overwrite local source with the cluster's copy.
declared_output_roots()only ever matchesoutput*-shaped path heads, andtest_only_output_shaped_roots_are_ever_offered_to_a_pullasserts exactlythat guard against a bullet block naming all four kinds of path in one place.
Evidence
PyAutoBrain/tests/suite: 943 passed, 1 failed in 3:22. The onefailure (
test_a_fixture_tree_finds_the_schema_its_checkout_ships) is aknown pre-existing worktree/symlink trap that passes in the canonical
checkout and in CI — not touched by this change.
test_only_output_shaped_roots_are_ever_offered_to_a_pull,test_the_roots_of_a_projects_tasks_are_pooled_and_deduped,test_a_project_declaring_no_extra_root_pulls_exactly_as_before,test_the_declared_roots_reach_the_pull_as_an_environment_assignment.bash -npasses on all three editedhpc/syncscripts.PYAUTO_PULL_DIRSreproduces today's list exactly; extra roots append; an already-present
root is not duplicated.
euclid_dr1_prelim): without the seam thepull enumerated
output/,output_sed/(absent) andinspect/(absent),and never mentioned
output_ordered_witness/. WithPYAUTO_PULL_DIRS=output_ordered_witnessit listedoutput_ordered_witness/and did not report it missing. A direct
rsync --dry-run --statsshows thatroot holds 115 files (90 regular, 25 dirs), 173,465,562 bytes on RAL.
Heart readiness is RED on five organism-scope reasons unrelated to this
change; the human has acknowledged them in-session for this task (recorded in
PyAutoMind/active.md). Nothing in this PR is in the release chain.Closes #372.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FKSwTBuNwcJc2FPNpSCrkp