Skip to content

Reject the step instead of throwing when W is non-finite (Rosenbrock + Newton) - #4795

Draft
ChrisRackauckas-Claude wants to merge 9 commits into
SciML:masterfrom
ChrisRackauckas-Claude:ode-nonfinite-W
Draft

ChrisRackauckas-Claude wants to merge 9 commits into
SciML:masterfrom
ChrisRackauckas-Claude:ode-nonfinite-W

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Ignore until reviewed by @ChrisRackauckas.

What and why

A non-finite W made the solve throw instead of failing a step. LAPACK's dense LU (GenericFactorization(lu!)/lu, and LUFactorization above RecursiveFactorization sizes) raises ArgumentError: matrix contains Infs or NaNs, so the exception escaped solve.

This PR checks each newly formed W once, before it is factorized:

  • in-place Rosenbrock steps (RosenbrockCache, Rosenbrock23Cache, Rosenbrock32Cache) set integrator.force_stepfail = true and return. That is the unconditional step-failure signal the Newton methods use: adaptive solves shrink dt; fixed-step solves stop with ConvergenceFailure; force_dtmin cannot override it;
  • Newton compute_step! returns Inf, which is the existing linear-solve-failure path, so the nonlinear solve is marked Divergence (and sets force_stepfail).

The check is a new public helper, OrdinaryDiffEqDifferentiation.isfinite_W (docstring + public_api.md entry, Differentiation 3.12.4 → 3.13.0, Rosenbrock/NonlinearSolve compat raised to 3.13). For a CPU Matrix of Float16/32/64 or their complex types it uses a branch-free @simd sum of 0 * v; every other strided matrix (other element types such as Rational, unit-carrying numbers or BigFloat, views, and GPU arrays such as CuArray/JLArray) uses all(isfinite, W), which GPU array packages run as a reduction. Transpose/Adjoint forward to their parent, Diagonal checks its diagonal, and the SparseArrays extension checks the stored entries of a SparseMatrixCSC. Scalars use isfinite; matrix-free operators and other representations return true, so those paths are unchanged.

Relation to Waltman

This PR does not fix the master sublibrary-ci / lib/DelayDiffEq [Regression] (Waltman) job and is not needed for it. The Waltman root cause is a zero-length step with a finite Jacobian (dt == 0 makes W non-finite); #4802 fixes it by keeping tracked dependent-lag discontinuities as user tstops. #4771 (clock-alignment exemption) is superseded by #4802. This PR contains no clock-alignment or DDE-specific code. It is independent hardening: a non-finite W from any source fails the step instead of throwing out of LAPACK.

Adopted 2026-10-07 (ci-green head)

Addresses the round-1 review (Codex gpt-6-astra, CHANGES/high):

  1. Rosenbrock guards accepted failed steps in fixed-step / force_dtmin solves (previously EEst = Inf only; with adaptive=false or force_dtmin=true the solve reported Success at t=1.0 with u=[1,1] untouched). All three guards now set force_stepfail.
  2. isfinite_W threw for non-IEEE element types (DimensionError for Unitful, DivideError for 1//0). The arithmetic fast path is now restricted to IEEE float / complex float; other types use all(isfinite, W).
  3. Rosenbrock test Jacobian is now the correct -I before the NaN region; the test covers adaptive, fixed-step (adaptive=false, dt=0.1) and force_dtmin (dt=dtmin=0.1) modes.
  4. New direct API tests lib/OrdinaryDiffEqDifferentiation/test/isfinite_W_tests.jl (Float16/32/64, ComplexF32/64, BigFloat, strided views, Rational incl. ±1//0, a custom Number defining only isfinite). Unitful is not a test dependency of Differentiation, so it is covered by the generic path rather than a direct test.
  5. Branch rebased on master 5318f58.

CI round on 3b2d8f1 (22 red checks) and the fixes in 3308bca

  • PR-caused, fixed: isfinite_W scalar-indexed GPU arrays (CuArray/JLArray are StridedMatrix), failing OrdinaryDiffEqRosenbrock [GPU], OrdinaryDiffEqBDF [GPU] and tests / InterfaceV (lts and 1). The fast path now dispatches on Matrix only. New regression test: a DenseMatrix without scalar indexing in isfinite_W_tests.jl (previous head: 58 pass / 2 error; now 60/60). A local JLArray probe with Rosenbrock23, Rodas5P, ImplicitEuler, QNDF and FBDF went from Scalar indexing is disallowed to no errors.
  • PR-caused, fixed: OrdinaryDiffEqNonlinearSolve had no [sources] entry for OrdinaryDiffEqDifferentiation, so the unregistered 3.13 floor was unsatisfiable in NonlinearSolve's own environment (Core 1/lts, QA, ModelingToolkit, downgrade) and in sublibraries that source NonlinearSolve (StochasticDiffEqLeaping, StochasticDiffEqWeak: Core, QA, downgrade). The IMEXMultistep QA group environment lists Differentiation directly and needed the same source. Local check on Julia 1.13: before, Pkg.resolve() for StochasticDiffEqLeaping gave Unsatisfiable ... restricted to versions 3.13.0 - 3 by OrdinaryDiffEqNonlinearSolve, and the IMEXMultistep QA environment failed the same way through OrdinaryDiffEqRosenbrock. After, NonlinearSolve, Leaping, Weak and the IMEXMultistep QA environment all resolve with Differentiation 3.13.0 taken from the local path.

Review round 2 (Grok 4.7, MERGE/low) follow-ups in 832287b

  • Non-blocking Wrap LSODE #3: isfinite_W now checks Transpose/Adjoint (via the parent), Diagonal, and SparseMatrixCSC stored entries, instead of returning true. New tests: 70/70; the same tests on 3308bca fail 6 (the NaN cases for transpose, adjoint, complex transpose/adjoint, Diagonal, sparse). Differentiation GROUP=QA: JET 1/1, Aqua 19/19, passed.

  • Non-blocking Native Adams-Bashforth-Moulton methods #4 (downgrade-sublibraries / test (lib/OrdinaryDiffEqNonlinearSolve), nsa_stats_tests.jl:91, 1.2823529411764707 <= 1.0119521912350598 + 0.25): the code in this PR does not cause it. The downgrade environment does. Evidence, from a local replica of that job's environment (Julia 1.11.9, --check-bounds=yes, every package at the version in the job's manifest; it reproduces the exact numbers):

    • PR head: QNDF excess (1.0119521912350598, 1.2823529411764707), 38 pass / 1 fail.
    • Same environment with NonlinearSolve's src set to master's (no non-finite W guard): identical numbers, 38/1.
    • Same environment with master's NonlinearSolve, Core and DiffEqBase, and the registered OrdinaryDiffEqDifferentiation 3.10.0 (that is, no code from this PR at all): identical numbers, 38/1.
    • A replica of master's passing job (registered Core 4.14.0, DiffEqBase 7.10.0, SciMLBase 3.46.0, Differentiation 3.10.0): (1.012, 1.104), 39/39.

    The difference is the environment. The 3.13 floor plus the path source make that job resolve the in-repo DiffEqBase 7.21.3 and Core 4.18.1, which require SciMLBase 3.53. Master's job instead resolves registered DiffEqBase 7.10.0 and Core 4.14.0 with SciMLBase 3.46. In the PR's environment, moving SciMLBase or Core up (with the resolver adjusting the rest) brings the excess down to 1.157 and the test passes. So the bound fails only for master's current code combined with the lowest compatible versions of the other dependencies. On master that combination is never tested, because master's downgrade job resolves older registered Core and DiffEqBase and its non-downgrade Core job aborts at the master-red "Newton Tests" before reaching nsa_stats_tests.jl. The 0.25 bound is unchanged.

Verification (Julia 1.12, normal bounds mode unless stated, sublibraries from this branch)

Fail-before (new tests, with this PR's previous src — i.e. EEst = Inf guards and the unrestricted 0*v helper) / pass-after:

# before: previous PR head src
all                          | Pass 56  Fail 36  Error 4  Total 96
  Non-finite W fails the step |  18    36            54   (every assertion fails in all 12 fixed + 12 force_dtmin cases; adaptive cases pass)
  isfinite_W                  |  errors: 4 (DivideError on the 1//0 and -1//0 matrices)
# after: this branch
all                          | Pass 142  Total 142   (Rosenbrock 54, isfinite_W, NonlinearSolve non-finite W 30)

All-NaN Jacobian, GenericFactorization(lu!), u0=[1,1], tspan=(0,1):

Rodas5P       fixed        retcode=ConvergenceFailure t=0.0 u=[1.0, 1.0]
Rodas5P       force_dtmin  retcode=MaxIters t=0.0 u=[1.0, 1.0]
Rosenbrock23  fixed        retcode=ConvergenceFailure t=0.0 u=[1.0, 1.0]
Rosenbrock23  force_dtmin  retcode=MaxIters t=0.0 u=[1.0, 1.0]
Rosenbrock32  fixed        retcode=ConvergenceFailure t=0.0 u=[1.0, 1.0]
Rosenbrock32  force_dtmin  retcode=MaxIters t=0.0 u=[1.0, 1.0]
ImplicitEuler fixed        retcode=ConvergenceFailure t=0.0 u=[1.0, 1.0]
ImplicitEuler force_dtmin  retcode=MaxIters t=0.0 u=[1.0, 1.0]

Rosenbrock now matches the Newton methods exactly.

Groups:

GROUP=Core  OrdinaryDiffEqRosenbrock: DAE AD 16/16, Callback-truncated interpolation 2628/2628, AD 65/65,
            Convergence 227/227, Non-finite W 54/54 -> "OrdinaryDiffEqRosenbrock tests passed"
GROUP=QA    OrdinaryDiffEqDifferentiation (head 3308bca7): JET 1/1, Aqua 19/19, JVPCache allocation 13 pass + 2 broken
            (pre-existing) -> "OrdinaryDiffEqDifferentiation tests passed"
GROUP=Core  OrdinaryDiffEqNonlinearSolve (head 3308bca7): Developer API 27/27, then "Newton Tests" errors with
            LineSearchException, which aborts the group. The same error is in master's CI log for 1d8605178. The
            non-finite W file was run directly instead: 30/30.
GROUP=Core  OrdinaryDiffEqDifferentiation: errors in "ScalarOperator mass matrix" (diag(::ScalarOperator) MethodError),
            which aborts the group; the identical error reproduces on master 5318f58c7 (5 pass / 1 error). Master-red,
            addressed by https://github.com/SciML/OrdinaryDiffEq.jl/pull/4780 / https://github.com/SciML/OrdinaryDiffEq.jl/pull/4582.
GROUP=QA    OrdinaryDiffEqRosenbrock: Allocation 20 broken (pre-existing), Inference 39 pass / 1 error:
            "Rosenbrock32 is unstable on DAEs (singular mass matrix)" from #4653's guard; this PR does not touch the cache
            or QA test. Master-red, addressed by https://github.com/SciML/OrdinaryDiffEq.jl/pull/4668 / #4780. The error
            aborts the QA run, so Rosenbrock Aqua/JET did not run locally.
Runic --check on changed files: exit 0.  typos on changed files: exit 0.

isfinite_W cost per new W (normal bounds mode, OPENBLAS_NUM_THREADS=1, BenchmarkTools @belapsed, Float64):

n=6    isfinite_W = 10.0 ns    lu! = 540 ns     (1.86%)
n=50   isfinite_W = 305 ns     lu! = 22.1 µs    (1.38%)
n=200  isfinite_W = 5.0 µs     lu! = 367 µs     (1.36%)

With --check-bounds=yes the reviewer measured about 10% / 23% / 22% of lu!, since bounds checking blocks the vectorization; that mode is the test/CI mode, not production.

Red checks not caused by this PR (also red on master)

  • sublibrary-ci / lib/OrdinaryDiffEqDifferentiation / Core (1, lts) and downgrade-sublibraries / test (lib/OrdinaryDiffEqDifferentiation): diag(::ScalarOperator) MethodError in "ScalarOperator mass matrix". Reproduced locally on master 5318f58; the master runs of these checks fail too.
  • sublibrary-ci / lib/OrdinaryDiffEqRosenbrock [QA]: Rosenbrock32 inference test hits Rosenbrock32: refuse singular mass matrices (#4650) #4653's singular-mass-matrix guard (master 1d86051: failure).
  • sublibrary-ci / lib/DelayDiffEq [Regression]: Waltman (master 5318f58: failure; fixed by DelayDiffEq: coalesce tracked dependent-lag discontinuities (fixes Waltman dt = 0) #4802).
  • downgrade-sublibraries / test (lib/DiffEqBase): high_level_solve.jl failures (master 5318f58, 1d86051, cceca42: failure).
  • sublibrary-ci / lib/OrdinaryDiffEqNonlinearSolve / Core (1 and lts): once resolution works, "Newton Tests" errors with LineSearchException: Search direction is not a direction of descent, the same as master 1d86051.
  • tests / GPU (julia 1, self-hosted Linux X64 gpu): QNDF [jac=none|CSC|CSR, mass=diag_cu] gpu_mismatch at test/gpu/dae_tests.jl:481 (170 pass / 3 fail / 12 broken), identical on master 6072e89 and 5318f58. The check fails on every master commit since 0fd3326.
  • downgrade-sublibraries / test (lib/OrdinaryDiffEqNonlinearSolve): nsa_stats_tests.jl:91 QNDF excess bound. This PR exposes it but does not cause it: master's code alone fails it in this job's environment (see "Review round 2" above).
  • SciMLSensitivity.jl/Core1 Downstream: Mooncake with MooncakeAdjoint (MethodError: no constructors have been defined for Any, 241 pass / 1 error), identical on master 6072e89; tracked by Mark CallbackCache as non-differentiable for Mooncake #4688.

Not verified locally

  • Everything in NonlinearSolve's Core group after the master-red Newton Tests file (only its non-finite W test file was run, 30/30). Real CUDA (only JLArray emulation locally). Rosenbrock Aqua/JET (blocked by the master-red inference error above). The docs build (the only docs change is one @docs line).
  • The OOP paths. calc_W calls DiffEqBase.default_factorize inside the Jacobian construction, so a non-finite OOP dense W can still reach the factorization (the reviewer's 2×2 OOP probes returned Unstable without throwing). Other dolinsolve(A = W) callers (Extrapolation, MultirateImplicit, FIRK) are unchanged.
  • With force_dtmin=true a permanently non-finite W ends at MaxIters after maxiters failed attempts (the same as ImplicitEuler today), not at an immediate failure.
  • After a non-finite W, the LinearSolve cache keeps the last good factorization. Rosenbrock always rebuilds W after a failed step; for Newton, Divergence forces a W rebuild (do_newJW), which the reviewer confirmed with a stiffness-jump probe.

Risk assessment

  • Risk: low
  • Blast radius: In-place Rosenbrock (RosenbrockCache, Rosenbrock23Cache, Rosenbrock32Cache) and Newton steps with a dense W. Behavior changes only on steps whose W already contains Inf/NaN, which previously threw (or, in the previous PR head, were silently accepted under fixed stepping). Adds one public function. Differentiation minor bump, compat raises in Rosenbrock and NonlinearSolve.
  • Evidence: fail-before/pass-after above (36 failures + 4 errors before, 142/142 after); Rosenbrock Core and Differentiation QA pass; the remaining local reds reproduce on master.
  • Independent review: Grok 4.7 (round 2, on 3308bca) rated it MERGE/low with no blocking findings; non-blocking Wrap LSODE #3 and Native Adams-Bashforth-Moulton methods #4 are addressed above. Round 1: Codex gpt-6-astra, CHANGES/high, findings addressed.
  • Merge: needs human review: adds public API.

🤖 Generated with Claude Code (model: claude-opus-5-5[1m]) https://claude.ai/code/session_011aK5Xvp9NpdkzKuEwtiMGd

🤖 Automated review section from an AI agent running as Chris Rackauckas's account — not written or reviewed by Chris.

Assigned correction of 0d7329a

This correction is queued to a fresh Codex CLI worker, model gpt-6.1-sol, under the SciML submaster’s pipeline ownership. Scope: Fresh CHANGES/ML7+ML4: PRdependencyminimumselection fails residual-work downgrade assertion although normalbase39/39passes; same failing combination alsofails pristinebase, so fixcompat prerequisite/minimum selection without looseningassertion. Addvector-backed transpose/adjoint nonfinitecoverage orhonestdocconstraint. Preservepublicisfinite_W/docs/minorversion and exactfinite-path saved-state. BaselineNewtonfailureseparate; GPU onlyexistingCI, nolocalGPU.

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)

🤖 Automated review section from an AI agent running as Chris Rackauckas's account — not written or reviewed by Chris.

Fresh independent review of 0d7329a

CHANGES/medium-lowML7+ML4. New selected minimum dependency combination fails the unchanged residual-work downgrade assertion: head24accountingpass+14/15residual, normalbase39/39passes. Pristine base source in the PR-selected dependency environment also fails identically, isolating dependency selection rather than the new guard. Land compatible prerequisite/minimum combination; do not loosen assertion. New public finite-W guard is documented/versioned and has strong positive coverage: RosenbrockCore2990, Differentiation294, newhelper70/Rosenbrock54/Newton30, analytic saved-state40/JLArray12, IEEE351, eight exactfinite-path comparisons; existingCUDA83 CI checks pass. Vector-backed transpose/adjoint nonfinite parents currently returntrue via fallback; cover or document. Existing baseNewton LineSearchException separately needs current-default investigation. LocalQA blockedbyJET/ReviseEMFILE, no localQA pass; CIQA/docs/GPU positive distinguished. Required merge attribution repair remains. Fresh code fixer queued; no merge until dependency gate clears.

Risk assessment

  • Risk: medium-low (ML7, ML4).
  • Blast radius: the affected solver/test/benchmark entrypoints described above; no additional coverage is inferred.
  • Evidence: separate reviewer executions and negative controls described above; limitations retained.
  • Independent review: Codex CLI 0.163.0 (gpt-6.1-sol), local session 01a1564f-ffb4-7c62-879a-9d99b2416650 (no session URL), rated it medium-low (ML7, ML4), high confidence in the observed findings; VERDICT: CHANGES at head 0d7329a.
  • Merge: needs human review for medium/high; otherwise hold until findings and live gates are resolved.

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)

🤖 Automated review section from an AI agent running as Chris Rackauckas's account — not written or reviewed by Chris.

Fix by Codex CLI 0.164.0 gpt-6.1-sol (head 156a482)

The selected minimum environment now requires NonlinearSolveBase 2.46, ConstructionBase 1.6, and LinearSolve 5.17. These supply the termination accounting, Jacobian-wrapper construction, and generic-factorization fixes demonstrated below. Transpose/adjoint matrices with vector parents now reduce those vectors for non-finite entries, with 18 new assertions. Five finite-system controls compare generic factorization with LU without changing existing assertions.

Merged current default into the branch normally, preserving its cache-held algorithm arguments and this PR's three Rosenbrock rejection guards. Added the Core path source needed by NonlinearSolve's active environment. Differentiation's public helper, documentation entry, and 3.13 minor version remain together. LinearSolve's license was checked as MIT; no direct dependency was added.

Failing-before / passing-after controls

Control Unfixed output Fixed output
Vector-backed transpose/adjoint 74 passed, 14 failed 88 passed
Unchanged residual-work test 38 passed, 1 failed; 1.2823529411764707 <= 1.2619521912350598 39 passed; QNDF excess 1.1568627450980393
Jacobian resize on Julia 1.13 23 passed, 1 errored; ConstructionBase 1.5.8 cannot resolve SciMLBase.UJacobianWrapper 27 passed with only ConstructionBase changed to 1.6.0
Finite generic factorization 30 non-finite assertions pass, then defaultalg_symbol generated-function world-age error with LinearSolve 5.15 all 45 finite/non-finite assertions pass with LinearSolve 5.17.0

The residual failure reproduced both before and after the default-branch merge. Updating only SciMLBase also left it unchanged. The termination comparison changes only NonlinearSolveBase 2.45.0 to 2.46.0; the construction and factorization comparisons each change only the named dependency. No assertion was loosened or disabled.

Commands for the first two negative controls (environment paths represented by variables):

julia +1.11.9 --project="$UNFIXED_ENV" --check-bounds=yes -e 'include("lib/OrdinaryDiffEqDifferentiation/test/isfinite_W_tests.jl")'
julia +1.11.9 --project="$UNFIXED_ENV" --check-bounds=yes -e 'include("lib/OrdinaryDiffEqNonlinearSolve/test/nsa_stats_tests.jl")'
julia +1.11.9 --compiled-modules=existing --project="$TWO_FLOOR_ENV" --check-bounds=yes -e 'include("lib/OrdinaryDiffEqNonlinearSolve/test/nonfinite_W_tests.jl")'

Final local validation

All runs use at most four Julia threads, one BLAS thread, and no more than three simultaneous Julia processes. MINIMUM_ENV below denotes the prepared minimum environment: NonlinearSolveBase 2.46.0, ConstructionBase 1.6.0, LinearSolve 5.17.0, SciMLBase 3.53.0, LineSearches 7.5.1, and the in-repo Core/Differentiation/DiffEqBase/NonlinearSolve sources. The existing package runner executes the complete Core group.

GROUP=Core julia +1.13.3 --compiled-modules=existing --project="$MINIMUM_ENV" --check-bounds=yes -e 'using Pkg; Pkg.instantiate(); include("lib/OrdinaryDiffEqNonlinearSolve/test/runtests.jl")'

Exit 0; totals aggregated from its tables: 1,545 passed, 40 existing broken. Tail:

NonlinearSolveAlg DAEProblem Tests |   32     32  1m01.5s
NonlinearSolveAlg nlstep_data Field Tests |   11     11  3m44.7s

The unchanged stats table within that full run is NonlinearSolveAlg Stats Tests | 39 39. The separate Julia 1.11.9 final-minimum regression run passed minimum dependency regressions | 172 172. The finite probe passed finite trajectories compare | 40 40: all saved times and states exactly match the original head across eight native solvers plus FBDF/QNDF with NonlinearSolveAlg, for u′ = -u, initial state [1,2], interval [0,1], GenericFactorization(lu!), reltol=1e-6, abstol=1e-9. Analytic agreement within 1% was asserted separately. This minimum probe selects registered Rosenbrock 2.6.1; the actual local Rosenbrock 2.7.6 is covered by the full Core run below.

GROUP=Core julia +1.13.3 --compiled-modules=existing --project=lib/OrdinaryDiffEqDifferentiation -e 'using Pkg; Pkg.test(; julia_args=["--compiled-modules=existing"])'
GROUP=Core julia +1.13.3 --compiled-modules=existing --project=lib/OrdinaryDiffEqRosenbrock -e 'using Pkg; Pkg.test(; julia_args=["--compiled-modules=existing"])'

Both exit 0: Differentiation 314 passed, Rosenbrock 2,990 passed. Output tails:

isfinite_W | 88 88
Testing OrdinaryDiffEqDifferentiation tests passed
Non-finite W Tests | 54 54
Testing OrdinaryDiffEqRosenbrock tests passed
GROUP=QA julia +1.13.3 --compiled-modules=existing --project=lib/OrdinaryDiffEqDifferentiation -e 'using Pkg; Pkg.test(; julia_args=["--compiled-modules=existing"])'
GROUP=QA julia +1.13.3 --compiled-modules=existing --project=lib/OrdinaryDiffEqNonlinearSolve -e 'using Pkg; Pkg.test(; julia_args=["--compiled-modules=existing"])'

Both rerun on final metadata and exit 0, with the file-descriptor limit raised to 65536:

JET Tests | 1 1
Aqua | 19 19
JVPCache allocation | 13 2 15
Testing OrdinaryDiffEqDifferentiation tests passed
JET Tests | 13 33 46
Aqua | 41 41
Testing OrdinaryDiffEqNonlinearSolve tests passed

The allocation and JET broken counts are pre-existing annotations; none were added.

julia +1.13.3 --compiled-modules=existing --project=@runic -m Runic --check lib/OrdinaryDiffEqDifferentiation/src/linsolve_utils.jl lib/OrdinaryDiffEqDifferentiation/test/isfinite_W_tests.jl lib/OrdinaryDiffEqNonlinearSolve/test/nonfinite_W_tests.jl lib/OrdinaryDiffEqRosenbrock/src/rosenbrock_perform_step.jl
git diff --name-only upstream/master -- | xargs -r typos --
git diff --cached --check

Exit 0, no diagnostics. Runic --inplace was also run before the checks. The Rosenbrock GPU, StochasticDiffEq QA, and DiffEqBase downstream environments all resolve on the final metadata; this is resolution evidence, not GPU execution.

Baseline failures and limits

The requested Core4 assertion also occurs in a default-branch push; latest default Core4 passes. No code change was made for that assertion. The default Newton line-search failure is separately tracked by existing fixes; the minimum full Core run above passes its six Newton assertions.

The docs command was attempted:

julia +1.13.3 --compiled-modules=existing --project=docs -e 'using Pkg; Pkg.instantiate(); include("docs/make.jl")'

It exits 1 loading TaylorDiff: TypeError: non-boolean (Symbolics.Num) used in boolean context. A separate investigation reproduces it on a verified clean current-default archive and reduces it to standalone TaylorDiff without any SciML package: ChainRules 1.74.10 loads; 1.74.11 and 1.74.12 fail with all other 98 dependency versions identical. Existing upstream issue 113 tracks it. No production workaround was added.

An earlier full Julia 1.11 Core attempt with superseded ConstructionBase 1.5.8 timed out at 3600 seconds; it is not counted as a full pass. The final full group ran on Julia 1.13.3, with final-minimum targeted coverage on Julia 1.11.9. No local CUDA execution, full downstream rerun, or completed rendered-docs build is claimed.

Next counted review must come from a smart model in a fresh session, not this fix session (risk.md § Independent reviews).

Links:


🤖 Posted by an AI agent — harness: Codex CLI 0.164.0 · model: gpt-6.1-sol
Conversation: local fixer job SciML__OrdinaryDiffEq.jl__4795 (no session URL)

🤖 Automated review section from an AI agent running as Chris Rackauckas's account — not written or reviewed by Chris.

Fix by Codex CLI 0.164.0 gpt-6.1-sol (head 2b970eb)

Merged current master normally to take the TaylorDiff 0.3.6 compatibility floors in both Taylor sublibraries. Both supplied failures were TaylorDiff 0.3.5 load errors: TypeError: non-boolean (Symbolics.Num) used in boolean context. Current-default Core and QA checks pass with 0.3.6. The merge also carries master's MagnusGauss4 correction. No additional solver source or test assertions were changed by this fix.

Local validation

All Julia runs used Julia 1.13.3, two Julia threads, one BLAS thread, disabled automatic precompilation, and shell timeouts of 3600 seconds. At most three Julia processes ran simultaneously. Variables below identify isolated validation environments and scripts; no global package environment was modified.

The load regression was reproduced before and after the dependency update:

julia +1.13.3 --compiled-modules=existing --project="$LOAD_ENV" -e 'using Pkg; Pkg.add(PackageSpec(name="TaylorDiff", version="0.3.5")); using TaylorDiff; println("TaylorDiff load succeeded")'
# exit 1: ERROR: LoadError: TypeError: non-boolean (Symbolics.Num) used in boolean context
julia +1.13.3 --compiled-modules=existing --project="$LOAD_ENV" -e 'using Pkg; Pkg.add(PackageSpec(name="TaylorDiff", version="0.3.6")); using TaylorDiff; println("TaylorDiff load succeeded")'
# exit 0: TaylorDiff load succeeded

TaylorDiff was the only retained dependency whose version changed; its update removed 54 transitive dependencies and added none.

GROUP=Core julia +1.13.3 --compiled-modules=existing --project=lib/OrdinaryDiffEqTaylorSeriesImplicit -e 'using Pkg; Pkg.test(; julia_args=["--compiled-modules=existing"])'
GROUP=QA julia +1.13.3 --compiled-modules=existing --project=lib/OrdinaryDiffEqTaylorSeriesImplicit -e 'using Pkg; Pkg.test(; julia_args=["--compiled-modules=existing"])'

Both exit 0. This package's runner does not branch on GROUP; the QA-labelled CI invocation runs the same convergence suite.

Implicit Solver Convergence Tests | 4 4 43.9s  # Core
Testing OrdinaryDiffEqTaylorSeriesImplicit tests passed
Implicit Solver Convergence Tests | 4 4 44.9s  # QA invocation
Testing OrdinaryDiffEqTaylorSeriesImplicit tests passed

The latest review's rejection/retry verification request was also exercised:

GROUP=Core julia +1.13.3 --compiled-modules=existing --project=lib/OrdinaryDiffEqRosenbrock -e 'using Pkg; Pkg.test(; julia_args=["--compiled-modules=existing"])'
julia +1.13.3 --compiled-modules=existing --project="$UNGUARDED_ENV" "$GUARD_RUNNER"
julia +1.13.3 --compiled-modules=existing --project="$GUARDED_ENV" "$GUARD_RUNNER"
julia +1.13.3 --compiled-modules=existing "$RECOVERY_RUNNER"

Rosenbrock Core exits 0, 2990 passed. Output:

DAE Rosenbrock AD Tests | 16 16
Callback-truncated interpolation | 2628 2628
Rosenbrock AD Tests | 65 65
Rosenbrock Convergence Tests | 227 227
Non-finite W Tests | 54 54
Testing OrdinaryDiffEqRosenbrock tests passed

The guard control runs the two existing non-finite-W regression files in matching dependency environments. Removing only the three Rosenbrock guards and the Newton guard in scratch source copies gives 51 passed, 6 failed, 14 errored, exit 1, including ArgumentError: matrix contains Infs or NaNs. The guarded source gives 99/99, exit 0: Rosenbrock 54, Newton 45 including finite-factorization controls.

The recovery probe uses u′ = -u², initial state [1,2], GenericFactorization(lu!), and one NaN Jacobian injection after t=0.25. Native Newton methods use the documented NLNewton(always_new=true) option so the injection actually occurs. Rodas5P, Rosenbrock23, Rosenbrock32, ImplicitEuler, TRBDF2, FBDF and QNDF each receive exactly one injection, return Success at t=1, and agree with the analytic solution at all saved states within 1%: 28/28, exit 0. An initial probe failed because of an unqualified API name and callback-based stimulation that did not exercise the intended Newton path; its assertions were retained while those probe defects were corrected.

julia +1.13.3 --compiled-modules=existing --project=docs -e 'using Pkg; Pkg.instantiate(); include("docs/make.jl")'
julia +1.13.3 --compiled-modules=existing --project=@runic -m Runic --inplace lib/OrdinaryDiffEqLinear/src/linear_perform_step.jl lib/OrdinaryDiffEqLinear/test/linear_method_tests.jl
git diff --cached --name-only -z | xargs -0 typos --
git diff --cached --check

All exit 0. Runic made no changes. Docs reached:

[ Info: Doctest: running doctests.
[ Info: CheckDocument: running document checks.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: Automatic `version="7.8.2"` for inventory from ../Project.toml

Documenter emitted HTML/search-index size warnings and skipped deployment in the local environment.

Confirmed baseline failure and limits

GROUP=Core julia +1.13.3 --compiled-modules=existing "$NONLINEAR_RUNNER"

This prepares the declared dependencies, extras and compatibility constraints, then invokes the package's existing test/runtests.jl. It exits 1: Developer API 27/27, Anderson resize 352/352, then Newton 4 passed, 1 errored with LineSearchException: Search direction is not a direction of descent. Step length: 0.0.

A separate Codex CLI 0.164.0 gpt-6.1-sol investigator reproduced 4 passed, 1 errored on pristine current master 760d930, verifying all 1601 source blobs and retaining the same external dependency versions. Changing only LineSearches 7.8.2 to 7.7.1 gives 6/6. Independently reversing only the six-line Core dt-rounding hunk from 498c765 gives 6/6 with all dependencies unchanged. These controlled reversals identify the dependency condition and source exposure trigger; they are not a complete historical bisect or a claimed first-bad LineSearches release. The existing line-search fix remains separate; no baseline workaround was added here.

The NonlinearSolve Core files after Newton did not run in the full group; its 45 finite/non-finite-W assertions ran separately above. No local CUDA execution, full downstream rerun, downgrade matrix, or Linear Core/QA rerun is claimed. The separate baseline investigation is not a counted review of this PR.

Next counted review must come from a smart model in a fresh session, not this fix session (risk.md § Independent reviews).

Links:


🤖 Posted by an AI agent — harness: Codex CLI 0.164.0 · model: gpt-6.1-sol
Conversation: local fixer job SciML__OrdinaryDiffEq.jl__4795 (no session URL)

ChrisRackauckas and others added 3 commits October 8, 2026 10:53
LAPACK's dense LU throws `ArgumentError: matrix contains Infs or NaNs` on a
non-finite matrix, so a NaN/Inf Jacobian aborted the whole solve with an
exception (seen on the DelayDiffEq Waltman regression test with
`GenericFactorization(lu!)`). Check each newly formed W once before it is
factorized: in-place Rosenbrock steps set `EEst = Inf` and return, and the
Newton step reports divergence, so adaptive stepping shrinks dt and the solve
ends with a failure retcode when it cannot recover.

Adds the public `OrdinaryDiffEqDifferentiation.isfinite_W` helper (minor bump
to 3.13.0) and regression tests for Rosenbrock and Newton-based methods.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Agent-Harness: Claude Code (subagent of ci-green head)
Agent-Model: claude-opus-5-5[1m]
Agent-Session: https://claude.ai/code/session_011aK5Xvp9NpdkzKuEwtiMGd
…te_W

Setting EEst = Inf did not stop fixed-step or force_dtmin solves: time
advanced with an untouched state and the solve reported Success. The three
in-place Rosenbrock guards now set integrator.force_stepfail, so fixed-step
solves end in ConvergenceFailure like the Newton methods and adaptive solves
shrink dt.

isfinite_W keeps the vectorized 0*v accumulation only for IEEE float and
complex float element types and uses all(isfinite, W) otherwise, so Rational
and unit-carrying matrices return a Bool instead of throwing.

Tests: fixed-step and force_dtmin modes in the Rosenbrock non-finite W tests
(with the correct -I Jacobian before the NaN region) and direct isfinite_W
API tests.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Agent-Harness: Claude Code (subagent of ci-green head)
Agent-Model: claude-opus-5-5[1m]
Agent-Session: https://claude.ai/code/session_011aK5Xvp9NpdkzKuEwtiMGd
Base.IEEEFloat is not public, which the ExplicitImports QA check rejects.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Agent-Harness: Claude Code (subagent of ci-green head)
Agent-Model: claude-opus-5-5[1m]
Agent-Session: https://claude.ai/code/session_011aK5Xvp9NpdkzKuEwtiMGd
ChrisRackauckas and others added 3 commits October 8, 2026 14:24
…Differentiation

GPU arrays (CuArray, JLArray) are StridedMatrix too, so the elementwise
@simd fast path scalar-indexed them inside Rosenbrock and Newton steps. The
fast path now dispatches on Matrix only; other strided matrices use
all(isfinite, W), which GPU array packages implement as a reduction.

OrdinaryDiffEqNonlinearSolve requires OrdinaryDiffEqDifferentiation 3.13,
which is not registered yet, and it had no [sources] entry for it, so its own
environment and every sublibrary that sources it failed to resolve. The
IMEXMultistep QA environment lists Differentiation directly and needs the same
path source.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Agent-Harness: Claude Code (subagent of ci-green head)
Agent-Model: claude-opus-5-5[1m]
Agent-Session: https://claude.ai/code/session_011aK5Xvp9NpdkzKuEwtiMGd
These previously fell through to the `true` fallback, so a non-finite W in
one of those representations was not detected. Wrappers forward to their
parent, Diagonal checks its diagonal, and the SparseArrays extension checks
the stored entries of a SparseMatrixCSC.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Agent-Harness: Claude Code (subagent of ci-green head)
Agent-Model: claude-opus-5-5[1m]
Agent-Session: https://claude.ai/code/session_011aK5Xvp9NpdkzKuEwtiMGd
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-4795/log.txt
@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

Merged the default branch into this PR (clean merge, no conflicts; head 8a25daa) 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
Conversation: local Claude session 3c311569-dda6-4687-bc9f-65febb212c33 (fleet master)

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

Independent review (Codex CLI 0.166.0 / gpt-6.1-sol), session 01a1977d-4a1a-7ef3-8a67-85f16a97bb2e, reviewed head 0d7329a

  • Verdict: CHANGES
  • Risk: medium-high (MH1: core solver error/rejection behavior changes; ML7 public helper and ML4 dependency lower bounds also apply).
  • Round / slot: 1 / 1
  • Blocking priorities: P2

Review written by the reviewer named above 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: Adds a public finite-matrix check and rejects non-finite Newton/Rosenbrock systems before factorization. The new minimum dependency selection still fails an existing residual-work assertion and needs repair before merging.

Blast radius: In-place Rosenbrock23/32 and shared RosenbrockCache methods, including Rodas5P; in-place NLNewton users including FBDF/QNDF and SDIRK; dense, diagonal, transposed/adjoint and sparse matrix predicates.

Evidence: Blind diff assessment frozen in INITIAL.md before author context. Head matches target. CI: 188 success, four failures, three skipped; inspected failed logs and current-master counterparts. Local head regression execution passed 154/154 on Julia 1.13.2; the same added solver tests fail on the merge-base (36 pass, six fail, 14 errors); finite-path trajectories match the base exactly across eight solvers. The final probe confirms Rosenbrock recovery, while Newton recovery injection did not trigger.

Blocking findings

  1. [P2] The raised Differentiation floor and new path source select a dependency combination that fails the existing work-regression contract — lib/OrdinaryDiffEqNonlinearSolve/Project.toml:51, lib/OrdinaryDiffEqNonlinearSolve/Project.toml:69. Confirmed by running CI, not yet reproduced locally: the PR's downgrade job reaches lib/OrdinaryDiffEqNonlinearSolve/test/nsa_stats_tests.jl:91 and evaluates 1.2823529411764707 <= 1.2619521912350598, failing one of 15 residual-work assertions. Its resolved environment uses Differentiation 3.13.0, Core 4.19.0, DiffEqBase 7.21.4 and SciMLBase 3.53.0. Current master's corresponding downgrade job passes the same unchanged stats test (39/39) and resolves Differentiation 3.10.0, Core 4.14.0, DiffEqBase 7.10.0 and SciMLBase 3.46.0. The evidence establishes an unresolved dependency-combination failure, not that the new finite check itself adds residual evaluations. Land the necessary prerequisite or tighten the relevant compatible minimum versions, then demonstrate the unchanged assertion passing in downgrade CI. PR failure, master counterpart.

Non-blocking findings

  1. non-blocking — Vector-backed transpose/adjoint matrices bypass the finite check: lib/OrdinaryDiffEqDifferentiation/src/linsolve_utils.jl:35. Confirmed by running: both isfinite_W(transpose([NaN])) and isfinite_W(adjoint([NaN])) return true, whereas all(isfinite, W) returns false. These are valid 1×1 matrices, but forwarding to the vector parent hits the generic true fallback. Add vector-parent reduction coverage or explicitly document the narrower matrix-parent support; no affected solver construction was demonstrated.

What I ran

  • codex --version: exit 0, codex-cli 0.166.0.

  • gh pr view 4795 --repo SciML/OrdinaryDiffEq.jl --json number,url,state,isDraft,headRefOid,baseRefName,baseRefOid: exit 0; OPEN, draft, target head unchanged.

  • git fetch origin '+refs/pull/4795/head:refs/remotes/pr/4795' master; git checkout --detach pr/4795; git fetch origin '+refs/heads/master:refs/remotes/origin/master'; git rev-parse HEAD origin/master; git merge-base origin/master HEAD; git diff origin/master...HEAD: exit 0. Diff is 18 files, 168 additions, six deletions. Merge-base for regression execution is 59ba40e; Base above names fetched master.

  • sha256sum INITIAL.md > INITIAL.sha256: exit 0 before reading PR body or commit bodies. git log -1 --no-merges --format=%B origin/master..HEAD supplies author trailers.

  • gh pr checks 4795 --repo SciML/OrdinaryDiffEq.jl: exit 1. gh run list --repo SciML/OrdinaryDiffEq.jl --branch master --event push --limit 5 --json databaseId,headSha,conclusion,workflowName,url and the same list restricted to workflow Downgrade Sublibraries: exit 0.

  • Inspected failed logs using gh run view RUN --repo SciML/OrdinaryDiffEq.jl --log-failed for PR runs 38868629266, 38868629626 and 38868629309, and current-master runs 41249816432 and 41249816054; successful master downgrade job 124703376122 in run 41249815976. Initial log download failed because the default CLI cache was read-only; setting XDG_CACHE_HOME="$PWD/tmp/cache" succeeded, exit 0.

  • git diff 59ba40e4b5bbae713d8df7b792f6ea62f033ff78..origin/master -- lib/OrdinaryDiffEqNonlinearSolve/test/nsa_stats_tests.jl lib/OrdinaryDiffEqNonlinearSolve/test/runtests.jl lib/OrdinaryDiffEqNonlinearSolve/Project.toml: exit 0; the stats assertions and test wiring are unchanged, and the project differs only in patch version.

  • The two PR Newton Core failures are LineSearchException: Search direction is not a direction of descent. Step length: 0.0; the identical failure appears in current master Sublibrary CI. The PR's SciMLSensitivity Core4 failure is AssertionError: mi2 !== nothing in Enzyme's threaded ensemble rule; the identical failure appears in current master IntegrationTest. Neither is attributed to this PR.

  • Inspected Rosenbrock Core: DAE AD 16/16, Rosenbrock AD 65/65, convergence 227/227, new non-finite tests 54/54. Inspected Rosenbrock GPU: 83/83 passed. These provide actual CI execution for GPU and AD paths; a mock GPU array alone would not establish G2.

  • Julia run 1: JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 JULIA_NUM_PRECOMPILE_TASKS=4 JULIA_PKG_PRECOMPILE_AUTO=0 TMPDIR="$PWD/tmp/head" JULIA_DEPOT_PATH="${SHARED_DEPOT}:" timeout 3600 julia +1.13.2 --startup-file=no run-head.jl: exit 0, Julia 1.13.2. Here SHARED_DEPOT denotes the depot specified by TARGET. The harness activates a temporary external environment, develops the local solver/Core/Differentiation/DiffEqBase/Tableaus packages, and includes the three added files in separate modules. Output: PR added tests at head | 154 154; 70 predicate, 54 Rosenbrock, 30 Newton assertions pass.

  • Julia run 2: JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 JULIA_NUM_PRECOMPILE_TASKS=4 JULIA_PKG_PRECOMPILE_AUTO=0 TMPDIR="$PWD/tmp/base" JULIA_DEPOT_PATH="${SHARED_DEPOT}:" timeout 3600 julia +1.13.2 --startup-file=no run-base.jl: exit 1. A pristine merge-base archive is developed into another temporary environment; the head's added Rosenbrock and Newton test files are included against that base code. Output: 36 passed, 6 failed, 14 errored; Rosenbrock 21 pass/six fail/nine errors, Newton 15 pass/five errors. Errors include ArgumentError: matrix contains Infs or NaNs. Thus both added solver regression files fail before and pass after, from my own runs. The helper is a new API, absent at base, so its separate 70-assertion file was run only at head. The two manifests have identical external dependency versions; only the local Differentiation version changes from 3.12.4 to 3.13.0. The base harness also saved finite-path trajectories for the final comparison.

  • Julia run 3 (final): JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 JULIA_NUM_PRECOMPILE_TASKS=4 JULIA_PKG_PRECOMPILE_AUTO=0 TMPDIR="$PWD/tmp/probe" JULIA_DEPOT_PATH="${SHARED_DEPOT}:" timeout 3600 julia +1.13.2 --startup-file=no run-probe.jl: exit 1, 259 passed, 5 failed. The finite problem is u′ = -u, initial state [1,2], interval [0,1], analytic reference [1,2] exp(-t), reltol=1e-6, abstol=1e-9, with GenericFactorization(lu!). Rodas5P, Rosenbrock23/32, ImplicitEuler, TRBDF2, KenCarp4, FBDF and QNDF all have exactly equal saved times and states to the base (32/32 assertions including successful retcodes and analytic checks). The analytic check uses 1% relative tolerance to detect substantial state corruption; exact equality separately checks finite-path preservation. A Jacobian callback injecting NaN once after t=0.25 confirms successful recovery to t=1 and analytic saved states for all three Rosenbrock solvers. For the five Newton-based methods the callback is never evaluated after the threshold, so the five bad_count == 1 coverage assertions fail (0 == 1); their solves succeed with accurate states, but this does not verify rejection recovery. The IEEE predicate agrees with a direct all(isfinite, W) reference in 200/200 cases, covering real/complex IEEE types, multiple dimensions and non-finite positions. Vector-parent wrapper probes produce the non-blocking finding above. No Julia run was repeated.

What I did not verify

The transient NaN recovery path for Newton-based methods was not exercised by the independent probe because Jacobian reuse prevented the injection; its five failed coverage assertions are a limitation of my probe, not five demonstrated PR defects. Their permanently non-finite Jacobian regression tests did run and pass at head. The local failing-before run uses the merge-base rather than current master. No local CUDA device execution, full package suite, heavy downstream rerun, docs build or performance benchmark. The downgrade failure has not been independently reproduced in its exact Julia 1.11 dependency environment; its attribution is limited to the inspected CI evidence. Out-of-place and matrix-free handling are unchanged and were not exhaustively tested. No separate linked bug issue was identified; linked PRs were not used as correctness evidence. No upstream writes were performed.

🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5
Conversation: https://claude.ai/code/session_01379heiiB35TtywhR7uSU74

Require released nonlinear termination, construction, and generic factorization
fixes for the selected minimum environment. Check vector parents of transposed
and adjoint system matrices and cover finite generic-factorization solves.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Codex <[email protected]>
Agent-Harness: Codex CLI 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: local fixer job SciML__OrdinaryDiffEq.jl__4795 (no session URL)
@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

PR: #4795

Reviewed head: 156a482
Raw SHA-256: a48be65eb464807a43f105c41428bbd54b06ef8143e30d6cc57a90b376457c56
Source SHA-256: f1931a7146cac540d263ff03afeb810f393a503289423af7a2f736baa27ffeca
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1d255-b1a3-7342-b9c8-a5566ad2af13
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes

Risk assessment

  • Risk: medium-high (MH1)
  • Verdict: CHANGES
  • Reviewed head: 156a482

Review report

VERDICT: CHANGES
Round: 1
Head: 156a482
Slot: 1
CI: CI is not green (regress:sublibrary-ci / lib/OrdinaryDiffEqTaylorSeriesImplicit / Julia 1 / Tests - Core (Julia 1); sublibrary-ci / lib/OrdinaryDiffEqTaylorSeriesImplicit [QA] / Julia 1 / Tests - QA (Julia 1))
Session: 01a1d255-b1a3-7342-b9c8-a5566ad2af13

Risk

medium-high (MH1: changes failure and step-rejection behavior in the Rodas and FBDF main lanes of OrdinaryDiffEq).

Blocking findings

  • [P2] Needs verification of rejection and retry behavior. lib/OrdinaryDiffEqNonlinearSolve/src/newton.jl:794 and lib/OrdinaryDiffEqRosenbrock/src/rosenbrock_perform_step.jl:65 introduce early exits whose correctness depends on nonlinear-solver status and integrator/cache transitions. The completed Differentiation Core suite verifies the predicate and finite integration paths, but does not establish these new non-finite rejection paths. NonlinearSolve/Rosenbrock Core, the targeted rejection/recovery probes, and the head/default-branch comparison for the supplied TaylorSeriesImplicit failures never obtained a resource slot. Before merging, run those checks, record failing-before/passing-after evidence, and resolve or demonstrate the pre-existing status of the reported CI failures. This is a verification blocker; no source defect was confirmed by running.

  • Verdict: CHANGES

  • Round: 1

  • Blocking priorities: P2

  • Deferred P2 issues: None supplied to this blind review.

Non-blocking findings

None confirmed.

What I ran

Independent AI review by Codex CLI 0.164.0, model gpt-6.1-sol, in the local session identified above; no session URL was available. No PR body, comments, other reviews, or author risk rating were read.

  • Inspected git diff origin/master...HEAD, surrounding implementation, affected test entry points, dependency declarations, and the supplied risk criteria. git diff --check origin/master...HEAD passed. The original checkout remained clean at the requested head.
  • Ran GROUP=Core julia --startup-file=no --project="$SCRATCH/tree/lib/OrdinaryDiffEqDifferentiation" -e 'using Pkg; Pkg.test()' against a git archive HEAD scratch snapshot. Exit 0: 314/314 assertions across 18 testsets passed, including 88/88 isfinite_W assertions. Execution used two Julia threads, four precompile tasks, one BLAS thread, and an 8 GiB systemd scope. The runtime's layered JULIA_DEPOT_PATH was preserved.
  • Observed Julia 1.13.2, LinearSolve 5.18.3, NonlinearSolveBase 2.55.1, ConstructionBase 1.6.1, and SciMLBase 3.58.0 in the resolved test environment. No tracked Julia Manifest or interpreter pin was present.
  • Ran uv run --locked python --version: Python 3.15.0. uv warned that --locked has no effect outside a project. No tracked uv.lock or pyproject.toml exists, so this did not verify a locked project Python interpreter.
  • Checked host resources repeatedly for 60 minutes from the first queue launch. Other Julia workers and/or available memory prevented the remaining checks from meeting the supplied launch limits. Stopped the pending launchers with foreground interrupts; confirmed no review-owned Julia, timeout, or systemd-run command remained active.
  • Ran nvidia-smi: both GPUs were occupied, with only 4 MiB and 177 MiB free at inspection.

What I did not verify

  • NonlinearSolve and Rosenbrock Core suites: queued but never started. Their new integration regression tests were not run independently here.
  • Scratch probes for SIMD-boundary NaNs, analytic finite solves, transient-NaN recovery, late permanent failures, sparse/diagonal Jacobians, and excess sparse backing storage: written but not executed. No finding is asserted from those hypotheses.
  • Failing-before/passing-after behavior, minimum dependency versions, Julia 1.10/LTS, QA, documentation, Enzyme, or GPU execution.
  • The supplied TaylorSeriesImplicit Core/QA failures or their default-branch status. The CI line above is task-provided status; CI logs were not inspected.

AUTHOR_GRADE: {"task":"bugfix","score":4,"difficulty":3,"rounds":1,"author_harness":"Codex CLI 0.164.0","author_model":"gpt-6.1-sol","note":"The full Differentiation Core suite passes 314/314 assertions, including 88 helper checks. No source defect was confirmed; non-finite integration behavior and reported CI regressions remain unverified because host resource limits prevented execution."}

Head link: 156a482


🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol
Conversation: local session 01a1d255-b1a3-7342-b9c8-a5566ad2af13 (no session URL)

Bring in the TaylorDiff 0.3.6 compatibility floors used by the Taylor
sublibraries, preserving the non-finite W guards and dependency minimums.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Codex <[email protected]>
Agent-Harness: Codex CLI 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: local fixer job SciML__OrdinaryDiffEq.jl__4795 (no session URL)
@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

PR: #4795

Reviewed head: 2b970eb
Raw SHA-256: 9355f7ba4e0da2bd402f6ce3872b0f44f527573d660daabdacbc8a756cd8a82b
Source SHA-256: 989faf822730bf8ec29eba12edef258aafa00859a8ffb8b923684dbc6e9721ee
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1d3f0-3c1f-7c02-942b-a0e7808a57e1
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes

Risk assessment

  • Risk: medium-high (MH1)
  • Verdict: MERGE
  • Reviewed head: 2b970eb

Review report

VERDICT: MERGE
Round: 2
Head: 2b970eb
Slot: 1
CI: CI is not green
Session: 01a1d3f0-3c1f-7c02-942b-a0e7808a57e1

Risk

medium-high (MH1: changes failure and step-rejection behavior in the widely used Rosenbrock and Newton-based implicit solver paths).

Blocking findings

None confirmed. The new rejection paths pass their regression tests, and the reported TaylorSeriesImplicit failures did not reproduce locally on either head or master. The round-two delta matches master; it introduces no additional PR-specific changes.

  • Verdict: MERGE
  • Round: 2
  • Blocking priorities: None
  • Deferred P2 issues: None supplied.

Non-blocking findings

  • lib/OrdinaryDiffEqNonlinearSolve/test/newton_tests.jl:14: Core stops in the Orego/BackTracking solve with LineSearchException: Search direction is not a direction of descent. Step length: 0.0. Confirmed on both head and unmodified master with identical dependency versions. The successful comparison solves also have identical function-evaluation counts: Lorenz 373840/373843 and Orego 992192. Track this existing failure separately; retain the assertions. It is not a demonstrated regression from this PR.

What I ran

Independent review produced by Codex CLI 0.164.0, model gpt-6.1-sol, in the session above; no session URL was available. Read only the explicitly supplied previous-head review, delta, checkout, and review instructions. No PR body, GitHub comments/reviews, same-head opinion, or author risk rating was read.

All execution used scratch archives, the requested TMPDIR, the runtime's unchanged layered JULIA_DEPOT_PATH, two Julia threads, four precompile tasks, one BLAS thread, and memory-capped systemd scopes. SCRATCH below denotes this round's scratch directory; tree is HEAD and base is master 760d9306222480c1aa159e9cd8d3fd9b244e62cf.

  • Inspected the full PR diff and round-two delta. Both git diff --check invocations passed. No root AGENTS.md/CLAUDE.md, tracked Manifest, or interpreter pin was present. The checkout remained clean at the requested head.
  • GROUP=Core julia --startup-file=no --project="$SCRATCH/tree/lib/OrdinaryDiffEqRosenbrock" -e 'using Pkg; Pkg.test()': exit 0, 2990/2990 assertions, including DAE AD, interpolation, AD, convergence, and 54 non-finite-W assertions.
  • The corresponding NonlinearSolve Core command: exit 1, stopping at the existing BackTracking error above. finite_newton_compare.jl reproduced it on both source archives.
  • TaylorSeriesImplicit Pkg.test() with both GROUP=Core and GROUP=QA, on both head and master: all four invocations exited 0, each 4/4 convergence assertions. Resolved TaylorDiff was 0.3.6. Its local entrypoint executes the same tests for both group values.
  • julia --startup-file=no --project="$SCRATCH/probe-env" "$SCRATCH/probes.jl" "$SCRATCH/tree": the three new official regression files passed 187/187. The subsequent one-shot-NaN recovery testset failed 30 assertions for the five Newton methods. Follow-up transient_baseline_compare.jl established identical behavior on head/master: default NLNewton stops at t=0 after one Jacobian evaluation; always_new=true recovers for all five on both refs. Rosenbrock recovery cases succeeded against the analytic exponential solution. This stateful-callback probe establishes no introduced defect.
  • remaining_probes.jl: exit 0; permanent failures cannot advance time in adaptive/fixed/force_dtmin modes (72/72), sparse/diagonal rejection (30/30), and finite-check SIMD boundaries (20870/20870).
  • baseline_regressions.jl against master: all eight methods throw ArgumentError: matrix contains Infs or NaNs with GenericFactorization(lu!). Replaying the identical script against head produced 0/16 exceptions across both factorizations; every solve returned MaxIters at t=0. This supplies failing-before/passing-after evidence with identical inputs.
  • Observed Julia 1.13.2, LinearSolve 5.18.3, NonlinearSolveBase 2.55.1, ConstructionBase 1.6.1, and LineSearches 7.8.2. uv run --locked python --version reported Python 3.15.0, warning that --locked has no effect outside a project. There is no uv.lock/pyproject.toml, so no locked project Python interpreter was verified.
  • All review-started commands completed before this report was written.

What I did not verify

NonlinearSolve Core files after its early BackTracking error; the full unchanged Differentiation/Linear suites; Aqua/JET or documentation builds; older supported Julia versions or minimum dependency versions; GPU execution; external CI logs/workflow execution. Local passes do not establish green CI. The medium-high risk still requires the applicable human merge decision.

AUTHOR_GRADE: {"task":"bugfix","score":5,"difficulty":3,"rounds":2,"author_harness":"Codex CLI 0.164.0","author_model":"gpt-6.1-sol","note":"The new regression files pass 187 assertions; Rosenbrock Core passes all 2990 assertions; TaylorSeriesImplicit Core/QA invocations pass on head and master. Baseline probes reproduce eight generic-factorization exceptions eliminated by the head. The NonlinearSolve Core abort and stateful-Jacobian recovery limitation reproduce on master; no introduced defect was confirmed."}

Head link: 2b970eb


🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol
Conversation: local session 01a1d3f0-3c1f-7c02-942b-a0e7808a57e1 (no session URL)

This branch has not been deployed

No deployments
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