Skip to content

refactor: move results/ into the mirrored tree (#442 PR 2) - #447

Merged
Jammy2211 merged 6 commits into
mainfrom
feature/likelihood-lifecycle-p0-profiling-move-v2
Oct 24, 2026
Merged

Jammy2211 merged 6 commits into
mainfrom
feature/likelihood-lifecycle-p0-profiling-move-v2

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

PR 2 of 6 for #442 (likelihood-lifecycle 0B): applies the day-zero migration map merged in #444.

Supersedes draft #446: the same change rebuilt on main after #441 merged (c8c0d32). There are no live RAL jobs on a RAL checkout of this repo; the only running job, checked 2026-10-23, belongs to autolens_inference.

Commits, reviewable separately

  1. c7a236ae — map regenerated after docs(cluster): record the human decision — keep the 1.0″ starting grid (#439) #441. The diff is 3 lines: source_commit and the sha256 of the two files docs(cluster): record the human decision — keep the 1.0″ starting grid (#439) #441 edited. Paths, counts and the 23 unresolved rows are unchanged.
  2. aaf4a00e — renames only. 1,384 git mv, every one R100. The 23 unresolved rows stay where they are; they are the map's unresolved array (8 files under results/breakdown/{cluster,datacube}, 15 under results/runtime/{datacube,interferometer,imaging}).
  3. 3b26992f — docs and applier.
    • scripts/misc/tooling/apply_migration_map.py: --apply checks each file's sha and is safe to re-run; --rewrite-refs is idempotent.
    • results/README.md gets the layout description and an old → new redirect table.
    • A pointer README goes in each of the 14 emptied old folders, plus archive/README.md.
  4. 24caaeb2 — path adaptation, code and config only.
    • Readers and gates: a new results_layout.py lets readers see each moved file under its old path while linking to where it lives now. build_catalogue (which now also reads archive/**), build_dashboard, build_readme, check_wiki, check_results_layout and list_timing_assertions use it.
    • Writers: _profile_cli.resolve_output_paths writes default-folder runs into the mirrored cell, using the generator's own destination(). When no cell can be derived it falls back to results/misc/<group>/ with a printed note.
    • Indexes: provenance_grandfathered.txt, the registry references and evidence paths, and wiki_bindings.json.
    • Docs: links rewritten from the map.
    • Tests: new test_results_mirror_scripts.py (the phase-0 mirror witness) and test_apply_migration_map.py.

Data guard

  • No results/ or archive/ data file changed bytes.
  • Ledgers moved into wiki/campaigns/ show R88–R99 only because their links were rewritten.
  • dashboard/ and wiki/setups/ were regenerated: compared against main after swapping old paths for new, only path strings and the path-derived shard sha256 values differ.
  • Record and setup ids are unchanged, and the output is still profiling-summary@2 (the move to @3 is PR 3).

Writers not adapted yet (PR 3)

These still write the old layout:

  • Anything given an explicit --output-dir: sweep.py → aggregate.py, build_baseline.py, and the HPC submits that set RESULTS_DIR=…/results/breakdown/….
  • Scripts that build their own paths: the point_source_image runtime scripts, cluster/oracle_figure.py, and the fixed_light_numba_*_witness.py scripts.
  • Flat-folder aggregators: size_sweep_table.py, fixed_light_scaling_table.py and nnls_iterations_matrix.py. hazards/aggregate.py too: 3 of its inputs are archived, so a re-run would drop them.

#441 conflict

wiki/campaigns/cluster/image_plane/cluster_pointsolver.md was resolved by keeping #441's text at the new path and rerunning --rewrite-refs, so the only changes are link rewrites. The ledger merged cleanly. The registry hash is unchanged (967ce77c…).

Review asks

  1. Registry hash re-pin. baseline/campaign.json (still a draft) pins the sha of catalogue/registry.json, which changed (new paths plus the archive glob). It was re-pinned when this branch was first built, and the hash is unchanged after the docs(cluster): record the human decision — keep the 1.0″ starting grid (#439) #441 rebuild; please confirm the pin.
  2. Temporary reader shim. results_layout.py stays until PR 3. Until then, runs written into the mirrored tree appear on the catalogue and dashboard only weakly.

Checks

  • ruff check and ruff format --check: clean.
  • Every --check step in lint.yml passes: build_readme, build_catalogue --validate-with ../PyAutoPulse, check_wiki, build_dashboard, check_results_layout, check_submits and list_timing_assertions.
  • pytest: 1503 passed, 6 skipped (main: 1489 passed, 6 skipped).
  • Smoke run of 4 scripts: exit 0.

Tier: judge, so this merges through human /prm.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HhogiUPH3y6uuAVz17P89B

Jammy2211 and others added 4 commits October 23, 2026 22:52
Only the sha256 of the two ledgers #441 edited and the header source_commit change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HhogiUPH3y6uuAVz17P89B
git mv every entry of catalogue/migration_day_zero.json whose new path
differs from its old one (1,384 files): mirrored cells, history/scans/
experiments, results/lens/<component>, results/misc/<group>, archive/
and results/notes ledgers -> wiki/campaigns/<dataset_type>/<variant>/.
The 23 unresolved rows (setup axis not recorded) stay where they are.
No file content changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HhogiUPH3y6uuAVz17P89B
…PR 2)

- scripts/misc/tooling/apply_migration_map.py: the re-runnable applier that
  made the previous commit (--apply: sha-checked git mv of every map entry;
  --rewrite-refs: map-driven reference rewrite, used by the next commit).
- results/README.md: the mirrored layout and the old-prefix -> new-location
  redirect table.
- A pointer README in each emptied results/ top-level folder (runtime/ and
  breakdown/ keep the 23 unresolved rows), and archive/README.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HhogiUPH3y6uuAVz17P89B
…PR 2)

Path adaptation only; no result file changes bytes and the catalogue keeps
profiling-summary@2 (the @3 builder is PR 3).

- results_layout.py: readers see a moved file under its pre-move identity
  (iter_legacy / legacy_glob / current, from the day-zero map) and link it
  where it lives now. build_catalogue (+ archive/**/*.json source),
  build_dashboard, build_readme, check_wiki (ledgers under wiki/campaigns),
  check_results_layout (ledger trees, results/ + archive/),
  list_timing_assertions and the committed-row tests read through it.
  Generated dashboard/ and wiki/setups/ change in path strings only (and the
  shard digests that hash them); setup and record ids are unchanged.
- Writers: _profile_cli.resolve_output_paths places a run whose default folder
  is results/runtime|breakdown in its mirrored cell with the map generator's
  own classification (build_migration_map.destination, facts_from_doc), using
  the result dict as hints at 52 call sites; an explicit --output-dir is
  honoured verbatim. Misc-group writers point at results/misc/<group>/.
- Indexes (map-driven): provenance_grandfathered.txt, registry.json references
  and evidence paths, wiki_bindings.json; baseline/campaign.json re-pins the
  draft inventory hash of the changed registry.
- Docs: apply_migration_map.py --rewrite-refs repoints every literal old path
  and relative markdown link (wiki/, READMEs, hpc/ comments); four links that
  were already broken in the moved ledgers fixed by hand.
- Tests: test_results_mirror_scripts.py (results variants are a subset of
  scripts variants; script-only variants reported), test_apply_migration_map.py,
  nested-ledger check_wiki case, archive provenance case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HhogiUPH3y6uuAVz17P89B
Jammy2211 and others added 2 commits October 23, 2026 23:23
Archived research notes keep their bytes; newer ruff formats Python code
blocks inside markdown, which flagged a moved note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HhogiUPH3y6uuAVz17P89B
Archived notes keep their exact contents, so their relative links can point
at files that have since moved; skip archive/ as results/ and dataset/ are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SeDHwsR2dnwCk8Btfhej2L
@Jammy2211
Jammy2211 merged commit 0c6be19 into main Oct 24, 2026
1 check passed
@Jammy2211
Jammy2211 deleted the feature/likelihood-lifecycle-p0-profiling-move-v2 branch October 24, 2026 10:02
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