Repository navigation
DiffEqBase: run QA through SciMLTesting.run_qa with ExplicitImports - #4613
Merged
ChrisRackauckas merged 6 commits intoOct 31, 2026
Merged
ChrisRackauckas merged 6 commits into
ChrisRackauckas merged 6 commits into
Conversation
Move the DiffEqBase QA group from a hand-written Aqua-only test into a per-sublibrary test/qa environment driven by SciMLTesting.run_qa, so ExplicitImports checks now apply to this package like the other 56 sublibraries. The Aqua coverage (recursive unbound-args detection, the <=4 ambiguity bound, undefined exports, stale deps, compat, project extras) is preserved via run_qa plus the same hand-rolled assertions. The src changes make the import surface explicit: bare `using` is replaced by explicit name lists, genuinely unused imports are dropped (including AbstractADType, which was imported from a non-owner), the self-qualified `DiffEqBase.CallbackSet` call is unqualified, and ConcreteStructs is removed as an unused dependency. Names that other sublibraries and DiffEqBase extensions reach through `DiffEqBase.X` stay imported, with a documented ignore in the QA call for the ones ExplicitImports cannot see used. `truncate_str` gains a docstring and docs entry since run_qa's api_docs check requires public names to be documented. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <[email protected]> Agent-Harness: Devin CLI 3000.11.1 Agent-Model: swe-2-high Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/qa-hygiene/jobs/deb-qa/log.txt on amdci2
Address non-blocking review round 1 on the DiffEqBase QA PR: - Re-grepped every name in the no_stale_explicit_imports ignore list against the repository (lib/*/src, lib/*/ext, src/, ext/) and the latest version of each package in the local depot. Removed the 44 names with no DiffEqBase.X / DiffEqBase: X user (SciMLBase *_MESSAGE constants, KeywordArgWarn/KeywordArgSilent, CommonKwargError, EnsembleAlgorithm, NoAD, NonlinearAliasSpecifier, JacobianWrapper, etc.) from both the import list and the ignore tuples. The remaining 79 ignored names each have a verified downstream DiffEqBase.X consumer; the verbosity-macro names stay with their justification. - Trimmed all_explicit_imports_are_public ignores to the 38 names still imported. - Aligned test/qa/Project.toml SciMLTesting compat to "2.4" to match lib/DiffEqBase/Project.toml (run_qa exists since 2.4). Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <[email protected]> Agent-Harness: Devin CLI 3000.11.1 Agent-Model: swe-2-high Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/qa-hygiene/jobs/deb-qa/log.txt on amdci2
…ring Address review round 2 on the DiffEqBase QA PR: - SciMLTesting compat raised to "2.8" in both lib/DiffEqBase/Project.toml and lib/DiffEqBase/test/qa/Project.toml: the QA suite relies on monorepo-root documentation discovery added in 2.8 (under 2.4 the public-API-in-docs check fails with 223 unrendered names). Verified by pinning SciMLTesting =2.8.0 in a scratch env copied from test/qa, dev'ing the local DiffEqBase, and running qa.jl: 17/17 + 2/2 Aqua, 0 ambiguities. - truncate_str docstring now says the content is cut to `limit` characters and a truncation suffix is appended; the previous wording claimed the total output is at most `limit` characters. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <[email protected]> Agent-Harness: Devin CLI 3000.11.1 Agent-Model: swe-2-high Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/qa-hygiene/jobs/deb-qa/log.txt on amdci2
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <[email protected]> Agent-Harness: Devin CLI 3000.11.3 (conflict resolution), Claude Code 2.1.285 (orchestration) Agent-Model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium Agent-Session: local Claude session 3c311569-dda6-4687-bc9f-65febb212c33 (fleet master); Devin log /Users/chrisrackauckas/sandbox/master/fusion-fixes/SciML_OrdinaryDiffEq.jl-4613/log.txt
Member
Merged the default branch into this PR (clean merge, no conflicts; head ca61591) so CI runs on current master. Its earlier failures in SciMLSensitivity Core1 and the downgrade jobs were fixed on master after this PR's last CI run. 🤖 Posted by an AI agent — harness: Devin CLI 3000.11.3 (merge), Claude Code 2.1.285 (posting) · model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium |
This was referenced Oct 13, 2026
ChrisRackauckas
marked this pull request as ready for review
October 31, 2026 10:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves DiffEqBase's
GROUP=QAfrom a hand-written Aqua-only test ontoSciMLTesting.run_qain a dedicatedlib/DiffEqBase/test/qa/environment, matching the other 56 sublibraries underlib/. All existing Aqua coverage is preserved (recursive unbound-args check, the ≤4 DiffEqBase-located ambiguity bound, undefined exports, stale deps, deps compat, project extras); ExplicitImports checks now run on this package. The import surface is made explicit (using X: a, b/import Xfor everything the module touches), genuinely unused imports are dropped (AbstractADType— imported from a non-owner and unused;ConcreteStructs— unused dependency), the self-qualifiedDiffEqBase.CallbackSetcall is unqualified, andtruncate_strgains a docstring + docs entry.The large remaining ExplicitImports ignore lists are a namespace contract, not laziness: many packages outside this repo reach upstream internals through
DiffEqBase.X(verified by depot scan:DiffEqBase.has_reinitin DiffEqNoiseProcess/DelayDiffEq,DiffEqBase.update_coefficients!in Sundials,DiffEqBase.NullParameters/anyeltypedual/totallength/undefined_exports/wrappers/error types across SciMLSensitivity, JumpProcesses, Catalyst, DiffEqDevTools, BoundaryValueDiffEq, ...). Removing them to silence the stale-import check brokeOrdinaryDiffEqTsit5/OrdinaryDiffEqCoretest loading (UndefVarError: has_reinitvia DiffEqNoiseProcess → DiffEqDevTools), so they are kept and documented in the ignore tuples.ExplicitImports check resolution
no_implicit_importsusing X: nameslist orimport X(LinearAlgebra, Printf, DocStringExtensions, MuladdMacro, Setfield, StaticArraysCoreSize, SciMLOperators, SciMLBase exports used in src, InternalEuler submodule's LinearAlgebra names).no_stale_explicit_importsAbstractADTypeand@concrete/ConcreteStructs (zero downstream reach), plus 44 more names re-verified to have zeroDiffEqBase.X/DiffEqBase: Xusers in the repo (lib/*/src,lib/*/ext,src/,ext/) and across the latest version of each of 1557 packages in~/.julia/packages(mostly SciMLBase*_MESSAGEconstants,KeywordArgWarn/KeywordArgSilent,CommonKwargError,EnsembleAlgorithm,NoAD,NonlinearAliasSpecifierand friends — the*_MESSAGEconstants are referenced by SciMLBase's own@SciMLMessagemachinery, not via DiffEqBase). 79 names kept with a documented ignore: they are theDiffEqBase.Xnamespace contract for extensions/downstream packages — removal demonstrably breaks DiffEqNoiseProcess/DiffEqDevTools (has_reinit), Sundials (update_coefficients!), DelayDiffEq (reinit!extension,unwrap_cache), etc. IncludesStandard/MessageLevel/AbstractVerbosity*which@verbosity_specifierexpands to unqualified references invisible to ExplicitImports.all_explicit_imports_via_ownersAbstractADTyperemoved (owner is ADTypes; unused in src, zero external reach).all_qualified_accesses_via_ownersall_qualified_accesses_are_publicBase.Experimental/Base.FastMath/Base.Iteratorsinternals (@max_methods,Experimental,FastMath,sqrt_fast,Zip,_nt_names,diff_names,promote_op,structdiff),StaticArraysCore.StaticArray, and 4 SciMLBase internals (diagnose_symbolic_instability,has_mtk_sys,log_numerical_instability,report_integrator_failure) with no public replacement.all_explicit_imports_are_publicAbstractADTypeand 24 more zero-use internals removed. The rest are non-public upstream internals genuinely needed (SciMLBase solve/remake internals, error types/messages,DualEltypeChecker; SciMLOperatorsDEFAULT_UPDATE_FUNC; FunctionWrappersFunctionWrapper), most of which are also part of the downstream reach-through contract.no_self_qualified_accessesDiffEqBase.CallbackSet(...)→CallbackSet(...)insolve.jl. (Not inrun_qa's check set; fixed anyway.)run_api_docstruncate_strdocstring +docs/src/api/diffeqbase.mdentry.Verification
All runs from
lib/DiffEqBase(or the dependent's dir), Julia 1.12.4,TMPDIRpointed at job scratch:GROUP=QA julia --project -e 'using Pkg; Pkg.test()'truncate_str— exactly the expected failures.)GROUP=Core(DiffEqBase):Testing DiffEqBase tests passed(exit 0)GROUP=Core(OrdinaryDiffEqCore):GROUP=Core(OrdinaryDiffEqTsit5): exit 0 — a load/precompile check only (itsruntests.jlruns no testsets underGROUP=Core; groups are QA/ALL). This is the check that previously failed withUndefVarError: has_reinitwhen the namespace was over-pruned; the restore fixed it.test/qa,SciMLTestingpinned to=2.8.0, localDiffEqBasedev'ed,qa.jlincluded directly →Not verified
docs/make.jl).DiffEqBase.<export>reach for third-party deps (ArrayInterface/Markdown/LinearAlgebra exports etc.) was narrowed alongside the SciMLBase restoration; a depot-wide scan found zero uses, but packages outside the scan set could theoretically rely on it.@testset(not@safetestset) because@safetestsetcannot resolveSafeTestsetsafter the QA env switch on Julia ≤ 1.12 — same workaround DiffEqDevTools already uses.Please ignore this draft until reviewed by @ChrisRackauckas.
Risk assessment
DiffEqBase.Xnamespace contract rather than weaken checks silently.lib/DiffEqBaseonly; every solver depends on it, but all SciMLBase/SciMLOperators/FunctionWrappers names that downstream packages demonstrably reach viaDiffEqBase.Xare restored (thehas_reinit/update_coefficients!contract). About 150 names that master's bareusings implicitly exposed are intentionally no longer reachable asDiffEqBase.X: LinearAlgebra exports (mul!,ldiv!,I,Diagonal,cholesky, ...), StaticArraysCore (SVector,SArray,MVector), DocStringExtensions (SIGNATURES, ...), Setfield (setproperties,@lens), Printf (@sprintf), and Markdown — none of these is DiffEqBase public API, and a depot-wide scan over the latest version of each of 1557 installed packages plus this repo found zeroDiffEqBase.X/DiffEqBase: Xuses of them. OrdinaryDiffEqCoreGROUP=Core(test coverage) + OrdinaryDiffEqTsit5GROUP=Core(load check) verify the dependents.DiffEqBase.Xreach informed the keep-list; thehas_reinitbreakage was reproduced and then fixed and re-verified.🤖 Generated with Devin CLI 3000.11.1 (model: swe-2-high). Session: local session, transcript at /log.txt
Risk assessment (independent review, Grok Build grok-4.7, reviewed head f4f7a5a)
lib/DiffEqBaseonly. Solver numerics are untouched. The module namespace changes: bareusingof LinearAlgebra, Printf, StaticArraysCore, Setfield, Markdown, DocStringExtensions, and MuladdMacro becomes an explicit import list, so names thoseusings used to place inDiffEqBase(for examplemul!,ldiv!,I,Diagonal,SVector) are no longerDiffEqBase.X. Those names were not exported and not documented as DiffEqBase API.@reexport using SciMLBasestays, so the exported SciMLBase surface is unchanged.ConcreteStructsleaves[deps]. Version stays 7.21.4, so none of this registers until a later bump. Every solver loads DiffEqBase, which is why the namespace edit is medium rather than low.f4f7a5a65d9cb8396cef4aead2b173e5b8874063(unchanged at the end). Draft, MERGEABLE, OPEN.Julia 1.13 (
julia +release),JULIA_NUM_THREADS=4,JULIA_NUM_PRECOMPILE_TASKS=4, fromwt-4613/lib/DiffEqBase:GROUP=QA julia +release --project=. -e 'using Pkg; Pkg.test()'.Exit 0.
QA | 19 19in 33.6s. Warning attest/qa/qa.jl:136:Number of method ambiguities: 0. ResolvedSciMLTesting v2.13.2,Aqua v0.8.18.Testing DiffEqBase tests passed. Log:review/logs/qa-4613.log.GROUP=QAis outside the Core exclusion list inlib/DiffEqBase/test/runtests.jl, so this run executed onlyqa/qa.jl(release Julia, empty prerelease). Docs were not built.CI on that head, read 2026-10-16: 274 checks, 26 success, 1 in progress, 245 queued, 1 skipped, 1 failure.
lib/DiffEqBaseQA, Core (Julia 1, lts, pre), Downstream, Downstream2, ModelingToolkit, Sundials, Static, and the downgrade job are still queued. QA job: https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/38856211516/job/116863034463. The only failure is SciMLSensitivity Core4,AssertionError: mi2 !== nothingin Enzymeparallelrules.jlduringdownstream/test/Core4/ensembles.jl:19: https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/38856211132/job/116828134206. The same assertion fails on Fix SDIRK smooth_est Hairer–Wanner scaling (#2902) #4649 and Fix callback interpolation at tstops and restart BDF after rewinds #4664. Master Core4 on59ba40e4b5(2026-10-14) succeeded: https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/38561320093. It is not this diff.GROUP=QApasses on Julia 1.13 with the ambiguity bound held at 0, and the ExplicitImports ignore list is an explicit namespace contract rather than a skipped test.🤖 Posted by an AI agent — harness: Grok Build · model: grok-4.7 (independent reviewer; appended by Claude Code 2.1.301 · claude-opus-5-5)
Conversation: https://claude.ai/code/session_01VZjwf7Ux9YtTzwHGHMqnsq
Independent current-head review of f4f7a5a
CHANGES for unverified CI parity. Current head Newton LineSearchException and Enzyme ensemble Core4 failure lack dependency-matched base reproduction; same Enzyme version alone does not prove parity. Local DiffEqBase Core passes, full normal-precompilation QA19/19, minimum SciMLTesting2.8 QA17+2, public inventory230names preserved. New QA on base12pass1fail4errors discriminates stronger checks; original base QA9/9. Precompile-disabled Aqua persistent-task failure is disclosed, not a normal-QA pass. Original session provenance also needs correction. Prior risk intake exposed, disclosed; no counted MERGE.
Risk assessment
Links:
🤖 Posted by an AI agent — harness: Codex CLI 0.163.0 · model: gpt-6.1-sol
Conversation: local session 01a154f0-8986-78e1-8af2-1119e8cdea4a (no session URL)
Assigned correction of f4f7a5a
This correction is queued to a fresh Codex CLI worker, model
gpt-6.1-sol, under the SciML submaster’s pipeline ownership. Scope: Establish actual no-regression CI parity for Newton LineSearchException and Enzyme ensemble Core4 with failing-job dependency/Julia controls; fix head-only regressions, preserve base-failure separation and actual original provenance.The revision must preserve existing assertions and demonstrate the concrete failing-before/passing-after behavior using independent references. Default-branch failures, API or compatibility-policy decisions, and unavailable hardware remain separate findings. No test suppression, unvalidated push or unrelated repair.
The worker does not merge, approve or close PRs. Any pushed revision needs a fresh independent counted review; existing source reviews are not silently repinned. This assignment does not change the PR’s risk level or resolve any finding.
Links:
🤖 Posted by an AI agent — harness: Codex CLI 0.163.0 · model: gpt-6.1-sol
Conversation: local session 01a154f0-8986-78e1-8af2-1119e8cdea4a (no session URL)
Risk assessment (independent review, Codex CLI 0.164.0-alpha.11.1 gpt-6-astra, slot 1, head f4f7a5a)
Review round 1, written by the reviewer named above (Codex CLI 0.164.0-alpha.11.1 / gpt-6-astra) in a session other than the PR author's, and copied here by the posting agent without change to its findings. The posting agent did not re-run the reviewer's commands.
Summary: Moves DiffEqBase QA into SciMLTesting.run_qa and makes imports explicit while preserving the legacy Aqua assertions. Current-head QA executes 19/19, and recent master logs match both failing checks; no blocking implementation defect was found.
Blast radius: DiffEqBase module namespace, test-environment resolution, QA test wiring, and the diagnostic truncate_str documentation; numerical solver implementation is unchanged.
Evidence: Retrieved QA job reports 19/19 on Julia 1.13.2. The recursive unbound-argument zero assertion and at-most-four ambiguity assertion are retained in qa.jl. Latest master logs independently match Newton LineSearchException and Enzyme Core4 errors.
Blocking findings
None.
Non-blocking findings
lib/DiffEqBase/test/qa/qa.jl:70— The pre-existing non-public dependency accesses are explicitly allow-listed. Keep these exceptions narrow and remove them when upstream APIs become public; the cost is maintaining the list alongside dependency updates, with no production-path work added.What I ran
git rev-parse HEAD; full SHA matches the recorded PR head.git diff origin/master...HEAD; inspected all changed files and relevant callers/test wiring. RootAGENTS.mdandCLAUDE.mdare absent. Initial risk was recorded before reading the author's risk assessment.git log -1 --first-parent --no-merges --format=%B; uses the newest PR-line non-merge commit, excluding master commits imported by a merge.gh pr view 4613 --repo SciML/OrdinaryDiffEq.jl --json number,url,state,isDraft,headRefOid,baseRefName,baseRefOid,title,files,statusCheckRollup;gh pr checks 4613 --repo SciML/OrdinaryDiffEq.jl --json name,state,bucket,link,workflow; read the PR body after the initial risk freeze. Retrieval/git commands exited 0; failed check outcomes are described separately below.gh run view 38856211516 --repo SciML/OrdinaryDiffEq.jl --job 116863034463 --log, exit 0: current-head DiffEqBase QA, Julia 1.13.2,QA | 19 19;Number of method ambiguities: 0; package tests passed. The new runner preserves the old unbound-argument and ambiguity assertions and adds ExplicitImports/API-doc checks.gh run view 38856211516 --repo SciML/OrdinaryDiffEq.jl --log-failed, exit 0: NonlinearSolve Core fails in Newton Tests withLineSearchException: Search direction is not a direction of descent. Step length: 0.0, 4 pass / 1 error.gh run view 38856211132 --repo SciML/OrdinaryDiffEq.jl --log-failed, exit 0: Core4 fails withAssertionError: mi2 !== nothingat the threaded-ensemble testtest/Core4/ensembles.jl:19in Enzymethreadsfor_common.gh run list --repo SciML/OrdinaryDiffEq.jl --branch master --event push --limit 5; inspected current workflow-specific run inventory.gh run view 41058796614 --repo SciML/OrdinaryDiffEq.jl --log-failedandgh run view 41050161729 --repo SciML/OrdinaryDiffEq.jl --log-failed, exit 0: recent master Sublibrary CI matches the Newton exception and 4 pass / 1 error; latest completed master IntegrationTest matches the Core4 exception, test location and 15 pass / 1 error / 2 broken summary. These logs establish matching default-branch failures without claiming identical locked dependencies.What I did not verify
No local Julia QA/Core execution, minimum SciMLTesting 2.8 environment, full documentation build, or downstream namespace scan was repeated. Current-head QA execution is established by the retrieved CI log. The primary subreviewer froze only the initial risk before seeing earlier same-head reviews; the separate assessor supplied a complete blind freeze before comparison, as stated above. The older reviewers' lack-of-CI-parity concerns were reasonable with their available evidence and are resolved here only by newly inspected default-branch logs. G1 is not applicable because numerical code is unchanged; current QA and related Core checks exercise the changed import/test paths. No new mutable state, cache, or threading path is introduced.
🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5
Conversation: https://claude.ai/code/session_01379heiiB35TtywhR7uSU74