Skip to content

QA: run_qa v1.6 form + ExplicitImports#61

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

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

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Ignore until reviewed by @ChrisRackauckas.

Brings this repo's QA group onto the SciMLTesting run_qa v1.6 form with ExplicitImports enabled.

What changed

  • test/qa/qa.jl: hand-rolled Aqua.test_all + JET.test_package(target_defined_modules=true) → single run_qa(FiniteStateProjection; explicit_imports = true, ...).
  • test/qa/Project.toml: drop Aqua and SafeTestsets (Aqua + ExplicitImports come from SciMLTesting's own deps; the Aqua ambiguities child-proc is disabled via aqua_broken, so Aqua need not be a direct qa-env dep). Bump SciMLTesting compat floor to 1.6. JET stays direct (its weakdep extension turns the JET check on).
  • Root Project.toml: add SparseArrays = "1" to [compat] (fixes the Aqua deps_compat finding directly).

Pre-existing findings

The QA lane was already red on main (7 passed / 5 failed). This PR preserves the genuine findings as tracked @test_broken rather than hard fails (all tracked in #60), and fixes the one trivial one (deps_compat) directly:

  • aqua_broken = (:ambiguities, :unbound_args, :undefined_exports)pairedindices dispatch overlap/unbound type params in src/indexhandlers.jl; @reexport using Catalyst re-exporting 5 names absent from the loaded dep set.
  • jet_broken = true — JET reports 3 issues: the @deprecate NaiveIndexHandler kwcall, and NullParameters used-but-not-imported on the default-pmap ODEProblem/SteadyStateProblem paths (build_rhs.jl:144, build_rhs_ss.jl:79) — a real latent bug the existing tests never exercise (they always pass an explicit pmap).
  • ei_broken = (:no_implicit_imports,) — ~23 names implicit via @reexport using Catalyst + the symbolic stack; making them all explicit is a risky mass refactor.

ExplicitImports

All 6 checks enabled. The other 5 pass with documented per-check ignore lists for non-owner / non-public qualified accesses from Base/Catalyst/MacroTools/ModelingToolkit/RuntimeGeneratedFunctions (these resolve as those base libs adopt public/owner declarations).

Verification

Ran the QA group locally against released SciMLTesting 1.6.0 (Pkg-resolved, no dev-from-branch):

Test Summary:     | Pass  Broken  Total     Time
Quality Assurance |   13       5     18  1m06.6s

0 Fail, 0 Error. SciMLTesting v1.6.0, Aqua v0.8.16 + ExplicitImports v1.15.0 (transitive), JET v0.9.18.

🤖 Generated with Claude Code

ChrisRackauckas and others added 4 commits June 25, 2026 05:51
Convert test/qa/qa.jl from the hand-rolled Aqua.test_all + JET.test_package
body to the SciMLTesting 1.6 `run_qa` form with ExplicitImports enabled.

- Aqua + ExplicitImports come from SciMLTesting's own deps; drop them as direct
  qa-env deps (Aqua's ambiguities child-proc is disabled via aqua_broken, so it
  need not be a direct dep). Drop unused SafeTestsets. Bump SciMLTesting compat
  floor to 1.6. JET stays a direct dep (weakdep extension turns the JET check on).
- Preserve the pre-existing (already-red-on-main) findings as tracked
  @test_broken placeholders rather than hard fails:
    * aqua_broken = (:ambiguities, :unbound_args, :undefined_exports)
    * jet_broken = true (JET reports 3 issues; report_package + @test_broken)
    * ei_broken = (:no_implicit_imports,) (~23 names via @reexport using Catalyst)
  All tracked in SciML#60.
- Fix the one trivial real finding directly: add SparseArrays = "1" to the root
  [compat] (Aqua deps_compat was failing on the missing entry).
- ExplicitImports: enable all 6 checks; document per-check ignore lists for
  non-owner / non-public qualified accesses from Base/Catalyst/MacroTools/
  ModelingToolkit/RuntimeGeneratedFunctions.

Verified locally vs released SciMLTesting 1.6.0: Quality Assurance testset
13 Pass, 5 Broken, 0 Fail, 0 Error.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
SciMLTesting 1.7 runs the two public-API ExplicitImports checks
(check_all_qualified_accesses_are_public / _explicit_imports_are_public)
only on Julia >= 1.11 and skips them on the lts, so the public-API
ignore-lists are now dead weight on the lts and re-checkable on 1.12.

Swept all_qualified_accesses_are_public against the registered releases
on Julia 1.12 (where the checks run): :OneTo (Base) and :init
(RuntimeGeneratedFunctions) are no longer flagged, so they are removed.
The remaining 10 entries (_symbol_to_var/get_systems from Catalyst;
alias_gensyms/flatten/prewalk/resyntax/striplines from MacroTools;
scalarize/value/varmap_to_vars from ModelingToolkit) are still genuinely
non-public in the versions FiniteStateProjection resolves: Catalyst="15"
pins the SciMLBase 2.x / ModelingToolkit 9.x / Symbolics 6.x ecosystem,
so the base-lib public-API releases (SciMLBase 3.24, MTK 11.29,
Symbolics 7.28) cannot be resolved here yet. all_explicit_imports_are_public
needs no ignores.

Verified:
- Julia 1.12 (public checks active; JET 0.11.5, SciMLTesting 1.7.0,
  ExplicitImports 1.15.0): Quality Assurance 13 Pass, 5 Broken, 0 Fail,
  0 Error.
- Julia 1.10 lts (public checks skipped by SciMLTesting 1.7; 1.7.0):
  11 Pass, 5 Broken, 0 Fail, 0 Error.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… block

SciMLTesting 1.7 gates the two public-API ExplicitImports checks
(all_qualified_accesses_are_public / all_explicit_imports_are_public) to
Julia >= 1.11. Bump the QA env compat floor to 1.7 so the checks actually
run on the `1` lane.

Verified on Julia 1.12 with the public-API checks enabled: the
all_qualified_accesses_are_public ignore list cannot be emptied because
`Catalyst = "15"` pins the SciMLBase 2.x / ModelingToolkit 9.x /
Symbolics 6.x ecosystem (resolved: Catalyst 15.0.11, ModelingToolkit
9.84.0, Symbolics 6.58.0, SciMLBase 2.153.1), so the released public-API
versions (SciMLBase 3.27 / MTK 11 / Symbolics 7) are not resolvable here.
All ten flagged names remain non-public in their owner at the resolvable
version (Catalyst/MacroTools have not declared theirs public either), so
each is restored with an accurate per-name owner note. Re-running with the
list restored is green on both 1.12 (13 pass / 5 broken / 0 fail) and 1.10
(11 pass / 5 broken / 0 fail; public-API checks skipped per the 1.7 gate).

No DiffEqBase.X -> SciMLBase.X source migration applies: the only
DiffEqBase-qualified accesses are ODEProblem/SteadyStateProblem method
extensions, which are not in the SciMLBase make-public name set and
already pass via the owner-reexport check.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
SteadyStateDiffEq 2.0.1-2.4.0 reference `DiffEqBase.AbstractNonlinearTerminationMode`,
which was removed from DiffEqBase between 6.160 and 6.170 (the termination-mode
abstract types moved to NonlinearSolveBase). The Downgrade lane resolves
SteadyStateDiffEq to its floor (2.0.1) together with a DiffEqBase that Catalyst 15
forces to >=6.165 (6.176.0 in CI), so SteadyStateDiffEq precompilation fails with
`UndefVarError: AbstractNonlinearTerminationMode not defined`.

SteadyStateDiffEq 2.5.0 switched to `NonlinearSolveBase.AbstractNonlinearTerminationMode`,
so raising the floor to "2.5" fixes the downgrade resolution while staying within
the existing v2 series. Verified locally: the real julia-downgrade-compat Resolver.jl
run resolves SteadyStateDiffEq 2.5.0 against DiffEqBase 6.176.0 / NonlinearSolveBase
1.14.0 (no UNSAT), and SteadyStateDiffEq 2.5.0 precompiles/loads against DiffEqBase
6.176.0 where 2.0.1 fails.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor Author

Downgrade lane root cause + fix

Failure: Downgrade (Core) red with
UndefVarError: AbstractNonlinearTerminationMode not defined during precompilation of SteadyStateDiffEq (solve.jl).

Root cause (compat floor too low): The Downgrade lane resolves SteadyStateDiffEq to its floor. With the old compat SteadyStateDiffEq = "1, 2" it picks 2.0.1. SteadyStateDiffEq 2.0.1-2.4.0 reference DiffEqBase.AbstractNonlinearTerminationMode, but that abstract type was removed from DiffEqBase between 6.160 and 6.170 (the termination-mode types moved to NonlinearSolveBase). Catalyst 15 pins DiffEqBase >= 6.165, so the downgrade resolves DiffEqBase 6.176.0 (the symbol-removed version), and SteadyStateDiffEq 2.0.1 fails to precompile.

SteadyStateDiffEq 2.5.0 switched to NonlinearSolveBase.AbstractNonlinearTerminationMode, so it is independent of the removed DiffEqBase symbol.

Fix: SteadyStateDiffEq = "1, 2" -> "2.5".

Verified locally (Julia 1.10):

  • Real julia-downgrade-compat Resolver.jl --min=@deps merged resolution of the patched repo: Successfully resolved with SteadyStateDiffEq 2.5.0, DiffEqBase 6.176.0, NonlinearSolveBase 1.14.0, DiffEqCallbacks 4.17.0, Catalyst 15.0.8, OrdinaryDiffEq 6.96.0 (no UNSAT).
  • Isolated precompile: SteadyStateDiffEq 2.0.1 + DiffEqBase 6.176.0 -> the exact UndefVarError; SteadyStateDiffEq 2.5.0 + DiffEqBase 6.176.0 -> loads cleanly.

The run_qa v1.6 conversion newly runs all 6 ExplicitImports checks
(the old hand-rolled qa.jl ran only Aqua + JET). On Julia 1.11+,
all_qualified_accesses_are_public hard-errors on `NullParameters`,
which src/build_rhs.jl and src/build_rhs_ss.jl reach via `using
DiffEqBase` (reexports SciMLBase). NullParameters is owned by SciMLBase
and is only declared public there in 3.30+, but `Catalyst = "15"`
pins SciMLBase 2.153.1 where it is still non-public, so the check
correctly flags it. Add it to the documented ignore list alongside the
other names that are non-public at the Catalyst-15-resolvable versions.

Verified Julia 1.12.6 (QA julia-1 lane) against released SciMLTesting
1.7.0: Quality Assurance 13 pass / 5 broken / 0 fail / 0 error (was 12
pass / 1 error / 5 broken before the fix).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Resolve the Project.toml [compat] conflict by keeping the PR's
SparseArrays = "1" entry (added so Aqua deps_compat stops flagging the
missing bound) alongside main's SteadyStateDiffEq = "2.5" / DiffEqBase =
"6.165, 7" floors and the v0.3.4 release bump from SciML#62/SciML#63.

main's SciML#29 already re-qualified the FSP method extensions to
SciMLBase.ODEProblem / SciMLBase.SteadyStateProblem with
SciMLBase.NullParameters() defaults; those forms come in via the merge.
The run_qa NullParameters ignore added here stays correct: NullParameters
is still non-public in the Catalyst-15-pinned SciMLBase 2.153.1, so the
all_qualified_accesses_are_public check still flags the SciMLBase.NullParameters
qualified access.

Verified on Julia 1.12.6 against the merged tree with released
SciMLTesting 1.7.0 / JET 0.11.5 / ExplicitImports 1.15.0 (resolved
Catalyst 15.0.11, SciMLBase 2.153.1): Quality Assurance 13 Pass, 5 Broken,
0 Fail, 0 Error.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude ChrisRackauckas-Claude marked this pull request as ready for review July 3, 2026 01:40
@ChrisRackauckas ChrisRackauckas merged commit 2407446 into SciML:main Jul 3, 2026
7 of 10 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