Skip to content

QA: Aqua/JET findings marked @test_broken pending fix #156

Description

@ChrisRackauckas-Claude

The QA group (Aqua + JET) was wired up in test/qa/qa.jl and run on Julia 1.11. JET passes cleanly. Aqua passes all checks except piracies, which has one genuine finding. To keep the QA group green on CI, the piracy check is currently piracies = false in Aqua.test_all plus an explicit @test_broken false placeholder in test/qa/qa.jl. This issue tracks fixing the underlying type piracies and then removing the @test_broken / re-enabling piracies = true.

Aqua result (Julia 1.11)

Test Summary: | Pass  Broken  Total
Aqua          |   10       1     11

All other Aqua checks pass: method ambiguities, unbound type parameters, undefined exports, project_extras (Project.toml vs test/Project.toml), stale dependencies, compat bounds, persistent tasks.

Piracy finding (the @test_broken)

Aqua.test_piracies reports 3 pirated methods:

  1. Base.signbit(z::Complex{T}) where T<:Number defined in src/integral.jl:4 — both signbit and Complex are owned by Base, so this is type piracy.
  2. Base.signbit(x::SymbolicUtils.Sym{Number}) defined in src/integral.jl:5signbit is owned by Base; SymbolicUtils.Sym is owned by SymbolicUtils. Neither is owned by this package.
  3. DataDrivenSparse.active_set!(idx::BitMatrix, p::DataDrivenSparse.SoftThreshold, x::Matrix{ComplexF64}, λ::Float64) defined in src/sparse.jl:125 — the function active_set! and all of its argument types are owned by Base/DataDrivenSparse, not by this package.
Piracy: Test Failed at .../Aqua/.../src/piracies.jl:244
  Expression: isempty(v)
   Evaluated: isempty(Method[
     active_set!(idx::BitMatrix, p::DataDrivenSparse.SoftThreshold, x::Matrix{ComplexF64}, λ::Float64) @ src/sparse.jl:125,
     signbit(x::SymbolicUtils.Sym{Number}) @ src/integral.jl:5,
     signbit(z::Complex{T}) where T<:Number @ src/integral.jl:4])

JET

JET.test_package(SymbolicNumericIntegration; target_defined_modules = true) passes (1 pass, 0 errors) on Julia 1.11.

Suggested fixes

  • signbit(::Complex) / signbit(::SymbolicUtils.Sym): route through a package-internal helper (e.g. _signbit) instead of adding methods to Base.signbit with all-foreign argument types.
  • active_set! on all-foreign types: either move ownership/dispatch onto a package-owned type, or upstream the method into DataDrivenSparse.

Once fixed, set piracies = true (drop the kwarg) in test/qa/qa.jl and remove the @test_broken false line.

Ignore until reviewed by @ChrisRackauckas.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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