Skip to content

Preserve invalid positional solver errors after default preparation - #4257

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/fix-diffeqbase-default-prepare
Aug 22, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/fix-diffeqbase-default-prepare

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Aug 14, 2026 •

Copy link
Copy Markdown
Member

Please ignore this PR until reviewed by @ChrisRackauckas.

What changed and why

Prepare a problem-dependent default algorithm only when the caller omitted the positional algorithm or explicitly passed nothing. Invalid positional values now continue through the normal fallback and raise NonSolverError instead of being silently replaced and dropped. The matching init(prob, 5.0) regression is covered alongside solve(prob, 5.0), and DiffEqBase is bumped to 7.18.1.

An independent runtime bisect from current master 3c20997 to good 9d92d1c identified 27faa3a as the first bad commit. That commit made prepare_alg unconditional whenever extract_alg returned nothing; for an invalid positional 5.0, this installed DefaultODEAlgorithm, entered the valid-algorithm branch, and discarded the invalid argument.

Failing before / passing after

On unfixed current master, both calls fail to throw:

Test Failed at none:1
  Expression: solve(prob, 5.0)
    Expected: SciMLBase.NonSolverError
  No exception thrown

Test Failed at none:1
  Expression: init(prob, 5.0)
    Expected: SciMLBase.NonSolverError
  No exception thrown

With this patch, the complete error-handling testset and DiffEqBase downstream group pass:

Test Summary:        | Pass  Total   Time
Solve Error Handling |   14     14  33.2s

1998.991675 seconds
Testing DiffEqBase tests passed

Local verification

  • GROUP=Downstream julia +1.12 --project=lib/DiffEqBase -e 'using Pkg; Pkg.test()': passed in 1998.99 seconds. Error handling 14/14; Enzyme 5/5; Unitful 4/4; FlexUnits 3/3; all other downstream testsets completed.
  • GROUP=QA julia +1.12 --project=lib/DiffEqBase -e 'using Pkg; Pkg.test()': Aqua 9/9; package tests passed.
  • A compiled-modules-disabled focused run of solve(prob, 5.0) and init(prob, 5.0) passed after failing on the unfixed source; the complete solve_error_handling.jl file passed 14/14.
  • Runic on the changed Julia files, typos on all three changed files, and git diff upstream/master --check: passed.

The DiffEqBase change intentionally triggers the broad CI matrix requested for this master-failure audit. Docs, GPU, and prerelease-Julia jobs were not run locally because this changes no public API or documentation and the local target is DiffEqBase downstream/error handling.

Copy link
Copy Markdown
Member Author

The same solve-error regression reproduced again in SciMLBase source-triggered downstream CI: https://github.com/SciML/SciMLBase.jl/actions/runs/32365988822/job/96415492958

solve_error_handling.jl:20
Expected: SciMLBase.NonSolverError
No exception thrown
Solve Error Handling | 12 pass, 1 fail, 13 total

This matches the clean-current-master fail-before case documented in this PR; its focused fix remains the non-duplicative path.

@ChrisRackauckas-Claude
ChrisRackauckas-Claude force-pushed the agent/fix-diffeqbase-default-prepare branch 3 times, most recently from b812a37 to e3993c9 Compare August 20, 2026 17:09
@ChrisRackauckas-Claude
ChrisRackauckas-Claude force-pushed the agent/fix-diffeqbase-default-prepare branch from e3993c9 to d3dd6e0 Compare August 20, 2026 21:53
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review August 22, 2026 07:22
@ChrisRackauckas
ChrisRackauckas merged commit a23f35c into SciML:master Aug 22, 2026
244 of 271 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