Repository navigation
Run the QA test group last in every sublibrary that ran it first - #4551
Merged
ChrisRackauckas merged 1 commit intoSep 13, 2026
Merged
Conversation
`JET.test_package` re-evaluates a package's source into a virtual module. Every
method the package defines on a generic function owned by *another* module is
therefore replaced by a copy bound to a module that has no package extensions
loaded, and anything running afterwards in the same process exercises those
copies instead of the real methods.
`Pkg.test("OrdinaryDiffEqDifferentiation")` shows what that costs: after JET,
`is_sparse(::SparseMatrixCSC)` answers `false` because the SparseArrays
extension is absent from the virtual module, so `get_fresh_jacobian` takes its
`zero(cache.J)` branch (0 stored entries) and `decompress!` rejects it against
the 34-entry coloring pattern:
get_fresh_jacobian keeps a sparse J's pattern: Error During Test
DimensionMismatch: `A` and `bg.S2` must have the same sparsity pattern.
[5] @ Main.var"##JETVirtualModule#238".OrdinaryDiffEqDifferentiation
CI never sees it: SublibraryCI.yml runs each `test_groups.toml` group in its own
job and never the default `GROUP=ALL`, so QA and the functional tests never share
a process there. Only a local bare `Pkg.test` reproduces it.
Moving the block also fixes a second latent problem in the same files:
`activate_qa_env()` does not restore the previous project, so the groups that ran
after it were resolving against the QA environment.
Five files needed this; the other 45 sublibraries already ran QA last.
Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Agent-Harness: Claude Code 2.1.269
Agent-Model: claude-opus-5[1m]
Agent-Session: https://claude.ai/code/session_01JQATpLKMyYX3VbPPX8qdeE
Claude-Session: https://claude.ai/code/session_01JQATpLKMyYX3VbPPX8qdeE
ChrisRackauckas
marked this pull request as ready for review
September 13, 2026 09:39
ChrisRackauckas
added a commit
that referenced
this pull request
Sep 13, 2026
- Stop tying the state Jacobian's finite-difference direction to tdir (#4543) - Extend OrdinaryDiffEqCore.dtnew_modification instead of shadowing it (#4547) - Pick the DAE initialization dt by magnitude, not signed min (#4549) - Accept a callable stage predictor on the nlsolve algorithms (#4539) - Run the QA test group last in every sublibrary that ran it first (#4551) - Apply stage limiters in every StabilizedRK method (#4550) Agent-Harness: Claude Code Agent-Model: claude-opus-5[1m] Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
ChrisRackauckas
added a commit
that referenced
this pull request
Sep 13, 2026
- Stop tying the state Jacobian's finite-difference direction to tdir (#4543) - Extend OrdinaryDiffEqCore.dtnew_modification instead of shadowing it (#4547) - Pick the DAE initialization dt by magnitude, not signed min (#4549) - Accept a callable stage predictor on the nlsolve algorithms (#4539) - Run the QA test group last in every sublibrary that ran it first (#4551) - Apply stage limiters in every StabilizedRK method (#4550) - Release OrdinaryDiffEqNonlinearSolve 2.9.8 (#4552) - Declare OrdinaryDiffEqCore.dtnew_modification public (#4553) - Fix baseline spelling and whitespace checks in tests (#4524) - Raise OrdinaryDiffEqNonlinearSolve floor for stage_predictor (#4554) Agent-Harness: Claude Code Agent-Model: claude-opus-5[1m] Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.
Closes #4542. Ignore until reviewed by @ChrisRackauckas. Draft.
What changed and why
JET.test_packagere-evaluates a package's source into a virtual module. Every method the package defines on a generic function owned by another module is therefore replaced by a copy bound to a module that has no package extensions loaded, and anything that runs afterwards in the same process exercises those copies instead of the real methods.So the QA group has to run last. This moves it there in the five sublibraries that ran it before their functional tests. The block itself is unchanged — same condition, same includes, same internal ordering comment where one existed — only its position, plus a comment saying why the position matters.
Scope: five files, not forty
My first note on #4542 said all 40 sublibraries shared the QA-first layout. That was wrong — it came from a detector that matched the
activate_qa_env()function definition near the top of every file. Classifying properly, by comparing the line of the lastinclude("qa/…")against the functionalinclude(…)/@safetestset … beginentries:OrdinaryDiffEqDifferentiationDiffEqDevToolsOrdinaryDiffEqCoreOrdinaryDiffEqNonlinearSolveOrdinaryDiffEqPDIRKOrdinaryDiffEqDifferentiationis the only one where the ordering currently produces a failure, because it is the only one whose functional tests depend on an extension-provided method (is_sparse(::SparseMatrixCSC)) reached through a generic owned by another module. The other four were latent — andOrdinaryDiffEqPDIRK's andOrdinaryDiffEqNonlinearSolve's functional tests are exactly the sort that could trip over it next.Because QA-in-a-subprocess is not needed to close this, I did not go that route.
Second thing this fixes
activate_qa_env()does not restore the previous project. Every group that ran after it was therefore resolving against the QA environment rather than the test environment. Moving QA last removes that too.Verification
Pkg.testper package, Julia 1.10.11,GROUPunset so QA and the functional tests share one process — the configuration that reproduces the bug.OrdinaryDiffEqDifferentiation— the actual failure, before:after:
Note the line numbers: QA now runs after the functional tests and still passes, which was the risk worth checking — the concern with reordering is that the functional tests might leave state that JET or Aqua then object to. They do not.
OrdinaryDiffEqCore:Testing OrdinaryDiffEqCore tests passed.OrdinaryDiffEqPDIRK: every functional testset passes with QA moved after them —The two remaining are the Aqua lint already filed as #4463 ("PDIRK QA fails on Julia 1.10: stale threading imports and documented SciMLBase reexports rejected"), untouched by this diff.
DiffEqDevTools:Testing DiffEqDevTools tests passed, 0 failures, with Aqua last —OrdinaryDiffEqNonlinearSolve:5 passed, 8 failed, 0 errored, 33 broken— byte-for-byte the same counts as master, which I measured separately withGROUP=QAon unmodified master. All 8 are JET "Solver Type Stability Tests" (ABDF2, QNDF/QNDF1/QNDF2, FBDF, DFBDF, DABDF2, DImplicitEuler, MEBDF2, Rodas4), alongside 33 already marked broken. Unchanged by this diff.Formatting and spelling checked over the diff: Runic 1.10.0
--checkexit 0,typosexit 0. All five files parse (Meta.parseall). Re-running the classifier afterwards reports no remaining QA-first file.No version bumps: this is test-only, matching #4541 ("Fix Runic formatting and typos failures on master"), which touched no
Project.toml.What I did not verify
pre(the QA blocks are all gated onisempty(VERSION.prerelease)anyway, so they do not run there).SparseandModelingToolkitgroups ofOrdinaryDiffEqDifferentiationin isolation — they are excluded from the QA condition, so their ordering relative to QA is unchanged, and the fullGROUPunset run above covers them together.Worth pushing back on
include("qa/…")precedes a functional include — say so and I will send it. This PR is the minimal correct fix.🤖 Generated with Claude Code (model: claude-opus-5[1m], harness: Claude Code 2.1.269)
https://claude.ai/code/session_01JQATpLKMyYX3VbPPX8qdeE