Repository navigation
Reject the step instead of throwing when W is non-finite (Rosenbrock + Newton) - #4795
ChrisRackauckas-Claude wants to merge 9 commits into
Conversation
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
4618ca1 to
3b2d8f1
Compare
…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
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 |
Independent review (Codex CLI 0.166.0 / gpt-6.1-sol), session 01a1977d-4a1a-7ef3-8a67-85f16a97bb2e, reviewed head 0d7329a
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
Non-blocking findings
What I ran
What I did not verifyThe 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 |
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)
PR: #4795 Reviewed head: 156a482 Risk assessment
Review reportVERDICT: CHANGES Riskmedium-high (MH1: changes failure and step-rejection behavior in the Rodas and FBDF main lanes of OrdinaryDiffEq). Blocking findings
Non-blocking findingsNone confirmed. What I ranIndependent 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.
What I did not verify
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 |
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)
PR: #4795 Reviewed head: 2b970eb Risk assessment
Review reportVERDICT: MERGE Riskmedium-high (MH1: changes failure and step-rejection behavior in the widely used Rosenbrock and Newton-based implicit solver paths). Blocking findingsNone 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.
Non-blocking findings
What I ranIndependent 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.
What I did not verifyNonlinearSolve 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 |
Ignore until reviewed by @ChrisRackauckas.
What and why
A non-finite
Wmade the solve throw instead of failing a step. LAPACK's dense LU (GenericFactorization(lu!)/lu, andLUFactorizationabove RecursiveFactorization sizes) raisesArgumentError: matrix contains Infs or NaNs, so the exception escapedsolve.This PR checks each newly formed
Wonce, before it is factorized:RosenbrockCache,Rosenbrock23Cache,Rosenbrock32Cache) setintegrator.force_stepfail = trueand return. That is the unconditional step-failure signal the Newton methods use: adaptive solves shrinkdt; fixed-step solves stop withConvergenceFailure;force_dtmincannot override it;compute_step!returnsInf, which is the existing linear-solve-failure path, so the nonlinear solve is markedDivergence(and setsforce_stepfail).The check is a new public helper,
OrdinaryDiffEqDifferentiation.isfinite_W(docstring +public_api.mdentry, Differentiation 3.12.4 → 3.13.0, Rosenbrock/NonlinearSolve compat raised to 3.13). For a CPUMatrixofFloat16/32/64or their complex types it uses a branch-free@simdsum of0 * v; every other strided matrix (other element types such asRational, unit-carrying numbers orBigFloat, views, and GPU arrays such asCuArray/JLArray) usesall(isfinite, W), which GPU array packages run as a reduction.Transpose/Adjointforward to their parent,Diagonalchecks its diagonal, and the SparseArrays extension checks the stored entries of aSparseMatrixCSC. Scalars useisfinite; matrix-free operators and other representations returntrue, 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 == 0makesWnon-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-finiteWfrom 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):
force_dtminsolves (previouslyEEst = Infonly; withadaptive=falseorforce_dtmin=truethe solve reportedSuccessatt=1.0withu=[1,1]untouched). All three guards now setforce_stepfail.isfinite_Wthrew for non-IEEE element types (DimensionErrorfor Unitful,DivideErrorfor1//0). The arithmetic fast path is now restricted to IEEE float / complex float; other types useall(isfinite, W).-Ibefore the NaN region; the test covers adaptive, fixed-step (adaptive=false, dt=0.1) andforce_dtmin(dt=dtmin=0.1) modes.lib/OrdinaryDiffEqDifferentiation/test/isfinite_W_tests.jl(Float16/32/64, ComplexF32/64, BigFloat, strided views, Rational incl.±1//0, a customNumberdefining onlyisfinite). Unitful is not a test dependency of Differentiation, so it is covered by the generic path rather than a direct test.CI round on 3b2d8f1 (22 red checks) and the fixes in 3308bca
isfinite_Wscalar-indexed GPU arrays (CuArray/JLArrayareStridedMatrix), failingOrdinaryDiffEqRosenbrock [GPU],OrdinaryDiffEqBDF [GPU]andtests / InterfaceV(lts and 1). The fast path now dispatches onMatrixonly. New regression test: aDenseMatrixwithout scalar indexing inisfinite_W_tests.jl(previous head: 58 pass / 2 error; now 60/60). A local JLArray probe with Rosenbrock23, Rodas5P, ImplicitEuler, QNDF and FBDF went fromScalar indexing is disallowedto no errors.OrdinaryDiffEqNonlinearSolvehad no[sources]entry forOrdinaryDiffEqDifferentiation, 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 gaveUnsatisfiable ... 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_Wnow checksTranspose/Adjoint(via the parent),Diagonal, andSparseMatrixCSCstored entries, instead of returningtrue. New tests: 70/70; the same tests on 3308bca fail 6 (the NaN cases for transpose, adjoint, complex transpose/adjoint,Diagonal, sparse). DifferentiationGROUP=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):(1.0119521912350598, 1.2823529411764707), 38 pass / 1 fail.srcset to master's (no non-finite W guard): identical numbers, 38/1.OrdinaryDiffEqDifferentiation3.10.0 (that is, no code from this PR at all): identical numbers, 38/1.(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 = Infguards and the unrestricted0*vhelper) / pass-after:All-NaN Jacobian,
GenericFactorization(lu!),u0=[1,1],tspan=(0,1):Rosenbrock now matches the Newton methods exactly.
Groups:
isfinite_Wcost per new W (normal bounds mode,OPENBLAS_NUM_THREADS=1, BenchmarkTools@belapsed, Float64):With
--check-bounds=yesthe reviewer measured about 10% / 23% / 22% oflu!, 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) anddowngrade-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.jlfailures (master 5318f58, 1d86051, cceca42: failure).sublibrary-ci / lib/OrdinaryDiffEqNonlinearSolve / Core(1 and lts): once resolution works, "Newton Tests" errors withLineSearchException: 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_mismatchattest/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:91QNDF 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 MarkCallbackCacheas non-differentiable for Mooncake #4688.Not verified locally
Coregroup 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@docsline).calc_WcallsDiffEqBase.default_factorizeinside the Jacobian construction, so a non-finite OOP denseWcan still reach the factorization (the reviewer's 2×2 OOP probes returnedUnstablewithout throwing). Otherdolinsolve(A = W)callers (Extrapolation, MultirateImplicit, FIRK) are unchanged.force_dtmin=truea permanently non-finiteWends atMaxItersaftermaxitersfailed attempts (the same as ImplicitEuler today), not at an immediate failure.W, the LinearSolve cache keeps the last good factorization. Rosenbrock always rebuildsWafter a failed step; for Newton,Divergenceforces a W rebuild (do_newJW), which the reviewer confirmed with a stiffness-jump probe.Risk assessment
RosenbrockCache,Rosenbrock23Cache,Rosenbrock32Cache) and Newton steps with a denseW. Behavior changes only on steps whoseWalready 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.🤖 Generated with Claude Code (model: claude-opus-5-5[1m]) https://claude.ai/code/session_011aK5Xvp9NpdkzKuEwtiMGd
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)
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
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)
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
74 passed, 14 failed88 passed38 passed, 1 failed;1.2823529411764707 <= 1.261952191235059839 passed; QNDF excess1.156862745098039323 passed, 1 errored; ConstructionBase 1.5.8 cannot resolveSciMLBase.UJacobianWrapper27 passedwith only ConstructionBase changed to 1.6.0defaultalg_symbolgenerated-function world-age error with LinearSolve 5.15The 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):
Final local validation
All runs use at most four Julia threads, one BLAS thread, and no more than three simultaneous Julia processes.
MINIMUM_ENVbelow 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.Exit 0; totals aggregated from its tables: 1,545 passed, 40 existing broken. Tail:
The unchanged stats table within that full run is
NonlinearSolveAlg Stats Tests | 39 39. The separate Julia 1.11.9 final-minimum regression run passedminimum dependency regressions | 172 172. The finite probe passedfinite trajectories compare | 40 40: all saved times and states exactly match the original head across eight native solvers plus FBDF/QNDF with NonlinearSolveAlg, foru′ = -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.Both exit 0: Differentiation 314 passed, Rosenbrock 2,990 passed. Output tails:
Both rerun on final metadata and exit 0, with the file-descriptor limit raised to 65536:
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 --checkExit 0, no diagnostics. Runic
--inplacewas 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)
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:
TaylorDiff was the only retained dependency whose version changed; its update removed 54 transitive dependencies and added none.
Both exit 0. This package's runner does not branch on
GROUP; the QA-labelled CI invocation runs the same convergence suite.The latest review's rejection/retry verification request was also exercised:
Rosenbrock Core exits 0, 2990 passed. Output:
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 aftert=0.25. Native Newton methods use the documentedNLNewton(always_new=true)option so the injection actually occurs. Rodas5P, Rosenbrock23, Rosenbrock32, ImplicitEuler, TRBDF2, FBDF and QNDF each receive exactly one injection, returnSuccessatt=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.All exit 0. Runic made no changes. Docs reached:
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 withLineSearchException: 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)