Skip to content

QA: run_qa v1.6 form + ExplicitImports#110

Merged
ChrisRackauckas merged 6 commits into
SciML:masterfrom
ChrisRackauckas-Claude:qa-run_qa-v1.6-explicit-imports
Jul 2, 2026
Merged

QA: run_qa v1.6 form + ExplicitImports#110
ChrisRackauckas merged 6 commits into
SciML:masterfrom
ChrisRackauckas-Claude:qa-run_qa-v1.6-explicit-imports

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Please ignore until reviewed by @ChrisRackauckas.

Converts test/qa/qa.jl from the hand-rolled Aqua/JET body to the SciMLTesting v1.6 run_qa form, with ExplicitImports enabled.

What changed

  • test/qa/qa.jl: now run_qa(ODEInterfaceDiffEq; explicit_imports = true, ei_kwargs = ...). Aqua + ExplicitImports come from SciMLTesting's own deps; JET is loaded via using JET (weakdep extension auto-registers it).
  • Root Project.toml: added LinearAlgebra = "1" to [compat]; dropped ExplicitImports from [compat]/[extras]/[targets].test (transitive via SciMLTesting now).
  • test/qa/Project.toml: bumped SciMLTesting compat to "1.6". (Aqua kept as a direct dep — its ambiguities sub-check spawns a child process that requires Aqua directly; SafeTestsets kept — the folder-model @safetestset wrapper needs it.)
  • Removed the orphan test/explicit_imports.jl (it was never wired into any group under the SciMLTesting folder model).

Mapped/resolved tracked-broken findings (was #105)

  • Aqua deps_compat: previously disabled + @test_broken because LinearAlgebra (a stdlib dep) had no [compat] entry. Fixed by adding LinearAlgebra = "1". Full Aqua.test_all now passes, so no aqua_broken placeholder is needed.
  • JET: the old qa.jl had a bare @test_broken false that never actually ran JET. With JET loaded, both JET.test_package(pkg; target_modules=(pkg,), mode=:typo) and report_package report 0 issues, so JET runs as a normal hard check (no jet_broken). Nothing is silenced.

ExplicitImports findings (6 checks)

Pass clean (3): no_implicit_imports, no_stale_explicit_imports, all_explicit_imports_via_owners.

Ignore-listed (3) — every ignored name is a non-public name owned by a dependency or a SciMLBase name reexported through DiffEqBase (the DiffEqBase.__solve / initialize_dae! solver-extension convention shared across SciML solvers). No own non-public names; nothing beyond documented per-check ignore lists; no ei_broken needed:

  • all_qualified_accesses_via_owners (13 names): SciMLBase-owned names accessed via DiffEqBase reexport, plus SciMLStructures via SciMLBase.
  • all_qualified_accesses_are_public (46 names): non-public internals from DiffEqBase / SciMLBase / SciMLBase.ReturnCode / ODEInterface / Base.Iterators.
  • all_explicit_imports_are_public (3 names): NoInit, OverrideInit, has_initialization_data (SciMLBase).

Follow-up (out of scope for this QA PR)

uBottomEltype is referenced but never defined in src/solve.jl:38-39 (the VectorContinuousCallback branch of DiffEqBase.__solve) — a latent UndefVarError on that path. JET's package analysis does not flag it (not reachable from its abstract-interpretation entry points), so it does not affect this QA lane. Should be a separate focused fix PR with a runtime test for the VectorContinuousCallback path.

Verification

Run locally against released SciMLTesting 1.6.0 (no dev-from-branch), local checkout source:

QA/qa.jl | 18 Pass / 0 Fail / 0 Error / 0 Broken

via both --project=test/qa test/qa/qa.jl and the folder-model GROUP=QA julia --project=test/qa test/runtests.jl.

🤖 Generated with Claude Code

ChrisRackauckas and others added 4 commits June 25, 2026 06:18
Convert test/qa/qa.jl from the hand-rolled Aqua/JET body to the SciMLTesting
v1.6 run_qa form, with ExplicitImports enabled.

- run_qa(ODEInterfaceDiffEq; explicit_imports = true, ei_kwargs = ...): Aqua and
  ExplicitImports come from SciMLTesting's own deps; JET via `using JET` (weakdep
  extension). JET runs as a hard check and passes (the old qa.jl had a bare
  `@test_broken false` placeholder that never actually invoked JET; report_package
  and test_package(mode=:typo) both report 0 issues against target_modules=(pkg,)).

- Aqua deps_compat fixed (not suppressed): the old qa.jl disabled deps_compat and
  marked it @test_broken because LinearAlgebra (a stdlib dep) had no [compat]
  entry. Added `LinearAlgebra = "1"` to the root [compat]; full Aqua.test_all now
  passes, so no aqua_broken placeholder is needed.

- ExplicitImports: 3 of 6 checks pass clean (no_implicit_imports,
  no_stale_explicit_imports, all_explicit_imports_via_owners). The other 3 are
  ignore-listed because every flagged name is a non-public name owned by a
  dependency (SciMLBase / DiffEqBase / SciMLBase.ReturnCode / ODEInterface /
  Base.Iterators) or a SciMLBase name reexported through DiffEqBase (the
  DiffEqBase.__solve / initialize_dae! solver-extension convention). No own
  non-public names are involved; nothing is silenced beyond documented per-check
  ignore-lists, and none need ei_broken.

- Removed the orphan test/explicit_imports.jl (not wired into any test group under
  the SciMLTesting folder model) and dropped ExplicitImports from the root
  [compat]/[extras]/[targets] (it is transitive via SciMLTesting). Bumped the QA
  env SciMLTesting [compat] to "1.6".

Verified locally against released SciMLTesting 1.6.0 (no dev-from-branch):
QA/qa.jl group = 18 Pass / 0 Fail / 0 Error / 0 Broken via both
`--project=test/qa test/qa/qa.jl` and the folder-model `GROUP=QA runtests.jl`.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The v1.6 run_qa conversion enabled JET as a hard QA check. On Julia 1.12
(the "julia 1" lane) JET.report_package(...; mode=:typo) finds 17 issues in
the DiffEqBase.__solve path that the old no-op `@test_broken false` never
surfaced. All are pre-existing latent bugs:

- `uBottomEltype` was referenced at src/solve.jl but never defined or imported
  (a guaranteed UndefVarError on the VectorContinuousCallback branch). Compute
  it as `SciMLBase.recursive_bottom_eltype(prob.u0)`, matching the
  OrdinaryDiffEq convention. recursive_bottom_eltype is owned by
  RecursiveArrayTools and reached via the existing `import SciMLBase`, so no new
  dependency; added it to the ExplicitImports via_owners / are_public ignore
  lists with its owner documented.

- The `alg isa ...` solver dispatch chain had no final `else`, so JET saw a
  path where tend/uend/retcode/stats stay undefined (then read below). The nine
  concrete ODEInterfaceAlgorithm subtypes make the chain total in practice;
  turn the last `elseif alg isa ddebdf` into `else` so it is provably total.

- The retcode-to-ReturnCode mapping had no `else`, leaving return_retcode
  undefined for any negative retcode other than -1..-4 (a real UndefVarError at
  the final solution_new_retcode call). Map any other negative retcode to
  ReturnCode.Failure.

JET now reports 0 issues; the full QA group passes 18/18 on both Julia 1.12
and 1.10 (LTS) against released SciMLTesting 1.6.0.

The Core (julia 1 / julia pre) lanes remain red, but that is pre-existing and
unrelated: ODEInterface_jll fails to load its Fortran solver binaries on Julia
1.12+ ("Cannot find method(s) for dopri5!"), reproducing identically on master
and locally. Not touched here.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
SciMLTesting 1.7.0 now runs the two public-API ExplicitImports checks
(check_all_qualified_accesses_are_public /
check_all_explicit_imports_are_public) only on Julia >= 1.11 and skips them
on the LTS, and the released base libraries (SciMLBase 3.24.0, CommonSolve
0.2.9) declare their ReturnCode enum public. Verified on Julia 1.12 against
the registered releases (DiffEqBase 7.5.7, SciMLBase 3.24.0, ODEInterface
0.5.1): the ReturnCode members (Default, DtLessThanMin, Failure,
InitialFailure, MaxIters, Success, Unstable) and Base.Iterators.filter are
now recognized public, so drop those 8 entries from
all_qualified_accesses_are_public. The remaining names stay: they are still
non-public internals of DiffEqBase / SciMLBase / the ODEInterface C wrapper
in the registered releases (verified via Base.ispublic on 1.12).

QA group green on Julia 1.12 (18/18) and on the LTS 1.10 (16/16, the two
public checks skipped).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Now that the make-public releases are live (SciMLBase 3.27.0, DiffEqBase
7.6.0, SciMLTesting 1.7.0), finish the public-API ExplicitImports cleanup.

- test/qa/Project.toml: bump SciMLTesting compat to "1.7" (gates the
  public-API EI checks to Julia >=1.11).
- src/: rewrite `DiffEqBase.X` -> `SciMLBase.X` for the abstract types and
  solver-extension functions that SciMLBase owns (AbstractODEProblem,
  AbstractODEAlgorithm, AbstractODEIntegrator, AbstractParameterizedFunction,
  __solve, build_solution, has_jac/has_tgrad/has_analytic,
  calculate_solution_errors!, solution_new_retcode, initialize_dae!), so
  they are accessed through their owner. DiffEqBase-owned public names
  (apply_callback!/apply_discrete_callback!/CallbackCache/
  find_first_continuous_callback/max_vector_callback_length/DefaultInit)
  keep their DiffEqBase.X access.
- test/qa/qa.jl: empty the public-API ignore lists, then restore only the
  names still flagged on Julia 1.12 against the registered releases:
  SciMLBase-owned-but-private internals, DiffEqBase-owned-but-private
  (_process_verbose_param/Stats), recursive_bottom_eltype
  (RecursiveArrayTools) and SciMLStructures via the SciMLBase reexport, and
  the ODEInterface C-wrapper entry points/constants. The *_via_owners
  ignore list is left untouched.

Verified: QA group 18/18 on Julia 1.12 (public-API checks run, 0 fail/
error/broken) and 16/16 on Julia 1.10 (public-API checks skipped); solve
smoke test passes with __solve dispatch resolving to the migrated method.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisRackauckas-Claude ChrisRackauckas-Claude marked this pull request as ready for review June 27, 2026 20:59
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
…non-public re-exports)

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas ChrisRackauckas merged commit c840fff into SciML:master Jul 2, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants