Skip to content

Test coverage gaps: structured adjoint/matrix-RHS matvec, cached-LS value updates, and lstsq generic-eltype / guard boundary are untested #14

@ChrisRackauckas-Claude

Description

@ChrisRackauckas-Claude

WHAT: (a) test/test_matvec.jl has no adjoint/transpose test at all (grep for adjoint|transpose returns nothing) — the 'load-bearing' structured adjoint with subtle cnj/Sop conjugation logic, the 5-arg mul!, and the matrix-RHS adjoint (the 3000x regression) are all uncovered; this is why that regression went unnoticed. (b) The cached LS factorization is only ever built once (test_lstsq.jl:213-244); no value-update test, so the new LS refactor! would ship without a regression net. (c) test_generic_eltypes.jl never calls lstsq, so the BigFloat-iterative capability would be untested once enabled; it also tests Dual through factorize but not through qr(A)\b (verified working but advertised-and-untested, fragile vs backend updates). (d) The κ̂(S) guard (lstsq.jl:208-210) is tested only at one extreme (κ≈5e13 rejected); no boundary test pinning a safe ill-conditioned S that must NOT be rejected, and :iterative is never tested on a genuinely singular-S A (its stated reason to exist). WHY IT MATTERS: Locks in the matvec/LS-refactor/eltype fixes and guards the guard heuristic against false-positive regressions. FIX: Add tests for A'*u and transpose(A)*u (real+complex, selector+dense U), the 5-arg form, matrix-RHS A'*X (after the matrix-adjoint fix); LS refactor! vs fresh build; lstsq(BigFloat; :iterative) vs pinv; ForwardDiff through qr(A)\b; a borderline-conditioned S the guard must accept; :iterative on a large general-singular-S A. EFFORT: S-M.


Priority: medium. Filed from an automated next-steps audit of the QR/lstsq work (see PR #6).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions