Skip to content

fix: lint red after PyAutoArray#634 — re-pin abstract.py anchors, probe shared-Cholesky route #423

Closed

Description

@Jammy2211

Overview

autolens_profiling lint goes red against PyAutoArray main since PyAutoArray#634 (02aa2e48): two scripts/misc/test/ tests fail (seen on PR #422, run 38883395602). #634 inserted 83 lines in abstract.py and routes the NumPy positivity-off solve through a shared Cholesky factor, so the line anchors in xla_attribution.py and the positive-negative solver probe are both stale.

Plan

  • Re-pin every abstract.py anchor in xla_attribution.py against PyAutoArray 02aa2e48, re-derived from the AST of both revisions (content checked identical), and update LIBRARY_ANCHOR_REVISION and the prose line numbers.
  • Make positive_negative_probe count the new shared-Cholesky route (cho_solve on _curvature_reg_matrix_cho_factor) as route (c), as well as the LU fallback; the test and the fixed_light_library.py cell keep their meaning.
  • Run the lint.yml pytest step against PyAutoArray main; ship as its own PR so main goes green, then re-run PR docs: mark gate-60 wording historical; link Pulse route-gate knowledge #422.
  • Tier: notify — merge mode: auto-merge on green (in-turn wait, then /prm close-out); under a Heart RED override it stops at PR-open.
Detailed implementation plan

Affected Repositories

  • autolens_profiling (primary)

Suggested branch: feature/profiling-lint-634-drift

Implementation Steps

  1. scripts/misc/likelihood_breakdown/xla_attribution.py: AST-diff abstract.py at 02aa2e48^ and 02aa2e48; for each anchor constant (_ABSTRACT_LOG_DET_*, _ABSTRACT_CURVATURE_ADD_LINE, reduced/mapped spans, any other abstract.py frame lines incl. the 1401-area check) shift by the measured offset, verifying the named function/line content is unchanged; update LIBRARY_ANCHOR_REVISION, the re-pin history comment and the docstring/STAGE_MAP comments.
  2. scripts/misc/likelihood_breakdown/library_solver_injection.py::positive_negative_probe: also wrap the shared-factor scipy.linalg.cho_solve route so counts["calls"] counts route (c) on both paths (record which in a second key); keep _assert_signature_covers.
  3. Validate: pytest scripts/misc/test/ plus ruff check/format against PyAutoArray main.

Key Files

  • scripts/misc/likelihood_breakdown/xla_attribution.py
  • scripts/misc/likelihood_breakdown/library_solver_injection.py
  • scripts/misc/test/test_fixed_light_library.py, scripts/misc/test/test_xla_attribution.py

Activity

  1. Jammy2211 commented on Oct 16, 2026

    @Jammy2211
    ContributorAuthor

    Heart RED override (development only), AUTONOMY.md "Human override for Heart RED (development only)"

    • date: 2026-10-16
    • authorized-by: live human in session 13efb443 (Claude Code CLI, Opus 5.5), AskUserQuestion answer "Override, then merge both (Recommended)" for this task (profiling-lint-634-drift, autolens_profiling#423); the same answer is the explicit merge command for this PR and PR docs: mark gate-60 wording historical; link Pulse route-gate knowledge #422, valid this turn only and only once every required check is green
    • reasons (verbatim, pyauto-heart readiness --json): "PyAutoFit: 1 commit(s) behind origin"; "PyAutoGalaxy: 1 commit(s) behind origin"; "PyAutoLens: 1 commit(s) behind origin"; "release validation incomplete: no rehearsal for current source"
    • passed branch gates: pytest scripts/misc/test/ 1457 passed / 6 skipped / 0 failed against PyAutoArray e59d5fa9 (contains #634); ruff check . and ruff format --check . clean; architect review of the probe + anchor diff
    • permitted: commit, push, PR-open; merge only on all-green CI this turn
  2. Jammy2211 commented on Oct 16, 2026

    @Jammy2211
    ContributorAuthor

    Shipped

    Merged in PR #424 (02705788) under the Heart RED development override (recorded above) with the human's explicit merge command, after lint went green on head 2432bdc2.

    • xla_attribution.py abstract.py anchors re-pinned to PyAutoArray 02aa2e48 (#634): log-det body (1037,1081), curvature caller (1083,1177), regularization caller (1197,1258), regularization_term (971,1035), mapped_reconstruction (900,970), second reconstruction_scatter (714,898).
    • positive_negative_probe counts both route-(c) paths (lu_solve, shared_cholesky; calls = sum); fixed_light_library.py records which ran; new silence test on the positive-only route.
    • Validation: pytest scripts/misc/test/ 1457 passed / 0 failed; ruff clean; CI lint green.
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