Skip to content

chore: lifecycle follow-ups before phase 2 (point-source output path, cluster assert, coverage/guard tests) #454

Closed

Description

@Jammy2211

Overview

One PR with the follow-ups left by the phase 0B and 1B reviews and the two existing bugs #453 found, so phase 2 starts from a clean base. Plan approved in chat on 2026-10-24.

Plan

  • Point-source runtime scripts honour --output-path (through resolve_output_paths).
  • Diagnose the cluster source-plane decomposition assert. Fix it in the script if the decomposition is stale; file a separate library bug prompt if PyAutoLens is wrong.
  • Coverage matrix: exclude parity from current_records_unplanned.
  • catalogue_lifecycle reads catalogue/provisional_designations.json (one copy of §3.3).
  • Write guard: catch a results root passed as a default argument.
  • AST test: every sweep-driven leaf calls record_pinned_check after its last row write.

Tier: judge — merge mode: human /prm

Detailed implementation plan

Affected Repositories

  • autolens_profiling (primary)

Suggested branch: feature/likelihood-lifecycle-p1-followups (from main after #453 merges)

Steps 1–6 as in the prompt below. Tests for each item; every lint --check step, full pytest, smoke.

Original Prompt

Click to expand starting prompt

Likelihood lifecycle follow-ups after phases 0B and 1B: point-source --output-path, cluster source-plane assert, coverage/parity, single §3.3 source, guard default-arg roots, pinned-check order test

Type: feature
Target: autolens_profiling
Repos:

  • autolens_profiling
    Themes:
  • profiling
    Difficulty: medium
    Autonomy: supervised
    Priority: high
    Status: formalised
    Consequence: judge
    Witness: the point_source image/source runtime scripts write to --output-path when given; cluster/source_plane/likelihood_breakdown.py passes its decomposition assert on a freshly simulated dataset (or a library bug prompt is filed and the script is unchanged); coverage_matrix excludes parity from current_records_unplanned; catalogue_lifecycle reads catalogue/provisional_designations.json; the write guard catches a results root passed as a default argument; an AST test asserts every sweep-driven leaf calls record_pinned_check after its last row write; every lint --check step passes
    Review-minutes: 20
    Unattended: never
    Epic: likelihood-lifecycle
    Phase: 1
    Parent: draft/research/autolens_profiling/likelihood_lifecycle_epic.md
    Filed: 2026-10-24

Human request 2026-10-24: "prm, then do all still to do in one go, then we start phase 2". Plan approved in chat (A + B).

What (one PR)

  1. scripts/point_source_image/image_plane/likelihood_runtime.py and scripts/point_source_source/source_plane/likelihood_runtime.py place their row through place_output_path directly and ignore --output-path. Route them through resolve_output_paths like every other cell (found by the feat: profiling cells render and keep fit.png (likelihood-lifecycle 1B) #453 review).
  2. scripts/cluster/source_plane/likelihood_breakdown.py (~line 499): the step-by-step log-likelihood fails its check against production FitPositionsSource on a freshly simulated dataset, so its fit.png is never reached on the laptop. Diagnose first. If the script's decomposition is stale, fix it here. If PyAutoLens is wrong, stop, file a separate library bug prompt, and leave the script alone.
  3. scripts/misc/tooling/coverage_matrix.py (~line 221): exclude measurement == "parity" from current_records_unplanned (feat: lifecycle coverage matrix + parity.json witness convention (#442 PR 6) #451 review).
  4. catalogue_lifecycle.py reads catalogue/provisional_designations.json instead of a hard-coded copy of §3.3 (feat: lifecycle coverage matrix + parity.json witness convention (#442 PR 6) #451 review).
  5. test_results_write_destinations.py: catch a results root passed as a default argument (def f(r=RESULTS_ROOT): r/"breakdown") (feat: drop the old results layout — v3-keyed trends, writers into the mirrored tree (#442 PR 3b) #449 review residual).
  6. An AST test that every sweep-driven leaf (sweep_layout.CELLS) calls record_pinned_check after its last row write, which locks in the feat: profiling cells render and keep fit.png (likelihood-lifecycle 1B) #453 timeout rule (feat: profiling cells render and keep fit.png (likelihood-lifecycle 1B) #453 re-review suggestion).

Out of scope

1A (/eyes human sign-off) runs alongside, in the session. No measurement artefacts are touched, no RAL jobs run, nothing is re-measured.

Activity

  1. added a commit that references this issue on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions