WHAT: The cached LS factorization (src/lstsq.jl:164-173) stores a PureKLU factorization Sfact but exposes no value-update path; refactor!/update_lowrank!/lu! exist only for Woodbury/Augmented/QR. So a Newton/time-stepping loop that changes S's values (same sparsity pattern) cannot reuse it — each new A redoes the full KLU symbolic analysis (BTF + AMD) plus a fresh pivoted-QR and two SVDs. WHY IT MATTERS: The README (line 220) advertises the cached factorization 'for a Newton / time-stepping loop', but the constructor only supports a fixed A — the headline use case is currently unreachable. PureKLU already exposes klu!/klu_refactor! (the same symbolic-reuse calls Woodbury's refactor uses at src/woodbury.jl:276). FIX: Add refactor!(F::SparseWithDenseRowColLeastSquares, A; check=true) that copyto!s new nzval into owned Sown, calls PureKLU.klu!(F.Sfact, nz) (reuse symbolic + workspace), then re-runs only the value-dependent tail (Z=S̃⁻¹U, κ̂(S) guard, C, pivoted QR of [Z|Vᴴ], W, Msp, QL). Requires splitting _structured_setup into 'symbolic+allocate' vs 'numeric fill', and making rank-dependent fields (W/QL/Msp) the mutable/reallocatable part since kdef can change with values. Add an Snzval-only fast form mirroring src/woodbury.jl:271. EFFORT: M.
Priority: high. Filed from an automated next-steps audit of the QR/lstsq work (see PR #6).
WHAT: The cached LS factorization (src/lstsq.jl:164-173) stores a PureKLU factorization
Sfactbut exposes no value-update path;refactor!/update_lowrank!/lu!exist only for Woodbury/Augmented/QR. So a Newton/time-stepping loop that changes S's values (same sparsity pattern) cannot reuse it — each new A redoes the full KLU symbolic analysis (BTF + AMD) plus a fresh pivoted-QR and two SVDs. WHY IT MATTERS: The README (line 220) advertises the cached factorization 'for a Newton / time-stepping loop', but the constructor only supports a fixed A — the headline use case is currently unreachable. PureKLU already exposesklu!/klu_refactor!(the same symbolic-reuse calls Woodbury's refactor uses at src/woodbury.jl:276). FIX: Addrefactor!(F::SparseWithDenseRowColLeastSquares, A; check=true)that copyto!s new nzval into ownedSown, callsPureKLU.klu!(F.Sfact, nz)(reuse symbolic + workspace), then re-runs only the value-dependent tail (Z=S̃⁻¹U, κ̂(S) guard, C, pivoted QR of [Z|Vᴴ], W, Msp, QL). Requires splitting_structured_setupinto 'symbolic+allocate' vs 'numeric fill', and making rank-dependent fields (W/QL/Msp) the mutable/reallocatable part since kdef can change with values. Add anSnzval-only fast form mirroring src/woodbury.jl:271. EFFORT: M.Priority: high. Filed from an automated next-steps audit of the QR/lstsq work (see PR #6).