Skip to content

Reduce PDIRK statistics after worker joins without a global lock - #4465

Draft
ChrisRackauckas-Claude wants to merge 13 commits into
SciML:masterfrom
ChrisRackauckas-Claude:fix-pdirk-stats-join
Draft

ChrisRackauckas-Claude wants to merge 13 commits into
SciML:masterfrom
ChrisRackauckas-Claude:fix-pdirk-stats-join

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Sep 5, 2026 •

Copy link
Copy Markdown
Member

🚧 UNREVIEWED — awaiting review by @ChrisRackauckas. Filed by an AI agent running as @ChrisRackauckas; Chris has not seen this.
Harness: Codex CLI 0.164.0 · Model: gpt-6.1-sol
Conversation: local fixer job SciML__OrdinaryDiffEq.jl__4465 (no session URL)

PDIRK workers can lose statistics and overwrite shared failure/Jacobian state. Give each concurrent nonlinear solver a typed private StatsDelta, then reduce counters in solver order and assign failure status once in the parent after every join, including failed stages. This revises #4351, preserving its author history; the original contributor branch is not writable by this account.

The global lock and generic postamble drain are removed. PDIRK explicitly requests buffering; serial caches specialize on Nothing. Newton, Functional, Anderson, NonlinearSolveAlg, and Homotopy use the sink. Serial and threaded PDIRK follow the same two-cache stage schedule; out-of-place stages retain snapshots, and always-new Newton evaluates Jacobians with private state instead of writing integrator.u.

Ignore until reviewed by @ChrisRackauckas. This remains a draft with the QA and registration blockers below.

Failing before / passing after

Julia 1.10.12, four threads. The same committed regression file was run against clean original PR head ce086b1780c3a2bede9b008f2d6ff6dabcdd922e and this implementation, using separate local environments pointing at the respective checkouts:

julia +1.10.12 --threads=4 --project=env-unfixed OrdinaryDiffEq.jl/lib/OrdinaryDiffEqPDIRK/test/threaded_stats_tests.jl
julia +1.10.12 --threads=4 --project=env-join OrdinaryDiffEq.jl/lib/OrdinaryDiffEqPDIRK/test/threaded_stats_tests.jl

Before:

ERROR: LoadError: Some tests did not pass: 1779 passed, 333 failed, 0 errored, 0 broken.

After:

Test Summary:     | Pass  Total     Time
PDIRK concurrency | 2112   2112  1m06.2s

The test repeats each serial/threaded comparison 30 times, compares every DEStats field and solutions for in-place and out-of-place problems, and covers five nonlinear solver choices, failure at either join, and always-new Newton. The official runner ensures at least four Julia threads; its additional thread-count assertion makes 2113 assertions in the threaded testset.

Local verification

All commands use a workspace TMPDIR, JULIA_PKG_PRECOMPILE_AUTO=0, and local environments with the changed sibling packages developed together. julia below is julia.

GROUP=Core julia +1.10.12 --threads=4 --project=env-join -e 'using Pkg; Pkg.test("OrdinaryDiffEqPDIRK")'
GROUP=Core julia +1.10.12 --threads=4 --project=env-join -e 'using Pkg; Pkg.test("OrdinaryDiffEqDifferentiation")'
GROUP=Core julia +1.10.12 --threads=4 --project=env-join -e 'using Pkg; Pkg.test("OrdinaryDiffEqNonlinearSolve")'
GROUP=QA julia +1.10.12 --threads=4 --project=env-join -e 'using Pkg; Pkg.test("OrdinaryDiffEqCore")'
SciMLBase reexport |    2      2
Convergence Tests |    4      4
nlsolve! Arguments |    6      6
Core Interface Tests |    3      3
Threaded statistics | 2113   2113
Testing OrdinaryDiffEqPDIRK tests passed
Testing OrdinaryDiffEqDifferentiation tests passed
Testing OrdinaryDiffEqCore tests passed
Testing OrdinaryDiffEqNonlinearSolve tests passed

The full NonlinearSolve GROUP=Core suite passed on Julia 1.10.12: 912 passed, 40 existing broken assertions across 26 testsets. A supplementary Julia 1.12.7 run was stopped after the required Julia 1.10 suite completed; no Julia 1.12 nonlinear-suite pass is claimed. Differentiation QA passed JET (1) and 16 Aqua assertions, with one isolated-install error described below.

Differentiation: 159 assertions. Core QA: 48 passed, one existing broken assertion. Core statistics helper tests: 19 passed. Runic, typos over changed files, and git diff --check passed.

julia +1.12.7 --project=OrdinaryDiffEq.jl/docs -e 'using Pkg; Pkg.resolve(); include("OrdinaryDiffEq.jl/docs/make.jl")'

Docs completed with exit 0; Documenter reported HTML/search-index size warnings and skipped deployment outside CI.

CI Runic, Typos, documentation, and Differentiation LTS checks passed. Reviewed sublibrary Core/QA and downgrade failures stop at dependency resolution for the pending sibling releases; examples: https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/33963432816/job/101300313953 and https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/33963432816/job/101300315157. CI is not green.

Remaining gates and review considerations

🤖 Generated with Codex CLI 0.153.4 (model: gpt-6-astra; local session 01a07106-6c33-7603-9aa9-e3d9aec293f1 (no session URL)). No shareable conversation URL is exposed by this local harness.

Risk assessment

  • Risk: high
  • Blast radius: Every implicit solver that uses OrdinaryDiffEqDifferentiation or OrdinaryDiffEqNonlinearSolve, not just PDIRK. The PR changes how nf, nw, njacs, nsolve and nnonliniter are counted in calc_J/calc_W/jacobian! and in the NLNewton, Functional, Anderson, NonlinearSolveAlg and Homotopy solvers. It also changes what postamble! does with force_stepfail and adds a type parameter to every NL solver cache struct. A second change is not confined to PDIRK either: always_new Newton no longer writes integrator.u during iterations, so it now evaluates the Jacobian through ustep in place of integrator.u, and anything holding a reference to that state (for example a lazy WOperator/JacVec) is affected. Serial PDIRK (threading=false) now builds two nonlinear solvers instead of one. That changes memory use, W reuse, and the statistics serial users get back, yet PDIRK only gets a patch bump (2.5.3). The PR needs Core 4.17, Differentiation 3.12 and NonlinearSolve 2.10 registered in that order before it can resolve.
  • Evidence: Head 9c3d8c31 (CI from 2026-09-05) has 19 failing checks. They all stop at Unsatisfiable requirements because of this PR's compat bumps to sibling versions that aren't registered yet:
    • sublibrary-ci: OrdinaryDiffEqPDIRK Core (1, lts, pre) and QA; OrdinaryDiffEqNonlinearSolve Core (1, lts, pre), QA and ModelingToolkit; StochasticDiffEqLeaping Core and QA; StochasticDiffEqWeak Core and QA; OrdinaryDiffEqFeagin QA; OrdinaryDiffEqTaylorSeries QA.
    • downgrade-sublibraries: OrdinaryDiffEqNonlinearSolve, OrdinaryDiffEqPDIRK, StochasticDiffEqLeaping, StochasticDiffEqWeak.
    • The same jobs pass on master. StochasticDiffEqLeaping and StochasticDiffEqWeak Core and QA pass in https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/33955046886, which is the PR base c241543c. All four downgrade jobs pass in https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/36311609544 (8b3a3b07).
    • I found no master run that executed the Feagin, TaylorSeries, PDIRK or NonlinearSolve sublibrary jobs, because master CI only runs changed libraries. Those failures are still caused by this PR's compat requirements.
    • All 19 are therefore regressions under the no-regression bar, even though they are gated on registration. The PDIRK and NonlinearSolve tests themselves never ran in CI; only the author's local runs back them.
    • The PR is also mergeable_state: dirty (merge conflicts) and 134 commits behind master. Master has since added OrdinaryDiffEqPDIRK to NonlinearSolve's test target, so it will conflict.
  • Independent review: Devin CLI / fusion-claude-opus-5-5-high-sidekick-swe-2-medium rated it high, medium-high confidence: it rewrites statistics and failure-flag handling in the shared Differentiation and NonlinearSolve paths used by all implicit solvers, and its own new tests have not run in CI because resolution fails.
  • Merge: needs human review. Findings:
    1. It is a draft marked "Ignore until reviewed by @ChrisRackauckas".
    2. 19 CI regressions from compat bumps to sibling versions that aren't registered yet. They need registration in dependency order, or the PR split per package.
    3. Merge conflicts with a stale base.
    4. SemVer: new public API in Core (StatsDelta, stats_sink, stats_owner, charge_*!, merge_stats_deltas!) and the new next_u keyword in Differentiation get minor bumps, which is correct. PDIRK's serial behavior and statistics change under a patch bump, and the description doesn't present that as a behavior change for users.
    5. Not disclosed: [sources.OrdinaryDiffEqCore] added to the QA envs of unrelated OrdinaryDiffEqExtrapolation and OrdinaryDiffEqIMEXMultistep, and to NonlinearSolve's main Project.toml; a new lib/OrdinaryDiffEqPDIRK/AGENTS.md; the Feagin and TaylorSeries QA failures.
    6. The build_nlsolver docstring now puts the stats_delta paragraph before the summary line.
    7. No tests were weakened, and no new non-public dependency internals are used; SciMLBase.has_stats and _unwrap_val were already in use.
    8. NonlinearSolve (MIT) is added only as a test dependency.

🤖 Risk assessment posted by an AI agent (fleet master) — harness: Devin CLI / fusion-claude-opus-5-5-high-sidekick-swe-2-medium; dispatched by Claude Code head, model claude-opus-5-5[1m]
Conversation: local Claude Code session 3cd6500a-1f81-46b5-ac0b-c466e15b6a53 (session ID, no URL)

Agent follow-up (2026-10-16)

Two commits on top of the previous head 7226562; the 10-13 conflict-resolution merge (069d6bf) was re-reviewed hunk by hunk with git show --remerge-diff and is correct (master's mark_jacobian_updated! and J_t kept alongside the sink calls; NonlinearSolveCache argument order matches the struct).

CI resolution failures (15 of the 16 red checks). OrdinaryDiffEqCore 4.19.0 and OrdinaryDiffEqPDIRK 2.5.3 have since been registered from master without this PR's code, and NonlinearSolve/PDIRK required unregistered siblings without [sources] entries, so sublibrary (1, lts), QA, ModelingToolkit and downgrade jobs for NonlinearSolve, PDIRK, StochasticDiffEqLeaping and StochasticDiffEqWeak stopped at Unsatisfiable requirements.

  • Core → 4.20.0 and PDIRK → 2.6.0 (minor: serial PDIRK now builds two buffered nonlinear solvers, which changes its memory use and reported statistics); Differentiation, NonlinearSolve and PDIRK require Core 4.20.
  • [sources] path entries: NonlinearSolve → Differentiation; PDIRK → Core, Differentiation, NonlinearSolve. Leaping and Weak pick up Differentiation through NonlinearSolve's sources (Pkg on 1.11+ and SciML's develop_sources.jl on LTS both follow a path dependency's runtime sources).

JVP statistics race (bug in this PR's scope). drain_jvp_count!, from master's #4287, added Krylov JVP evaluations straight to integrator.stats.nf from dolinsolve, bypassing the per-solver StatsDelta. dolinsolve and drain_jvp_count! now take a stats_sink keyword (default nothing keeps the existing increment_nf! path for every other caller); Newton passes its cache's sink. New testset in threaded_stats_tests.jl (KrylovJL_GMRES(), concrete_jac = false; LinearSolve, MIT, added as a PDIRK test dependency).

Failing before the fix (Julia 1.13.2, 4 threads, GROUP=Core):

Jacobian-free Krylov statistics agree across threading modes |   61    30     91
  Evaluated: (nf = 2362, ...) == (nf = 2398, ...)

Passing after:

Threaded statistics | 2204   2204
     Testing OrdinaryDiffEqPDIRK tests passed

Serial nf is 2398 both before and after; only the threaded count changed.

build_nlsolver docstring: stats_delta moved into a # Keyword arguments section below the summary line.

Verification

All runs: Julia 1.13.2 unless noted, JULIA_NUM_THREADS=4, Pkg.test() through each lib's test/runtests.jl.

Check Result
Resolve NonlinearSolve, PDIRK, StochasticDiffEqLeaping, StochasticDiffEqWeak, Differentiation (1.13 native [sources]; 1.10.12 via SciML's develop_sources.jl) before: 8 of 10 Unsatisfiable requirements; after: 10 of 10 resolve
PDIRK GROUP=Core pass (Threaded statistics 2204/2204)
PDIRK GROUP=Core, Julia 1.10.12 (LTS) pass (Threaded statistics 2204/2204)
Differentiation GROUP=Core pass (Krylov nf accounting 33/33)
StochasticDiffEqLeaping, StochasticDiffEqWeak GROUP=Core pass
GROUP=QA: PDIRK, NonlinearSolve, Differentiation, Core pass (existing @test_broken counts only)
NonlinearSolve GROUP=Core every testset passes except the three below, which fail identically on master
Runic, typos on changed files clean

Docs were not built locally; the docstring edits add no @ref links or public names.

Pre-existing NonlinearSolve GROUP=Core failures CI will now show (that job never ran on this PR before because resolution failed). Each was reproduced with master's NonlinearSolve against the same registry versions (SDIRK 2.9.8, BDF 2.4.13, NonlinearSolve 4.32.0, LineSearches 7.8.2) with identical numbers:

  • newton_tests.jl: LineSearchException for Trapezoid(nlsolve = NLNewton(relax = BackTracking())); tracked in Newton BackTracking test fails on master since 498c765ccc (calc_dt_propose! dt rounding) #4681. This testset aborts the runner, so CI will not reach the later testsets.
  • nsa_jacobian_reuse_tests.jl:66: KenCarp4(nlsolve = NonlinearSolveAlg(NewtonRaphson())) naccept 45869 vs 35768 reference (bound 1.25×); untracked.
  • nsa_noinit_tests.jl:78: TRBDF2 with each SimpleNonlinearSolve inner algorithm on the mass-matrix Robertson problem returns MaxIters; untracked.

Not changed / for the reviewer

  • SciMLSensitivity Core4 downstream: Enzyme AssertionError: mi2 !== nothing in the EnsembleThreads + Tsit5 test. It fails the same way on an unrelated PR run with master's NonlinearSolve 2.9.9 (https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/38872050698/job/116878200138); not caused by this PR.
  • lib/OrdinaryDiffEqPDIRK/AGENTS.md (the only AGENTS.md in the repo) and the [sources.OrdinaryDiffEqCore] entries in the Extrapolation and IMEXMultistep QA environments (from the original contributor's commit) are kept; drop them if unwanted.
  • Registration order is still Core 4.20.0 → Differentiation 3.13.0 → NonlinearSolve 2.10.0 → PDIRK 2.6.0. The risk assessment above (high) still stands: the change touches statistics accounting in every implicit solver path through Differentiation and NonlinearSolve.

🤖 Posted by an AI agent — harness: Claude Code 2.1.301 · model: claude-opus-5-5
Conversation: local session ID 64ecc481-5cba-4f73-b4a5-c0439586a793 (headless, no URL)

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

Fix by Codex gpt-6.1-sol (head 97befc6)

Forward stats_delta only when buffering is requested at both build_nlsolver forwarding layers. Positional-only custom factories work on the unbuffered path; buffered extensions must accept and honor the keyword. The docstring states that contract. A public-API external-client regression covers in-place and out-of-place PDIRK, positional and buffer-aware factories, solutions, every statistics field, and rejection of a positional-only factory when buffering is requested. No dependencies or test assertions were weakened or disabled.

Failing before / passing after

The regression was written before the production fix and run against unfixed 282f4851c8 from a workspace copy. Runic applied whitespace formatting when it was added to the official runner. Observed before:

build_nlsolver(::Any, ::PositionalNewton, ::Any...) got unsupported keyword argument "stats_delta"
Test Summary:                       | Pass  Error  Total   Time
External nonlinear-solver factories |   62      2     64  32.5s

After the fix, the committed regression was run with:

julia +1.12 --project=lib/OrdinaryDiffEqPDIRK lib/OrdinaryDiffEqPDIRK/test/external_nlsolve_tests.jl
Test Summary:                       | Pass  Total   Time
External nonlinear-solver factories |   96     96  31.5s

Validation

Julia 1.12.7; JULIA_NUM_THREADS=4, JULIA_PKG_PRECOMPILE_AUTO=0, JULIA_NUM_PRECOMPILE_TASKS=1, and a workspace TMPDIR. These full groups used each package's existing runner:

for pair in OrdinaryDiffEqPDIRK:Core OrdinaryDiffEqPDIRK:QA OrdinaryDiffEqNonlinearSolve:Core OrdinaryDiffEqNonlinearSolve:QA OrdinaryDiffEqFeagin:QA OrdinaryDiffEqTaylorSeries:QA; do
    package="${pair%:*}"
    group="${pair#*:}"
    (cd "lib/$package" && GROUP="$group" timeout 7200 julia +1.12 --project -e 'using Pkg; Pkg.instantiate(); Pkg.test()')
done

Actual runner excerpts follow. PDIRK Core passed all 2,329 assertions. Broken assertions shown below were already present; this commit adds none.

PDIRK Core

Test Summary:            | Pass  Total   Time
PDIRK Resize Cache Tests |   14     14  22.9s
Test Summary:       | Pass  Total     Time
Threaded statistics | 2204   2204  2m08.8s
     Testing OrdinaryDiffEqPDIRK tests passed 

PDIRK QA

Test Summary:    | Broken  Total   Time
Allocation Tests |      1      1  53.2s
Test Summary: | Pass  Total   Time
JET Tests     |    1      1  26.9s
Test Summary: | Pass  Total     Time
Aqua          |   21     21  2m43.9s
     Testing OrdinaryDiffEqPDIRK tests passed 

NonlinearSolve Core (exit 1)

Test Summary:       | Pass  Total     Time
Developer API Tests |   27     27  3m38.7s
Test Summary: | Pass  Error  Total   Time
Newton Tests  |    4      1      5  18.5s

NonlinearSolve QA

Test Summary: | Pass  Broken  Total     Time
JET Tests     |   13      33     46  6m18.5s
Test Summary: | Pass  Total     Time
Aqua          |   41     41  1m05.3s
     Testing OrdinaryDiffEqNonlinearSolve tests passed 

Feagin QA

Test Summary:    | Pass  Total     Time
Allocation Tests |    3      3  1m43.5s
Test Summary: | Pass  Total   Time
JET Tests     |    1      1  18.8s
Test Summary: | Pass  Total     Time
Aqua          |   21     21  1m26.7s
     Testing OrdinaryDiffEqFeagin tests passed 

TaylorSeries QA

Test Summary:    | Pass  Broken  Total     Time
Allocation Tests |    2       1      3  1m42.3s
Test Summary: | Pass  Total   Time
JET Tests     |    1      1  50.9s
Test Summary: | Pass  Total   Time
Aqua          |   17     17  52.3s
     Testing OrdinaryDiffEqTaylorSeries tests passed 

NonlinearSolve Core passed its 27 developer API assertions, then stopped at the default-branch failure:

LoadError: LineSearchException: Search direction is not a direction of descent. Step length: 0.0

Formatting, spelling over all changed files, and the staged diff check all exited 0 with no diagnostic output:

julia +1.12 --project=@runic -m Runic --inplace lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl lib/OrdinaryDiffEqPDIRK/test/external_nlsolve_tests.jl lib/OrdinaryDiffEqPDIRK/test/runtests.jl
typos lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl lib/OrdinaryDiffEqPDIRK/test/external_nlsolve_tests.jl lib/OrdinaryDiffEqPDIRK/test/runtests.jl
git diff --cached --check

The docs build used the local Core 4.20.0, NonlinearSolve 2.10.0 and PDIRK 2.6.0 packages and exited 0:

timeout 7200 julia +1.12 --project=docs docs/make.jl
[ Info: Automatic `version="7.8.1"` for inventory from ../Project.toml
┌ Warning: Documenter could not auto-detect the building environment. Skipping deployment.

Earlier CI failures and default controls

  • NonlinearSolve Core, Julia 1 and LTS: the identical line-search exception is present in default-branch CI. Independently, the unchanged default newton_tests.jl on clean b94e13a3d2 reproduces it on Julia 1.10.12, with --compiled-modules=no. The PR's Julia 1.12.7 Core run reports 4 Newton passes and 1 error at the same solve. Later Core testsets are not covered.
  • NonlinearSolve downgrade: clean default b94e13a3d2, Julia 1.11.9, reproduces the exact assertion below: 38 passed, 1 failed across the two stats testsets. Key CI dependencies were pinned to NonlinearSolve 4.25.0, NonlinearSolveBase 2.45.0, SciMLBase 3.53.0 and SimpleNonlinearSolve 2.11.1, with local default Core/Differentiation/NonlinearSolve/SDIRK/BDF. Not every transitive dependency was pinned. The default CI downgrade pass uses a different resolution.
Expression: excess[2] <= excess[1] + 0.25
Evaluated: 1.2823529411764707 <= 1.2619521912350598
  • SciMLSensitivity Core4: latest default CI reproduces AssertionError: mi2 !== nothing at ensembles.jl:19.
  • Feagin and TaylorSeries QA: the earlier PR resolution failures were caused by this PR and already addressed by 282f4851c8. Both QA runners pass locally at this head, including their allocation/JET/Aqua checks as reported above.
  • The historical Dependabot Auto-merge startup failure exposes no jobs or failed-step logs; it was not diagnosed as a test failure.

No source changes were made for the reproduced default failures. GPU, downstream suites, performance benchmarks, PR suites on other Julia versions, and NonlinearSolve Core testsets after the error were not verified. New CI is not claimed green or awaited.

Next counted review must come from a model that authored no commit in this PR (risk.md § Independent reviews).

Links

Risk assessment

  • Risk: high for the overall PR, retaining the prior assessment.
  • Blast radius: shared nonlinear-solver factory initialization used by implicit solvers, plus the broader statistics changes already in this PR.
  • Evidence: discriminating external-client regression; PDIRK Core and QA, NonlinearSolve QA, Feagin/TaylorSeries QA, Runic, typos and docs pass. NonlinearSolve Core stops at the independently confirmed default failure.
  • Independent review: this follow-up has no counted independent review. The earlier Devin CLI / fusion-claude-opus-5-5-high-sidekick-swe-2-medium high assessment is retained, not presented as a review of this commit.
  • Merge: needs human review; the overall high risk assessment and independent-review gate remain.

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

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

Risk assessment (independent review, Codex gpt-6.1-sol, head 97befc6)

  • Verdict: CHANGES
  • Risk: high (H1: default threaded PDIRK rejects existing positional-only nonlinear-solver factories)
  • Independent review: Codex gpt-6.1-sol rated it high (H1), verdict CHANGES at head 97befc6, fresh session, rating formed before reading the body (Reduce PDIRK statistics after worker joins without a global lock #4465 (comment)). Blocking: (1) threaded PDIRK still throws MethodError for positional-only build_nlsolver factories, and the new test expects it; (2) the branch conflicts with master and lacks master's threading-option fix (alg.threading ? … fails with Sequential()/BaseThreads()); (3) the serial statistics on the issue's 50-state reproducer drift by one nf/nsolve/nnonliniter against master.
  • Merge: needs changes, then Chris (high).

🤖 Posted by an AI agent — harness: Codex CLI 0.163.0 (review) · model: gpt-6.1-sol; posted by Claude Code 2.1.302 · model: claude-opus-5-5 for the fleet master
Conversation: local session 01a14e8b-9083-7db3-8a45-c7fdfcef3450 (no session URL); master session https://claude.ai/code/session_0133iSjsLBByPU93BDEQkNDF

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

Fix by Codex gpt-6.1-sol (head 446d69d)

Merged master into the shared branch with a normal merge commit, preserving both histories. Master's isthreaded(alg.threading) handling, Polyester test dependency, and threading-option tests are retained; the option test file is byte-identical to master.

  • Threaded PDIRK accepts positional-only factories returning built-in nonlinear solvers. A factory supporting stats_delta receives the keyword; otherwise the returned solver receives a typed buffered cache. No exception is caught or suppressed. The external-client test now asserts successful solves, analytic accuracy, and every statistics field for both mutation forms, serial/threaded PDIRK, and the non-PDIRK TRBDF2 caller.
  • Serial PDIRK uses master's single-cache, four-stage work schedule. The 50-state regression checks the closed-form solution, one cache, (nf, nsolve, nw, njacs, nnonliniter) = (41603, 1603, 800, 800, 1603), and an independent physical RHS-call count, for both false and Sequential().
  • Threaded statistics are compared with a one-thread execution of the same two-cache schedule. Serial and threaded cache histories legitimately differ. Thirty repetitions per backend cover true, BaseThreads(), and PolyesterThreads(); solution, counter, failure-path, and private-buffer assertions remain. The always-new test also compares solutions.
  • The appended review's additional always-new Newton concern has a non-PDIRK regression in the NonlinearSolve Core runner. It checks out-of-place and in-place TRBDF2 against u(t) = 1/(1+t). The PR's existing Jacobian-state implementation prevents the out-of-place state aliasing exposed by this test.

Only test dependencies were added: OrdinaryDiffEqSDIRK and the Serialization standard library are MIT-licensed. No runtime dependency was added. The PDIRK concurrency guidance describes the one-cache serial and two-cache threaded schedules.

Failing before / passing after

Julia 1.12.7, four threads. The same three regression files were included against an isolated original head 97befc690c, before the production edits. Their actual output was:

build_nlsolver(::Any, ::PositionalNewton, ::Any...) got unsupported keyword argument "stats_delta"
TypeError: non-boolean (Sequential) used in boolean context
Evaluated: 2 == 1
Evaluated: (41604, 1604, 800, 800, 1604) == (41603, 1603, 800, 800, 1603)

Test Summary: | Pass  Fail  Error  Total     Time
Before fixes  |  175     2      4    181  4m08.2s

The focused post-fix run passed all 221 assertions. The official final PDIRK Core and QA runs each include these results:

Test Summary:                       | Pass  Total
External nonlinear-solver factories |  198    198
Test Summary:      | Pass  Total
nlsolve! Arguments |   13     13
Test Summary:     | Pass  Total
Serial statistics |   10     10
Test Summary:       | Pass  Total
Threaded statistics | 4244   4244

The identical serial regression independently passes 10/10 on clean master b94e13a3d2, including the physical RHS-call count. The serial drift is removed by restoring its work schedule, without adjusting reported counters.

The additional always-new regression was run with the same test file against clean master and the PR head:

"$julia_cmd" +1.12 --compiled-modules=existing --project="$BASELINE_ENV" lib/OrdinaryDiffEqNonlinearSolve/test/always_new_state_tests.jl
"$julia_cmd" +1.12 --compiled-modules=existing --project="$HEAD_ENV" lib/OrdinaryDiffEqNonlinearSolve/test/always_new_state_tests.jl

Here and below julia_cmd denotes the juliaup launcher; the two environment variables identify the isolated environments with their respective local sibling packages.

# Clean master: exit 1
Evaluated: [0.43551623155638114, 0.43551623155638114] ≈ [0.5, 0.5] (atol=1.0e-5)
Evaluated: [0.43551623155638114, 0.43551623155638114] ≈ [0.49999695533803024, 0.49999695533803024] (rtol=1.0e-10)
Always-new Newton preserves the previous state | 3 Pass, 2 Fail, 5 Total

# PR head: exit 0
Test Summary:                                  | Pass  Total   Time
Always-new Newton preserves the previous state |    5      5  28.9s

Final local validation

All runs used a workspace TMPDIR, JULIA_NUM_THREADS=4, JULIA_PKG_PRECOMPILE_AUTO=0, and JULIA_NUM_PRECOMPILE_TASKS=1. Full groups used the existing package runners:

for pair in OrdinaryDiffEqPDIRK:Core OrdinaryDiffEqPDIRK:QA OrdinaryDiffEqNonlinearSolve:QA OrdinaryDiffEqNonlinearSolve:Core; do
    package="${pair%:*}"
    group="${pair#*:}"
    (cd "lib/$package" && GROUP="$group" timeout 7200 "$julia_cmd" +1.12 --compiled-modules=existing --project -e 'using Pkg; Pkg.instantiate(); Pkg.test(; julia_args=["--compiled-modules=existing"])')
done

PDIRK Core: exit 0, 4,488 assertions passed. Actual tail:

Test Summary:     | Pass  Total  Time
Serial statistics |   10     10  9.6s
Test Summary:       | Pass  Total     Time
Threaded statistics | 4244   4244  4m50.3s
     Testing OrdinaryDiffEqPDIRK tests passed

PDIRK QA: exit 0. It also reruns the complete Core tests. Actual QA tail (the broken allocation assertion is pre-existing):

Test Summary:    | Broken  Total   Time
Allocation Tests |      1      1  49.3s
Test Summary: | Pass  Total   Time
JET Tests     |    1      1  12.0s
Test Summary: | Pass  Total     Time
Aqua          |   21     21  2m23.9s
     Testing OrdinaryDiffEqPDIRK tests passed

NonlinearSolve QA: exit 0. Existing broken assertions are unchanged:

Test Summary: | Pass  Broken  Total     Time
JET Tests     |   13      33     46  1m04.5s
Test Summary: | Pass  Total   Time
Aqua          |   41     41  50.6s
     Testing OrdinaryDiffEqNonlinearSolve tests passed

NonlinearSolve Core: exit 1 at the independently confirmed default-branch failure. Actual output:

Developer API Tests    | 27 Pass, 27 Total, 1m15.8s
Always-new Newton State | 5 Pass, 5 Total, 1m00.8s
LoadError: LineSearchException: Search direction is not a direction of descent. Step length: 0.0
Newton Tests | 4 Pass, 1 Error, 5 Total, 17.3s

Runic and typos exited 0 without diagnostics; git diff --cached --check exited 0. These commands cover all Julia files changed by this follow-up, plus spelling in the changed project and guidance files:

changed=(lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl lib/OrdinaryDiffEqPDIRK/src/OrdinaryDiffEqPDIRK.jl lib/OrdinaryDiffEqPDIRK/src/pdirk_caches.jl lib/OrdinaryDiffEqPDIRK/src/pdirk_perform_step.jl lib/OrdinaryDiffEqPDIRK/test/external_nlsolve_tests.jl lib/OrdinaryDiffEqPDIRK/test/serial_stats_tests.jl lib/OrdinaryDiffEqPDIRK/test/threaded_stats_reference.jl lib/OrdinaryDiffEqPDIRK/test/threaded_stats_tests.jl lib/OrdinaryDiffEqPDIRK/test/runtests.jl)
timeout 7200 "$julia_cmd" +1.12 --project=@runic -m Runic --inplace "${changed[@]}"
typos "${changed[@]}" lib/OrdinaryDiffEqPDIRK/Project.toml lib/OrdinaryDiffEqPDIRK/AGENTS.md
timeout 7200 "$julia_cmd" +1.12 --project=@runic -m Runic --inplace lib/OrdinaryDiffEqNonlinearSolve/test/always_new_state_tests.jl lib/OrdinaryDiffEqNonlinearSolve/test/runtests.jl
typos lib/OrdinaryDiffEqNonlinearSolve/test/always_new_state_tests.jl lib/OrdinaryDiffEqNonlinearSolve/test/runtests.jl
git diff --cached --check

The full docs build used the local sibling packages and exited 0:

"$julia_cmd" +1.12 --compiled-modules=existing --project=docs -e 'using Pkg; Pkg.instantiate()'
timeout 7200 "$julia_cmd" +1.12 --compiled-modules=existing --project=docs docs/make.jl
[ Info: Automatic `version="7.8.1"` for inventory from ../Project.toml
┌ Warning: Documenter could not auto-detect the building environment. Skipping deployment.

Documenter also emitted HTML/search-index size warnings. Added comment lines are 1/286 (0.3%). No assertion was disabled, skipped, or loosened.

Default-branch controls and limits

  • NonlinearSolve Core: clean master reproduces the exact LineSearchException in newton_tests.jl:14, also present in default CI. A separate investigator verified the adjacent Core commits with identical sibling/dependency versions: 61f52b3be9 passes 6/6 Newton assertions; 498c765ccc gives 4 passes and 1 error. Removing only that commit's six-line timestep-rounding hunk from a scratch master Core copy restores success. No production change was made for this failure; the existing report is linked below.
  • NonlinearSolve downgrade: clean master with NonlinearSolve 4.25.0, NonlinearSolveBase 2.45.0, SciMLBase 3.53.0, and SimpleNonlinearSolve 2.11.1 reproduces the historical CI assertion exactly: 1.2823529411764707 <= 1.2619521912350598, with 38 passes and 1 failure. Latest default downgrade CI passes with its different dependency resolution. The pinned baseline control establishes that the historical failure is not introduced by this PR.
  • SciMLSensitivity Core4: the latest default IntegrationTest run reproduces the same Enzyme AssertionError: mi2 !== nothing. This was checked from failed-step logs; the downstream suite was not run locally.
  • Historical Feagin/TaylorSeries resolution fixes remain in the parent commits. Those QA groups, full downgrade suites, Julia versions other than 1.12.7, ModelingToolkit, GPU/downstream suites, and performance benchmarks were not rerun here. NonlinearSolve Core tests after the Newton exception remain unverified. CI completion is not awaited or claimed green.

Next counted review must come from a model that authored no commit in this PR (risk.md § Independent reviews).

Links

Risk assessment

  • Risk: high for the overall PR, retaining the previous assessments.
  • Blast radius: shared nonlinear-solver factory initialization and the broader implicit-solver statistics/Jacobian changes already in this PR.
  • Evidence: discriminating factory, threading-option, serial-schedule, and out-of-place state regressions; required full Core/QA groups, formatting, spelling, and docs results above; explicitly reproduced baseline failures.
  • Independent review: pending for this commit; no new counted independent review is claimed.
  • Merge: needs human review and an eligible independent reviewer.

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

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

Risk assessment (independent review, Codex CLI 0.164.0-alpha.11.1 gpt-6-astra, slot 1, head 446d69d)

  • Risk: high (H6: Adds governing instructions in lib/OrdinaryDiffEqPDIRK/AGENTS.md; broader nonlinear-state and statistics changes also reach core main lanes (MH1).)
  • Verdict: CHANGES
  • Session: 01a18da8-0055-70e2-850a-45982d205850
  • Blocking priorities: P2

Review round 1, written by the reviewer named above (Codex CLI 0.164.0-alpha.11.1 / gpt-6-astra) in a session other than the PR author's, and copied here by the posting agent without change to its findings. The posting agent did not re-run the reviewer's commands.

Summary: The PR buffers threaded nonlinear-solver counters and keeps always-new Newton state private, with substantial concurrency and analytic regression tests. The changed statistics path still has a failing minimum-dependency assertion whose claimed default-branch reproduction was not independently verified.

Blast radius: Core statistics routing, Differentiation Jacobian/linear-solve accounting, nonlinear-solver caches and always-new Newton state, and PDIRK threaded stage execution; ordinary implicit solvers consume the shared routing.

Evidence: PDIRK Core/QA/downgrade and many neighboring solver lanes pass; explicit four-thread tests and analytic solution checks satisfy G3/G1. New always-new Newton tests pass 5/5 in the failed NonlinearSolve runs. Two Core failures and the Enzyme integration failure match inspected default logs, but the separate downgrade statistics assertion does not have an independently verified matching baseline.

Blocking findings

  1. [P2] lib/OrdinaryDiffEqNonlinearSolve/src/nlsolve.jl:369 and lib/OrdinaryDiffEqNonlinearSolve/test/nsa_stats_tests.jl:91 — confirmed by running (PR CI failure); PR causation suspected from reading, needs-verification: the minimum-version job fails the residual-work contract excess[2] <= excess[1] + 0.25, evaluating 1.2823529411764707 <= 1.2619521912350598; the stats suite ends with 38 passes and 1 failure. This PR changes the accounting used by that expression. The author reports the same failure on a manually pinned clean default branch, but the inspected default downgrade workflow passes and that separate local reproduction is not independent evidence. Run this test on the exact default and PR heads with the same resolved dependency stack (the reported control uses NonlinearSolve 4.25.0, NonlinearSolveBase 2.45.0, SciMLBase 3.53.0 and SimpleNonlinearSolve 2.11.1). If only the PR fails, correct the routing/counting regression; if both fail identically, supply those logs and track the upstream contract failure. Preserve the assertion rather than relaxing it.

Non-blocking findings

  1. lib/OrdinaryDiffEqCore/src/integrators/integrator_interface.jl:729: the statement that cache introspection adds “no added work” is an optimization claim. The concrete representation is small (six counters per buffered solver), but this review did not measure serial-path compilation or runtime cost; qualify the claim or retain a representative benchmark.

What I ran

  • git rev-parse HEAD returned 446d69dac0afe35ae53c52b0c6b71dff76f14f38; exact detached PR head verified (exit 0).
  • git diff origin/master...HEAD and git diff --check origin/master...HEAD completed (exit 0); changed files, tests, callers, and repository instructions inspected. Root AGENTS.md and CLAUDE.md are absent. Risk was frozen before opening the description.
  • git rev-parse origin/master returned 14b964b315e1310b5e3621a1bcfe6b92e9e506aa; GitHub's PR metadata base is b94e13a3d2f59e6f7e1d4a38e29fe2c75b4b09d5. The review diff uses the three-dot merge base; the header records the fetched base-branch tip.
  • git log -1 --first-parent --no-merges --format=%B inspected (exit 0); author trailers recorded below, or unknown when absent.
  • gh pr view 4465 --repo SciML/OrdinaryDiffEq.jl --json number,url,state,isDraft,headRefOid,baseRefName,baseRefOid,title,files,statusCheckRollup and the subsequent PR body read succeeded. Live state was OPEN.
  • Inspected gh pr checks 4465 --repo SciML/OrdinaryDiffEq.jl data: 268 success, 4 failure, 1 skipped. PDIRK Core (current/LTS/prerelease), QA and downgrade all pass. The Core runner invokes threaded_stats_tests.jl on at least four threads, spawning a four-thread child when necessary, and the test rejects fewer than four; it is not silently skipped. PDIRK Core.
  • gh run view 39130337902 --repo SciML/OrdinaryDiffEq.jl --log-failed (retrieval exit 0): both current and LTS NonlinearSolve Core jobs pass Always-new Newton State | 5 5, then fail newton_tests.jl:14 with LineSearchException: Search direction is not a direction of descent. Step length: 0.0; Newton summary 4 passes, 1 error. PR Core.
  • gh run view 41058796614 --repo SciML/OrdinaryDiffEq.jl --log-failed (retrieval exit 0) confirms the same default-branch Newton file/line, exception and 4-pass/1-error result. This supports baseline classification of the Newton exception, not of other red checks. Default Sublibrary CI.
  • gh run view 39130337779 --repo SciML/OrdinaryDiffEq.jl --log-failed (retrieval exit 0): Julia 1.11.9; Always-new Newton State | 5 5, Newton Tests | 6 6, then the distinct stats assertion in the blocker; process exit 1. Recent default downgrade run 41058798190 reports success. PR downgrade, default downgrade.
  • gh run view 39130337760 --repo SciML/OrdinaryDiffEq.jl --log-failed and the same command for recent default IntegrationTest run 41050161729 (retrieval exit 0) show the identical EnsembleThreads failure at downstream/test/Core4/ensembles.jl:19: AssertionError: mi2 !== nothing from Enzyme threadsfor_common in parallelrules.jl:233. PR integration, default integration.
  • Inspected the five recent default push runs and recent workflow-specific Sublibrary/Integration runs. Read linked issues 4349 and 4681; issue assertions were treated as claims until checked against the above CI evidence.

What I did not verify

No local reviewer Julia, race stress test, or performance benchmark was run. The author-reported same-dependency default reproduction of the stats assertion and failing-before race demonstration were not independently rerun. Tests after the Newton exception in the failed Core jobs are not all verified by those jobs. The full resolved minimum-version manifest comparison remains the blocking verification task.

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

🤖 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 446d69d)

Verification only: both requested failing checks are pre-existing. No production file, test, dependency constraint, or branch history was changed; no new commit or push was made. The assertion remains intact.

Matched dependency reproduction of the statistics blocker

Independently ran the complete, unmodified nsa_stats_tests.jl on PR head 446d69dac0afe35ae53c52b0c6b71dff76f14f38 and clean current default 4460ff80dad621418e6e3a9b63e4afb2e1f5fc02. Each environment develops that head's Core, Differentiation, NonlinearSolve, and DiffEqBase sources. All 188/188 registry and standard-library versions printed in the failing CI test manifest match; all 189 non-path manifest records, including tree hashes, are identical between the two local environments. The official test files are byte-identical.

Key versions: Julia 1.11.9, NonlinearSolve 4.25.0, NonlinearSolveBase 2.45.0, SimpleNonlinearSolve 2.11.1, SciMLBase 3.53.0, SDIRK 2.9.0, BDF 2.2.1, LinearSolve 5.15.0. Canonical external-manifest SHA256: b4361dc24e314f58ab3b9fcf1e29d45d74dc103c37a526dee30d4ff01c835716.

Commands used the juliaup launcher (J), isolated environments (PR_ENV / BASE_ENV), source directories (PR_SOURCE / BASE_SOURCE), and a provenance-printing runner (STATS_RUNNER) that includes the unchanged official file inside @testset "Unmodified official statistics regression". All runs use workspace temporary storage, JULIA_NUM_THREADS=4, JULIA_PKG_PRECOMPILE_AUTO=0, and JULIA_NUM_PRECOMPILE_TASKS=1.

timeout 7200 "$J" +1.11 --compiled-modules=existing --project="$PR_ENV" "$STATS_RUNNER" "$PR_SOURCE"
timeout 7200 "$J" +1.11 --compiled-modules=existing --project="$BASE_ENV" "$STATS_RUNNER" "$BASE_SOURCE"

Both commands exited 1 with exactly the CI assertion:

Expression: excess[2] <= excess[1] + 0.25
Evaluated: 1.2823529411764707 <= 1.2619521912350598

PR output:

Test Summary:                                                   | Pass  Fail  Total     Time
Unmodified official statistics regression                       |   38     1     39  2m54.2s
  reported work matches the work actually performed             |   24           24    53.9s
  no residual evaluation per stage beyond the Newton iterations |   14     1     15    13.8s

Default output:

Test Summary:                                                   | Pass  Fail  Total     Time
Unmodified official statistics regression                       |   38     1     39  2m46.1s
  reported work matches the work actually performed             |   24           24    52.1s
  no residual evaluation per stage beyond the Newton iterations |   14     1     15    13.2s

The latest green default downgrade job uses registered Core 4.14.0 / Differentiation 3.10.0 / SciMLBase 3.46.0. Its 39/39 result therefore does not contradict the controlled current-source reproduction above. This directly supplies the missing two-head, same-dependency evidence requested by the independent reviewer.

A separate baseline investigation reduced the failure to QNDF on the official two-state linear problem. On clean current master, the excess work is (1.0119521912350598, 1.2823529411764707). An otherwise identical scratch control removing only the six timestep-rounding lines introduced by Core commit 498c765ccc07522b48e6cb8df0567e734c0a46c1 passes the unchanged three-assertion reproducer. All external manifest entries are identical. This is an additional effect of the existing timestep-rounding regression, rather than evidence of a new statistics-sink defect. The historical residual-optimization commit passes the reduced test; its parent fails, so that boundary is an improvement and is not presented as the introduction of this failure.

Enzyme downstream failure

Historical default push CI has the exact same threadsfor_common / AssertionError: mi2 !== nothing as the PR. A separate baseline investigator reproduced it locally using only Enzyme, Test, and InteractiveUtils: a threaded sum-of-squares gradient on Julia 1.13.3 / Enzyme 0.13.216 exits 1 with that assertion.

Applying only the production-file patch from the merged Enzyme fix, with identical external manifest entries, makes the same reproducer exit 0:

timeout 3600 "$J" +1.13.3 --project="$OLD_ENZYME_ENV" "$ENZYME_REPRO"
timeout 3600 "$J" +1.13.3 --compiled-modules=existing --project="$PATCHED_ENZYME_ENV" "$ENZYME_REPRO"
# Before: exit 1
ERROR: LoadError: AssertionError: mi2 !== nothing
# After the isolated upstream patch: exit 0
Enzyme 0.13.216
gradient=[2.0, 4.0, 6.0, 8.0]

Current default Core4 CI passes with Enzyme 0.13.219, which contains that upstream fix. No OrdinaryDiffEq source merge is needed for this external dependency correction.

Verification limits and review

No Runic, typos, QA, complete Core group, docs build, GPU, performance benchmark, or full downstream suite was rerun in this verification-only follow-up. No code commit is returned, and no CI rerun was requested. The overall PR's previous high-risk assessment remains; this session supplies failure classification evidence rather than a counted independent review or a green-CI claim.

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__4465 (no session URL)

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

Fix by Muse CLI Code muse-wonder-full-1.0 (head aa0387b)

Merged the current default branch (6343f5a0b7, 45 commits) into this branch; the branch was CONFLICTING before the merge and the default branch is now an ancestor of the head. Conflict resolution, in lib/OrdinaryDiffEqDifferentiation, lib/OrdinaryDiffEqNonlinearSolve, lib/OrdinaryDiffEqCore, and lib/OrdinaryDiffEqPDIRK:

  • Combined the default branch's _calc_J!/_jacobian!/_calc_W! member-algorithm dispatch with this PR's stats_sink and next_u plumbing: _calc_J! and _calc_W! take next_u, and _jacobian! takes and forwards stats_sink. The auto-merge had left _jacobian! and _dolinsolve referencing a stats_sink they never received.
  • Combined dolinsolve's new alg keyword with this PR's stats_sink keyword, threading the sink into _dolinsolve/drain_jvp_count!.
  • For always_new Newton, kept this PR's private next_u (no write to the shared integrator.u) and computed it with the default branch's _stage_of_z/_stage_of_z! into the solver cache's ustep, so the Jacobian is evaluated at the stage value for DAE, coefficient-multistep, and DIRK formulations alike.
  • Versions above the default branch's releases: OrdinaryDiffEqCore 4.21.0 (default branch: 4.20.1) and OrdinaryDiffEqDifferentiation 3.14.0 (default branch: 3.13.0), with matching compat floors in OrdinaryDiffEqNonlinearSolve (2.10.0) and OrdinaryDiffEqPDIRK (2.6.0). Test runners keep both branches' testsets.

Failing checks on the previous head, classified with rack ci compare --no-record https://github.com/SciML/OrdinaryDiffEq.jl/pull/4465 before the merge:

  • OrdinaryDiffEqNonlinearSolve Core (Julia 1 and LTS): pre-existing. The newest default-branch runs fail with the same step and the same signatures (SafeTestsets.jl:30, LoadError: LineSearchException: Search direction is not a direction of descent. Step length: 0.0). The merged tree reproduces exactly that failure locally (below); no code was changed for it.
  • Downgrade OrdinaryDiffEqNonlinearSolve: the one failure is nsa_stats_tests.jl:91 (1.2823529411764707 <= 1.2619521912350598) under downgraded dependencies. On the merged tree with current dependencies that file passes in full (below). A prior investigation on this PR reproduced the exact assertion on a clean default branch with the downgrade job's dependency versions.
  • SciMLSensitivity Core4 downstream: Enzyme AssertionError: mi2 !== nothing, previously also observed on the default branch. Not re-run locally (downstream Enzyme suite); the merge brings in the current default branch either way.

Validation on the merged tree (Julia 1.12.4, 4 threads). Exact commands and observed output tails:

julia --project=@runic -m Runic --inplace <the 6 resolved .jl files>   # no changes
typos <files in git diff upstream/master>                              # exit 0
GROUP=Core julia --threads=4 --project=lib/OrdinaryDiffEqPDIRK -e 'using Pkg; Pkg.instantiate(); Pkg.test()'
# exit=0
# SciMLBase reexport | 2 2; Convergence Tests | 4 4; nlsolve! Arguments | 13 13
# External nonlinear-solver factories | 198 198; Core Interface Tests | 3 3
# PDIRK Resize Cache Tests | 14 14; Serial statistics | 10 10
# Threaded statistics | 4244 4244; Testing OrdinaryDiffEqPDIRK tests passed
GROUP=Core julia --threads=4 --project=lib/OrdinaryDiffEqDifferentiation -e 'using Pkg; Pkg.instantiate(); Pkg.test()'
# exit=0; 17 testsets, 226 passes, including Krylov nf accounting | 33 33
# Testing OrdinaryDiffEqDifferentiation tests passed
GROUP=Core julia --threads=4 --project=lib/OrdinaryDiffEqNonlinearSolve -e 'using Pkg; Pkg.instantiate(); Pkg.test()'
# exit=1 at Newton Tests (4 pass, 1 error), after Developer API Tests | 27 27,
# Always-new Newton State | 5 5, NLAnderson Resize Tests | 352 352:
# LoadError: LineSearchException: Search direction is not a direction of descent. Step length: 0.0
# (the pre-existing default-branch failure above; later testsets in that runner do not execute)
julia --threads=4 --project=<scratch env dev-ing the sibling libs> lib/OrdinaryDiffEqNonlinearSolve/test/always_new_tests.jl
# NLNewton(always_new = true) on Robertson | 20 20; analytic decay | 44 44
julia --threads=4 --project=<scratch env> lib/OrdinaryDiffEqNonlinearSolve/test/always_new_state_tests.jl
# Always-new Newton preserves the previous state | 5 5
julia --threads=4 --project=<scratch env> lib/OrdinaryDiffEqNonlinearSolve/test/nsa_stats_tests.jl
# reported work matches the work actually performed | 24 24
# no residual evaluation per stage beyond the Newton iterations | 15 15
julia --threads=4 --project=<scratch env> lib/OrdinaryDiffEqCore/test/stats_delta_tests.jl
# 19 passes across 4 testsets
GROUP=QA julia --threads=4 --project=lib/OrdinaryDiffEqCore -e 'using Pkg; Pkg.instantiate(); Pkg.test()'
# AllocCheck | 1 1; JET Tests | 30 pass, 1 broken; Aqua | 26 26
GROUP=QA julia --threads=4 --project=lib/OrdinaryDiffEqNonlinearSolve -e 'using Pkg; Pkg.test()'
# JET Tests | 13 pass, 33 broken; Aqua | 41 41; tests passed

Not verified: the full-group OrdinaryDiffEqPDIRK QA run (its runner repeats the Core testsets before JET/Aqua), the downgrade resolution on Julia 1.11, the SciMLSensitivity Core4 downstream suite, Julia LTS, and the docs build (no docstring or public API changes in this merge beyond version numbers).

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


🤖 Posted by an AI agent — harness: Muse CLI Code · model: muse-wonder-full-1.0
Conversation: local fixer job SciML__OrdinaryDiffEq.jl__4465 (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.170.0 gpt-6.2-sol (head ed93a92)

Each affected QA project declares the local OrdinaryDiffEqCore source once. This repairs QA activation for IMEXMultistep, PDIRK, TaylorSeries, Extrapolation, and Feagin. The stats_sink docstring now describes its return value without an unmeasured performance claim.

Failing before and passing after

The same scratch test parsed the five QA projects with Julia's TOML parser and verified that each source resolves to the local Core.

julia +1 "$QA_PROJECT_TEST" "$TREE"
Untouched PR: TOML Parser error: tried to add a new key to an inline table
QA project Core sources | Error 5  Total 5
Clean default and fixed PR:
QA project Core sources | Pass  5  Total 5

Local validation

Julia 1.13.3 and four threads. The package runner command was:

GROUP="$group" timeout 7200 julia +1 --compiled-modules=existing --project="lib/$package" \
  -e 'using Pkg; Pkg.instantiate(); Pkg.test(; julia_args=["--compiled-modules=existing"])'
Package QA output, exit 0 Core output, exit 0
OrdinaryDiffEqIMEXMultistep Allocation 2/2, JET 1/1, Aqua 21/21 QA runner includes Core, discontinuity restart 72/72
OrdinaryDiffEqPDIRK JET 1/1, Aqua 21/21, 1 existing broken allocation assertion QA runner includes Core, threaded statistics 4244/4244
OrdinaryDiffEqTaylorSeries Allocation 2 passes and 1 existing broken, JET 1/1, Aqua 17/17 TaylorN Dense Output 30/30, Nonlinear IIP System 4/4
OrdinaryDiffEqExtrapolation Allocation 7/7, JET 1/1, Aqua 21/21 Time Reversal 24/24, Threading Linear Solver 32/32
OrdinaryDiffEqFeagin Allocation 3/3, JET 1/1, Aqua 21/21 Feagin Tests 32/32
OrdinaryDiffEqCore AllocCheck 1/1, JET 30 passes and 1 existing broken, Aqua 26/26 Threaded Stats Buffering 19/19, Tolerance Default Equality 110/110

Each run ended with Testing OrdinaryDiffEq<Sub> tests passed.

julia --project=@runic -m Runic --inplace lib/OrdinaryDiffEqCore/src/integrators/integrator_interface.jl
typos $(git diff --name-only)
git diff --check
timeout 7200 julia +1 --compiled-modules=existing --project=docs \
  -e 'using Pkg; Pkg.instantiate(); include("docs/make.jl")'

Runic, typos, whitespace validation, and docs exited 0. Documenter reported HTML and search-index size warnings and skipped deployment outside CI.

NonlinearSolve downgrade baseline

timeout 7200 julia +1.11 --compiled-modules=existing --project="$MATCHED_ENV" "$STATS_RUNNER" "$TREE"

The official statistics test on clean default ace83e0140 and PR aa0387b1bb exited 1 on Julia 1.11.9 with identical results. The run environments match all 188 external versions printed in the failing CI job and have identical 189 external manifest records.

Expression: excess[2] <= excess[1] + 0.25
Evaluated: 1.2823529411764707 <= 1.2619521912350598
Unmodified official statistics regression | 38 pass, 1 fail

A separate QNDF control on clean default failed 2/3, then passed 3/3 after reversing only the timestep-rounding hunk in scratch. The green default downgrade job selects Core 4.14.0, Differentiation 3.10.0, and SciMLBase 3.46.0. Failing PR job, green default job, tracked QNDF investigation.

Next counted review must come from a smart model in a fresh session, not this fix session.


🤖 Posted by an AI agent — harness: Codex CLI 0.170.0 · model: gpt-6.2-sol
Conversation: local session 01a201c3-092f-7d73-8636-6f243e9ecf35 (no session URL)

singhharsh1708 and others added 4 commits September 1, 2026 07:56
Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Codex <[email protected]>
Agent-Harness: Codex CLI 0.153.4
Agent-Model: gpt-6-astra
Agent-Session: local session ID 01a07106-6c33-7603-9aa9-e3d9aec293f1
Keep nonlinear statistics and Jacobian evaluation state private to each solver,
then merge counters and failure status in the parent at each PDIRK join.
Use the same two-solver stage ordering in serial and threaded modes and retain
private snapshots of out-of-place stage results. Cover default and alternative
nonlinear solvers, failed stages, and always-new Newton with four threads.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Codex <[email protected]>
Agent-Harness: Codex CLI 0.153.4
Agent-Model: gpt-6-astra
Agent-Session: local session ID 01a07106-6c33-7603-9aa9-e3d9aec293f1
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-4465/log.txt

# Conflicts:
#	lib/OrdinaryDiffEqCore/Project.toml
#	lib/OrdinaryDiffEqCore/test/runtests.jl
#	lib/OrdinaryDiffEqDifferentiation/Project.toml
#	lib/OrdinaryDiffEqNonlinearSolve/Project.toml
#	lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl
#	lib/OrdinaryDiffEqNonlinearSolve/src/newton.jl
#	lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl
#	lib/OrdinaryDiffEqPDIRK/Project.toml
#	lib/OrdinaryDiffEqPDIRK/test/runtests.jl
@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 to resolve conflicts (head 069d6bf). Re-review the resolution before merging.

Conflict resolution report

STATUS: RESOLVED

Merge of origin/master into fix-pdirk-stats-join (PR #4465) committed as 069d6bf7d with the prepared merge message. No follow-up commit was needed. Nothing pushed or posted.

Conflicting files and resolution

  • lib/OrdinaryDiffEqCore/Project.toml: version set to master's 4.19.0. 4.19.0 is not registered (General has up to 4.18.1 on the 4.x line), so the PR's new Core API ships in that minor release and needs no separate bump.
  • lib/OrdinaryDiffEqDifferentiation/Project.toml: version 3.13.0. Master's 3.12.4 is already registered and the PR adds public API (the next_u keyword), so this is a minor bump on top of master. Core compat changed from 4.17 to 4.19, the release that contains StatsDelta/charge_*!.
  • lib/OrdinaryDiffEqNonlinearSolve/Project.toml: version 2.10.0 from the PR (master's 2.9.9 is registered). Differentiation compat 3.13 and Core compat 4.19, each pointing at the version that contains the PR's API. The test target is master's list including OrdinaryDiffEqPDIRK, and the PR's [sources.OrdinaryDiffEqCore] is kept.
  • lib/OrdinaryDiffEqPDIRK/Project.toml: Core compat 4.19, Differentiation 3.10 (master's floor; the PR never raised it), NonlinearSolve 2.10 (PR). Master's LinearAlgebra extra/compat/test entry and SciMLBase = "3.46" are kept, along with the PR's NonlinearSolve test dependency. Version stays at the PR's 2.5.3.
  • lib/OrdinaryDiffEqCore/test/runtests.jl: kept master's layout (all the new test files, with QA moved last) and added the PR's "Threaded Stats Buffering" testset after "Enzyme Interpolation" in the Core group.
  • lib/OrdinaryDiffEqPDIRK/test/runtests.jl: kept master's layout (PDIRK Resize Cache Tests included, QA last). The PR's "Threaded statistics" testset now sits after the resize tests and before QA, and the PR's duplicate post-QA copies of the convergence, argument and interface includes are gone.
  • lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl: master's mark_jacobian_updated! import combined with the PR's StatsDelta/charge_*!/stats_sink imports.
  • lib/OrdinaryDiffEqNonlinearSolve/src/newton.jl (_update_nlsolvealg_W!): kept the PR's charge_njacs!/charge_nw! sink calls in place of the direct integrator.stats writes, and kept master's mark_jacobian_updated!(W) and new_jac && (nlcache.J_t = integrator.t).
  • lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl (two NonlinearSolveCache constructor calls): arguments are ..., zero(tstep), true, t, false, precondition, postcondition, stats_delta. Master's new J_t field (t) is followed by the PR's trailing stats_delta, matching the auto-merged struct in type.jl.

Runic (julia +1.12 --project=@runic -m Runic -i) was run on the five touched .jl files and changed nothing.

Tests

Environment: a scratch env at scratch/testenv (Julia 1.11) that devs the in-repo OrdinaryDiffEqCore, OrdinaryDiffEqDifferentiation, OrdinaryDiffEqNonlinearSolve, OrdinaryDiffEqPDIRK, OrdinaryDiffEqSDIRK, OrdinaryDiffEqBDF, OrdinaryDiffEqRosenbrock and DiffEqBase, plus registry test dependencies.

julia --project=lib/OrdinaryDiffEqPDIRK -e 'using Pkg; Pkg.instantiate()' cannot resolve on its own: PDIRK 2.5.3 needs OrdinaryDiffEqNonlinearSolve 2.10, which is unregistered. The PR description already lists this registration blocker. That is why the scratch env with the siblings developed together is used.

Each command was run from the repo root as julia +1.11 --threads=4 --project=../scratch/testenv <file>:

File Pass Fail/Error
lib/OrdinaryDiffEqCore/test/stats_delta_tests.jl 19 0
lib/OrdinaryDiffEqPDIRK/test/threaded_stats_tests.jl 2112 0
lib/OrdinaryDiffEqPDIRK/test/pdirk_resize_tests.jl (master) 14 0
lib/OrdinaryDiffEqPDIRK/test/nlsolve_argument_tests.jl 6 0
lib/OrdinaryDiffEqPDIRK/test/core_interface_tests.jl 3 0
lib/OrdinaryDiffEqPDIRK/test/pdirk_convergence_tests.jl 4 0
lib/OrdinaryDiffEqNonlinearSolve/test/nsa_lhl_split_w_tests.jl (master; covers the newton.jl/utils.jl conflict) 20 0
lib/OrdinaryDiffEqNonlinearSolve/test/nsa_stale_w_reuse_tests.jl (master; covers the conflict) 16 0
lib/OrdinaryDiffEqNonlinearSolve/test/developer_api_tests.jl (master nlsolver-vector resize) 27 0

Logs: scratch/logs/*.log. QA, the full GROUP=Core suites and docs were not run.

Note for review (not changed)

drain_jvp_count! arrived from master via #4287. It is called from dolinsolve, in lib/OrdinaryDiffEqDifferentiation/src/operators.jl, and adds to integrator.stats.nf directly instead of going through the PR's per-solver StatsDelta sink. With a JVP/Krylov (JVPCache) W operator, threaded PDIRK workers would write the shared nf concurrently. The PR's threaded tests use dense Jacobians, which return before the write, so this path is not exercised. Routing it through the sink would require changing dolinsolve's inputs, which goes beyond the PR's current scope, so it is left for a follow-up.

Links


🤖 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 and others added 4 commits October 16, 2026 05:31
OrdinaryDiffEqCore 4.19.0 and OrdinaryDiffEqPDIRK 2.5.3 were registered
from master without this PR's changes, so the new Core API ships as 4.20.0
and PDIRK as 2.6.0; Differentiation, NonlinearSolve and PDIRK require
Core 4.20.

NonlinearSolve now requires the unregistered Differentiation 3.13 and PDIRK
the unregistered NonlinearSolve 2.10, so CI resolution (sublibrary,
LTS develop_sources and downgrade jobs, including StochasticDiffEqLeaping
and StochasticDiffEqWeak through NonlinearSolve) failed with
"Unsatisfiable requirements". Add the in-repo [sources] path entries the
other sublibraries use.

Move the build_nlsolver stats_delta note into a keyword section below the
summary line.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Agent-Harness: Claude Code 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: local session ID 64ecc481-5cba-4f73-b4a5-c0439586a793 (headless claude -p, no URL)
drain_jvp_count! added Jacobian-vector product evaluations straight to
integrator.stats.nf from dolinsolve, so threaded PDIRK workers using a
Jacobian-free Krylov W raced on the shared counter: with
KrylovJL_GMRES() and concrete_jac = false, all 30 threaded solves
reported nf between 2350 and 2384 against the serial 2398.

dolinsolve and drain_jvp_count! take a stats_sink keyword; Newton
passes its cache's StatsDelta. The default nothing keeps the direct
increment_nf! path for every other caller.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Agent-Harness: Claude Code 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: local session ID 64ecc481-5cba-4f73-b4a5-c0439586a793 (headless claude -p, no URL)
Select the in-repository Core required by Differentiation 3.13 when
activating the two QA environments.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Codex <[email protected]>
Agent-Harness: Codex CLI 0.162.1
Agent-Model: gpt-6.1-sol
Agent-Session: local job pdirk-stats-race-codex (no session URL)
@ChrisRackauckas

Copy link
Copy Markdown
Member

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

Investigated head 573ae339e against clean master 93a70cfcb. The two-file QA follow-up below (282f4851c) is now pushed to this branch after a Claude Opus 5.5 review of the worker's report and diff.

The issue MWE reproduces the race with four Julia threads: six master threaded solves report different counters. At this PR head, six threaded solves and six serial solves all report nf=41604, nsolve=1604, nw=800, njacs=800. The PDIRK Core runner passes, including all 2,204 threaded-statistics assertions.

Findings for the six red checks:

  • SciMLSensitivity Core4: pre-existing. The same Enzyme AssertionError: mi2 !== nothing occurs on master.
  • NonlinearSolve Core, Julia 1 and LTS: the same LineSearchException in newton_tests.jl occurs in master Julia 1 CI and reproduces locally on clean master. An exact recent master LTS counterpart was not found; the LTS classification rests on the identical failure and test, not an observed master LTS run.
  • NonlinearSolve downgrade: a pre-existing dependency-sensitive failure. With the PR CI job’s key dependency versions, clean master reproduces the exact failing assertion: 1.2823529411764707 <= 1.2619521912350598. The green master downgrade job selects older registered Core/Differentiation and SciMLBase. The local reproduction uses Julia 1.13.2; CI uses 1.11.9, and every transitive dependency was not pinned.
  • Feagin and TaylorSeries QA: caused by this PR’s new Core requirement. Their QA environments select local Differentiation 3.13 but registered Core versions ending at 4.19. Both failures reproduce locally. The follow-up adds the sibling Core source to their QA Projects. Feagin QA passes allocation checks, JET, and all 21 Aqua assertions. TaylorSeries QA passes JET and all 17 Aqua assertions; allocation checks report 2 passes and 1 existing broken assertion.

The follow-up commit 282f4851c changes two TOML files only. No assertion, tolerance, or test selection is changed. The full NonlinearSolve Core run remains blocked by the reproduced master line-search failure; later Core groups, broad downstream validation, and performance/memory comparisons are not claimed.

The buffer-and-join design is appropriate; I found no fundamental defect requiring a replacement branch. The HIGH risk review still matters because the PR changes shared implicit-solver code and serial PDIRK’s cache schedule. Independent review is still needed.

Links


🤖 Posted by an AI agent — harness: Codex CLI 0.162.1 · model: gpt-6.1-sol (investigation); reviewed and posted by Claude Code 2.1.302 · model: claude-opus-5-5
Conversation: https://claude.ai/code/session_0133iSjsLBByPU93BDEQkNDF (Codex part: local job ID pdirk-stats-race-codex, no session URL)

@ChrisRackauckas

Copy link
Copy Markdown
Member

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

Findings review by Codex CLI (gpt-6.1-sol), run in a fresh session. It is a findings review, not a counted independent rating: the PR has commits by a human contributor without agent trailers (unknown author) and by gpt-6.1-sol, so the review's model authored commits (risk.md, Independent reviews). Its blocking finding was reproduced by the fleet master's tick agent: the reviewer's reproducer fails on the PR head and passes on the control (merge-base or master).

VERDICT: CHANGES

Risk

high (H1: unchanged calls through the public nonlinear-solver factory reject existing positional extensions).

Blocking findings

  1. Preserve existing custom nonlinear-solver factories on the unbuffered path. lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl:481 unconditionally forwards ; stats_delta, including its default nothing, to the method specialized on alg.nlsolve. Existing public factory extensions without keyword arguments consequently throw during initialization. This is confirmed by running, not inferred solely from dispatch inspection.

    The retained scratch/extension-probe.jl uses only public APIs:

    using OrdinaryDiffEqPDIRK
    using OrdinaryDiffEqCore: AbstractNLSolverAlgorithm
    using OrdinaryDiffEqNonlinearSolve: NLNewton
    import OrdinaryDiffEqNonlinearSolve: build_nlsolver
    struct CustomNewton <: AbstractNLSolverAlgorithm end
    build_nlsolver(alg, ::CustomNewton, args...) =
        build_nlsolver(alg, NLNewton(), args...)
    prob = ODEProblem((u, p, t) -> -u, 1.0, (0.0, 1.0))
    sol = solve(prob, PDIRK44(threading=false, nlsolve=CustomNewton()); dt=0.01)

    Commands, with J and S defined below:

    julia +1.12 --threads=4 --project=<scratch>/base-env <scratch>/extension-probe.jl
    julia +1.12 --threads=4 --project=<scratch>/head/lib/OrdinaryDiffEqPDIRK <scratch>/extension-probe.jl

    Unmodified master returns Success, final value 0.3678794410675166, analytic error 1.0392575688911165e-10. The PR throws:

    build_nlsolver(::Any, ::CustomNewton, ::Any...) got unsupported keyword argument "stats_delta"
    

    Required: keep unbuffered factory forwarding compatible with positional extension methods, and make buffering an explicit supported extension contract. Add an external-client regression using a custom factory that accepts no keywords. The forwarding method is shared by other implicit solvers; the demonstrated failure is serial PDIRK.

Non-blocking findings

No additional confirmed findings.

What I ran

Reviewed head 282f4851c854e9a711225abdc8c2d145e425cd2f, using the requested git diff origin/master...HEAD. The checkout remained unchanged (git status --short empty). Root AGENTS.md/CLAUDE.md were absent; I read the nested PDIRK instructions, PR and predecessor, cited failure issues, relevant tolerance RFC context, and risk criteria.

All Julia validation used Julia 1.12.7 and workspace temporary storage:

export TMPDIR=<local path>
J=julia
S=<local path>
export JULIA_PKG_PRECOMPILE_AUTO=0

Unmodified head/master archives and local environments were created under scratch. Initial external-environment Pkg.test attempts failed before execution because relative [sources] paths resolved against that environment. The following runs preserved the monorepo layout:

GROUP=Core julia +1.12 --threads=4 --project=<scratch>/head/lib/OrdinaryDiffEqPDIRK -e 'using Pkg; Pkg.instantiate(); Pkg.test()'
GROUP=Core julia +1.12 --threads=4 --project=<scratch>/head/lib/OrdinaryDiffEqDifferentiation -e 'using Pkg; Pkg.instantiate(); Pkg.test()'
GROUP=Core julia +1.12 --threads=4 --project=<scratch>/head/lib/OrdinaryDiffEqNonlinearSolve -e 'using Pkg; Pkg.instantiate(); Pkg.test()'
GROUP=QA julia +1.12 --threads=4 --project=<scratch>/head/lib/OrdinaryDiffEqCore -e 'using Pkg; Pkg.instantiate(); Pkg.test()'
GROUP=QA julia +1.12 --threads=4 --project=<scratch>/head/lib/OrdinaryDiffEqPDIRK -e 'using Pkg; Pkg.test()'
Check Observed result
PDIRK Core Passed 2,233 assertions, including all 2,204 threaded-statistics assertions.
Differentiation Core Passed 224 assertions across 17 testsets, including 33 Krylov accounting assertions.
NonlinearSolve Core Developer API: 27 passed. Newton: 4 passed, 1 error; LineSearchException: Search direction is not a direction of descent. Step length: 0.0. Runner stopped there.
Core QA 57 passed, 1 existing broken assertion.
PDIRK QA Core tests passed again; JET 1 passed, Aqua 21 passed. Allocation test reported 1 existing broken assertion, not a passing allocation check.
  • Included the committed threaded_stats_tests.jl against unmodified master packages developed together in scratch/base-env: 728 passed, 399 failed, 1 errored. The first counter failure had threaded nf=3997, nw=399, nsolve=799, nnonliniter=794, versus serial 4000, 400, 800, 800. The later error references the new helper absent on master. Thus actual counter mismatches discriminate before that missing-helper error; the head runner passes all 2,204 assertions.
  • Ran stats_delta_tests.jl directly with --project=<scratch>/env: 19 passed.
  • Ran scratch/convergence-probe.jl: 128 passed against analytic u(t)=u0/(1+u0*t), covering both mutation forms, both threading modes, Newton/default and always-new, Functional, Anderson, and forward/finite-difference AD. Observed convergence orders 3.905–3.924 against the documented fourth order.
  • An initial coarse-step probe recorded 112 passes and 48 failures: 32 used an unjustified fixed-step absolute-error bound, and 16 were Functional convergence failures. A controlled follow-up at the same coarse steps confirmed max_iter=10 returns ConvergenceFailure while max_iter=50 returns Success. These exploratory failures are not evidence of a PR regression; their logs are retained.
  • The normal Differentiation run completed successfully after extensive compilation. A Julia signal-triggered profile sampled LLVM optimization. The supplementary Pkg.test(; julia_args=["--optimize=1"]) run was terminated after the normal run passed; no pass is claimed for the supplementary run. All started commands have exited.
  • Runic --check on changed Julia files, typos on changed files, and git diff --check origin/master...HEAD: exit 0. Inspected installed NonlinearSolve and LinearSolve licenses: both MIT.

Logs are retained under round1/tmp; probes and archive environments are under round1/scratch.

What I did not verify

  • NonlinearSolve Core testsets after the Newton error. That error matches the issue cited by the author; I did not independently reproduce it on master in this review.
  • Docs build, Julia 1.10/1.13, GPU, ModelingToolkit, downstream suites, nested AD coverage beyond the tests reached, or performance benchmarks.
  • Live CI success: gh pr checks returned no checks for the branch at inspection time.

Links:


🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5 (review text by Codex CLI gpt-6.1-sol, local job)
Conversation: https://claude.ai/code/session_0133iSjsLBByPU93BDEQkNDF

Forward the statistics keyword only for buffered solvers and document the
extension contract. Exercise positional and buffer-aware custom factories
through in-place and out-of-place PDIRK solves.

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

Copy link
Copy Markdown
Member Author

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

H1 is addressed in 97befc690c: unbuffered forwarding supports positional-only factories, and buffering has an explicit extension contract. The external-client regression reports 62 passes and 2 errors before the fix, then 96 passes after. Full validation and independently reproduced default-branch failures are recorded in the PR body.


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

@ChrisRackauckas

Copy link
Copy Markdown
Member

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

Independent review at head 97befc690c1e174f84d1902558c60a9321871ad2 by Codex CLI 0.163.0 / gpt-6.1-sol in a fresh session. The rating was formed before the PR body was read. The review's "Rating eligibility" paragraph follows the rule in force on the review host when it ran. Since 2026-10-18 a fresh-session Sol rating always counts (Chris's decision), so this is a counted rating. The counted rating is in the PR body.

Fleet master spot-check against the head source: pdirk_caches.jl passes stats_delta = alg.threading ? StatsDelta() : nothing (finding 2), external_nlsolve_tests.jl expects MethodError for a threaded positional-only factory (finding 1), and GitHub reports the PR as CONFLICTING.

VERDICT: CHANGES

Risk

high (H1: default threaded PDIRK rejects existing public positional-only nonlinear-solver factories).

Blind rating (written before reading the author's): high (H1: threaded PDIRK now requires existing custom build_nlsolver factories to accept stats_delta, rejecting previously supported positional factories)

Final rating unchanged: execution confirms the compatibility break. The change reaches shared Jacobian, linear-solve and nonlinear-solve machinery used by the Rodas and FBDF main lanes, plus PDIRK. G1 has independent analytic accuracy evidence on the successful paths; G3 has discriminating four-thread counter, failure and private-state tests. Those successes do not resolve the findings below.

Rating eligibility: this is a findings review, not a counted rating under risk.md: gpt-6.1-sol authored PR commits, and the history also contains commits without model attribution, so the all-smart-authors exception does not apply. An eligible different reviewer is still required.

Blocking findings

  1. Existing factories still fail with default threaded PDIRK. lib/OrdinaryDiffEqPDIRK/src/pdirk_caches.jl:78 (also line 102) supplies a non-nothing buffer, which the public forwarding method sends as a new required keyword to custom factories. In scratch/probes-complete.jl, the external extension is simply build_nlsolver(alg, ::PositionalNewton, args...) = build_nlsolver(alg, NLNewton(), args...). Running it with the base and head environments gives Success on master for serial/threaded PDIRK and TRBDF2, in-place and out-of-place. Head succeeds except for threaded PDIRK, which throws MethodError. lib/OrdinaryDiffEqPDIRK/test/external_nlsolve_tests.jl:42 explicitly expects that regression, allowing all 96 assertions to pass. Required: preserve positional-only factories in threaded PDIRK, replace the expected exception with successful solves against the analytic solution and correct statistics, and cover a non-PDIRK implicit caller. Merely documenting the new rejection does not preserve the existing API; the current minor versions do not authorize this break.

  2. The branch conflicts with—and lacks—master's threading-option fix. The raw Boolean condition at lib/OrdinaryDiffEqPDIRK/src/pdirk_caches.jl:78 rejects Sequential() and BaseThreads(). Running scratch/threading-options.jl against supplied origin/master produces four successful solves, analytic error 2.56e-11. The identical head run throws TypeError: non-boolean (Sequential/BaseThreads) used in boolean context in all four cases. Master already fixes this in commit b96fbee0f0da7848d1d20d1d274e8fe7e1afa4a5; GitHub reports this PR CONFLICTING/DIRTY. Required: integrate master while retaining its option tests, restore the isthreaded import, and use isthreaded(alg.threading) for buffer selection rather than testing the option object as a Boolean.

  3. The requested serial-statistics preservation does not hold on the original issue reproducer. lib/OrdinaryDiffEqPDIRK/src/pdirk_caches.jl:75 unconditionally constructs two solvers, changing serial cache history and work. Running scratch/issue-mwe.jl against both references, six serial repetitions each, gives master (nf, nsolve, nw, nnonliniter) = (41603, 1603, 800, 1603) and head (41604, 1604, 800, 1604). Both solutions are accurate against the independent closed form (maximum errors approximately 3.24e-10 and 3.25e-10). This is actual execution-schedule drift, not a lost counter or a SemVer-breaking numerical change. The new tests compare threaded results with the modified serial implementation, so they cannot detect this preservation failure. Required: preserve the established serial work/cache schedule and add the original 50-state reproducer as a serial regression. Do not manufacture counter equality by changing reported counts independently of actual work.

Non-blocking findings

  • The earlier Sol H1 finding is addressed as written for unbuffered calls: positional-only factories now work with serial PDIRK and TRBDF2. The newly documented buffered contract is explicit. The remaining default-threaded compatibility break is finding 1 above.
  • The new Core public helpers and Differentiation's optional next_u API have docstrings, rendered documentation and appropriate minor versions. Their additive nature does not require a major release. No added test skip, broken assertion, loosened tolerance, or hard dependency was found. The added LinearSolve/NonlinearSolve test dependencies are MIT licensed.

What I ran

Reviewed head 97befc690c1e174f84d1902558c60a9321871ad2 against supplied origin/master b94e13a3d2f59e6f7e1d4a38e29fe2c75b4b09d5. Recorded the blind rating before reading the PR body/comments, then read the full discussion, actual race issue, supplied QA issue and relevant RFC context. Root AGENTS.md/CLAUDE.md are absent; the supplied instructions and nested PDIRK guidance were read.

All Julia runs used 1.12.7, workspace temporary storage, at most four Julia threads, and separate source copies/environments with local sibling packages. Definitions for the commands below:

export TMPDIR=<review dir>/tmp
export JULIA_NUM_THREADS=4 JULIA_NUM_PRECOMPILE_TASKS=4 JULIA_PKG_PRECOMPILE_AUTO=0
J=<juliaup julia>
S=<review scratch dir>

For each of Core, Differentiation, NonlinearSolve and PDIRK:

GROUP=Core "$J" +1.12 --project="$S/head/lib/OrdinaryDiffEq<Sub>" \
  -e 'using Pkg; Pkg.instantiate(); Pkg.test(; allow_reresolve=false)'

Repeated with GROUP=QA for Core, PDIRK, NonlinearSolve, Feagin and TaylorSeries. TaylorSeries required Pkg.resolve() to complete the copied scratch manifest first. Initial external-environment Pkg.test attempts resolved relative source paths against the wrong directory; the reported package runs preserve the monorepo layout.

Check Observed result
Core Core 283 passed, exit 0
Differentiation Core 224 passed, exit 0; direct official runner also passed
PDIRK Core 2,329 passed, including 96 factory and 2,204 threaded-statistics assertions
NonlinearSolve Core Developer API 27 passed; Newton 4 passed, 1 error; exit 1
Core QA 57 passed, 1 existing broken
PDIRK QA 2,351 passed, 1 existing broken allocation assertion
NonlinearSolve QA 54 passed, 33 existing broken
Feagin QA 25 passed
TaylorSeries QA 20 passed, 1 existing broken
Full --project="$S/head/docs" .../docs/make.jl Exit 0; size warnings, deployment skipped
Runic --check, typos over changed files, git diff --check origin/master...HEAD Exit 0

Additional commands used "$J" +1.12 --project="$S/<base-or-head>-env" "$S/<probe>.jl":

  • Ran each new test against master and head. stats_delta_tests.jl: missing additive API on master, 19 passes on head. external_nlsolve_tests.jl: master 34 passes/2 failures/2 errors, head 96 passes; the two master failures are the newly expected exceptions that master does not throw. threaded_stats_tests.jl: master 876 passes/251 failures/1 error, head 2,203 direct passes. Counter mismatches occur before the later missing-helper error on master; the official wrapper reports 2,204 passes on head.
  • probes-complete.jl: all 18 serial counter tuples match between references for the small three-state cases across PDIRK, TRBDF2, Rodas5P, FBDF, Tsit5 and Vern7. The 50-state issue-mwe.jl exposes finding 3. Analytic checks confirm head fixes the out-of-place always-new TRBDF2 error (0.03884 on master versus 2.81e-8 on head). Initial FBDF error-bound failures occur on both references; fbdf-refinement.jl, with the explicit SciMLBase import, passes 8 assertions on each, retaining the bound and reducing the timestep.
  • atomic-count.jl: independent physical RHS counts equal charged counts for Newton/default and always-new, Functional and Anderson, both mutation forms and threading modes; analytic checks pass. adapter-accuracy.jl: 16 passes against u(t)=1/(1+t) for NonlinearSolve and Homotopy adapters, both mutation/threading modes.
  • Independently reproduced the Newton LineSearchException on clean master. A separate read-only investigator verified parent Core 61f52b3be9 passes all six Newton assertions, Core 498c765ccc fails, and master with only that commit's six-line calc_dt_propose! rounding hunk removed in scratch passes. Other sibling/dependency versions were held fixed. This confirms the existing issue's causal boundary by controlled source comparisons, not a fresh full-history bisect.
  • The additional always-new/Jacobian-free GMRES probe fails on both references. Investigation confirms the same serial ConvergenceFailure with default and always-new Newton: ForwardDiff stops at t=0.01, FiniteDiff at t=0.015; inner GMRES returns MaxIters at machine-epsilon tolerance. A separately labelled scratch-only linear-tolerance control succeeds. No production fix or passing claim for the original combination is made.

The original checkout is unchanged. All started commands and the baseline investigator have finished. No commits, pushes, GitHub comments, or other GitHub mutations were made. Logs and probes are retained in round2/scratch.

What I did not verify

  • NonlinearSolve Core testsets after its Newton exception; Julia 1.10/1.13 runs, downgrade resolutions, ModelingToolkit, downstream/GPU suites, or performance/memory benchmarks.
  • The exact introducing commit for the pre-existing GMRES failure; it remains a separate baseline limitation.
  • Current CI success: GitHub returned an empty check list for this head. Historical CI classifications beyond the independently reproduced controls above were not revalidated.

Links


🤖 Posted by an AI agent — harness: Codex CLI 0.163.0 (review) · model: gpt-6.1-sol; posted by Claude Code 2.1.302 · model: claude-opus-5-5 for the fleet master
Conversation: local session 01a14e8b-9083-7db3-8a45-c7fdfcef3450 (no session URL); master session https://claude.ai/code/session_0133iSjsLBByPU93BDEQkNDF

@ChrisRackauckas

Copy link
Copy Markdown
Member

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

Findings review by Devin CLI (Fusion: Claude Opus 5.5 with SWE-2), run in a fresh session at head 282f485; the branch has since moved to 97befc6, so findings may be stale. It is a findings review, not a counted independent rating: the PR has commits authored by the same Fusion model (risk.md, Independent reviews).

VERDICT: CHANGES

Risk

medium (M2: serial PDIRK44 results change on a path that already worked, because serial now uses the two-solver schedule. The convergence tests are the G1 evidence. ML7 (additive Core public API) and ML8 (threading, G3 test present) also match. The undisclosed fix to out-of-place always_new Newton for every Newton solver has no failing-before test, which by the modifier puts that part at medium on its own.) I ran the main lanes (FBDF, KenCarp4, TRBDF2, QNDF, Rodas5P, RadauIIA5, Krylov, NonlinearSolveAlg, DAE) and they are bit-for-bit unchanged, see "What I ran". So I do not rate it MH1/H2. The earlier assessment on the PR said "high"; by the risk.md rule the higher rating stands.

Blocking findings

  1. The PR conflicts with master, and its code re-breaks the threading fix that master just landed. Locations: lib/OrdinaryDiffEqPDIRK/src/pdirk_caches.jl:78,83,102,107 and lib/OrdinaryDiffEqPDIRK/src/OrdinaryDiffEqPDIRK.jl:7-8.

    • GitHub reports mergeable: CONFLICTING. git merge-tree HEAD origin/master shows conflicts in lib/OrdinaryDiffEqPDIRK/Project.toml and pdirk_caches.jl.
    • Master commit b96fbee (Fix PDIRK threading option checks #4745, merged 2026-10-17) changed the cache checks to isthreaded(alg.threading) so that threading = Sequential()/BaseThreads()/PolyesterThreads() work. This PR evaluates alg.threading ? StatsDelta() : nothing and drops the isthreaded import.
    • Confirmed by running, head env, 4 threads:
      • solve(prob, PDIRK44(threading = X); dt = 1/200, adaptive = false) throws TypeError: non-boolean (OrdinaryDiffEqCore.Sequential) used in boolean context on head. BaseThreads and PolyesterThreads give the same error.
      • On master, Sequential and BaseThreads run. PolyesterThreads only asks for using Polyester.
      • Master's lib/OrdinaryDiffEqPDIRK/test/nlsolve_argument_tests.jl, run against the PR's code: 4 passed, 0 failed, 1 errored (the same TypeError). On master: 11/11 + 2/2.
    • Required:
      • Rebase onto master.
      • Use isthreaded(alg.threading) ? StatsDelta() : nothing and restore the isthreaded import.
      • Keep master's Polyester test dependency and its nlsolve_argument_tests.jl.
      • Add BaseThreads() and PolyesterThreads() to the threading modes that threaded_stats_tests.jl compares against serial. The buffered path is only built when isthreaded is true, so these modes are exactly the new code path.
  2. An undisclosed, untested behavior fix for every Newton solver with out-of-place always_new. Location: lib/OrdinaryDiffEqNonlinearSolve/src/nlsolve.jl:144-146,382-389.

    • On master, the out-of-place always_new branch takes the ArrayInterface.ismutable path, @.. integrator.u = ..., and so writes into integrator.u in place. That storage is aliased with uprev. This PR routes the Jacobian state through newton_jacobian_state!, which removes the aliasing. That is correct, but the PR body presents it only as PDIRK worker privacy.

    • Confirmed by running (scratch/probe_blast.jl, Robertson, reltol 1e-6, out-of-place Vector problem):

      Solver (out-of-place Vector) Master Head
      ImplicitEuler(nlsolve = NLNewton(always_new = true)) MaxIters (nf 4999989) Success
      KenCarp4(...) Unstable Success
      FBDF(...) Unstable Success
    • Head's out-of-place results now equal the SVector results (same stats; for ImplicitEuler the same u hash as in-place). In-place, SVector, mass-matrix and scalar results are bit-identical between master and head.

    • The same master bug makes serial out-of-place PDIRK44(nlsolve = NLNewton(always_new = true)) return ConvergenceFailure with error 0.81 against the exact solution (scratch/probe_alwaysnew.jl).

    • No test outside PDIRK covers this. PDIRK's always-new testset (threaded_stats_tests.jl:95-121) compares only stats and retcode, never the solution.

    • Required:

      • Add a regression test in OrdinaryDiffEqNonlinearSolve (or SDIRK/BDF). Example: ImplicitEuler/FBDF with NLNewton(always_new = true) on out-of-place Robertson returns success and matches the in-place/SVector solution. Show it failing on master.
      • Add @test threaded.u[end] ≈ serial.u[end] to the PDIRK always-new testset. On master the in-place threaded solution differs from serial by 5.3e-8 at 8 threads, so this assertion would have caught the integrator.u race directly.
      • State the fix in the PR body.

Non-blocking findings

  • The failing-before evidence is weaker than it reads. The PR's "before" run used the original PR head (ce086b1), not master.
    • I ran head's threaded_stats_tests.jl against master's packages: 717 pass / 410 fail / 1 error.
    • Most of those failures are deterministic. Master's serial path uses one nonlinear solver and threaded uses two, so their stats differ even without a race.
    • The race itself is confirmed separately (scratch/probe_race.jl, the issue's reproducer, 12 threaded runs): master gives 9 distinct Newton stat tuples and 12 distinct Krylov ones; head gives 1, equal to serial, with threaded u bit-identical to serial.
    • So the fix is real. The PR body should say which failures come from the race and which from the schedule.
  • Scope. Solver statistics race when a solver threads its stage solves #4349 also names the threaded dolinsolve paths in Extrapolation and FIRK. They still charge integrator.stats directly inside @threaded. The PR does not claim to close the issue; the remaining paths should be listed there.
  • New file lib/OrdinaryDiffEqPDIRK/AGENTS.md. It is the only AGENTS.md in the repo and adds policy ("do not add a global lock"). That is a maintainer decision and should not ride along in a fix PR.
  • QA source entries in unrelated packages. [sources.OrdinaryDiffEqCore] was added to the QA environments of Extrapolation, IMEXMultistep, Feagin and TaylorSeries. These are unrelated to the fix (registration plumbing). They are harmless, since 55 libs already use [sources], but they make the PR broader than one concern.
  • Ten new public names in Core (StatsDelta, stats_sink, stats_owner, six charge_*!, merge_stats_deltas!) for one consumer. stats_sink duck-types on a field named stats_delta. They are documented and covered by stats_delta_tests.jl; whether the API surface is worth it is a design call for Chris.
  • Serial PDIRK memory and results. Serial PDIRK now builds two nonlinear caches, which doubles the W/J memory. Its stats change (Newton nf 41603→41604; Krylov nf 14282→14273) and its solution changes at about 1e-12 relative. PDIRK Convergence Tests (4/4, analytic reference) still pass. The PR discloses this and bumps PDIRK minor.
  • Comments and formatting. Comment lines are 2 of about 555 added .jl lines. Runic --check and typos on the changed files are clean.

What I ran

Julia 1.13.2 unless noted. Environments developed from git archive extracts of head 282f485 and origin/master. Logs are in round1/scratch/logs/.

  • PDIRK GROUP=Core via Pkg.test(), 4 threads, head: passes. Threaded statistics 2204/2204, Convergence 4/4.

  • threaded_stats_tests.jl on head, confirmed by running:

    • 4 threads on 1.10.12 (julia +lts): 2203/2203.
    • 8 threads on 1.13.2: 2203/2203.
  • The same test file against master's packages: 717 pass / 410 fail / 1 error.

  • Race probe (probe_race.jl, issue reproducer; Newton and Krylov GMRES; Sequential, BaseThreads and PolyesterThreads), head vs master. Results are in findings 1 and 3.

  • Master's nlsolve_argument_tests.jl against head code: 1 error (TypeError).

  • Blast-radius probe (probe_blast.jl): 74 solver/problem combinations, single thread, master vs head.

    • Problem types: in-place, out-of-place, SVector, mass matrix, scalar, plus DAE with DFBDF and DImplicitEuler.
    • Solvers: ImplicitEuler, TRBDF2, KenCarp4, FBDF, QNDF, Rodas5P, RadauIIA5, Kvaerno5-FD, Krylov, NonlinearSolveAlg, Functional/Anderson and always_new variants.
    • All stats and solution hashes are identical except the 3 out-of-place always_new rows in finding 2.
  • always_new probe (probe_alwaysnew.jl), 8 threads, 50 runs: head threaded equals serial exactly, with stats identical. Master differs as listed in finding 2.

  • NonlinearSolve GROUP=Core, head and master: the failing testsets are identical, with the same values in both trees:

    • newton_tests.jl: LineSearchException, which aborts the runner.
    • nsa_jacobian_reuse_tests.jl:66: 45869 < 44710.0; this also aborts the runner.
    • nsa_noinit_tests.jl:78: 4× MaxIters.

    The other 27 testsets pass in both trees. I ran them individually from scratch copies of the runner with the aborting includes removed; no test file was edited.

  • Head, passing: Differentiation GROUP=Core; Core GROUP=Core (Threaded Stats Buffering 19/19); GROUP=QA for PDIRK, NonlinearSolve, Differentiation and Core. QA results equal master's where both exist.

  • Lint: Runic --check and typos on the changed files.

What I did not verify

  • The resolution of the merge conflict, which does not exist yet. Everything above is against the unrebased head.
  • CI on the current head. No checks are reported for 282f485, and the sibling releases (Core 4.20, Differentiation 3.13, NonlinearSolve 2.10) are not registered, so registry-only resolution (downgrade, isolated Aqua) is still blocked.
  • The docs build. The latest commits changed docstrings, and the author also says docs were not rebuilt for them.
  • StochasticDiffEq siblings, downstream groups, ModelingToolkit, GPU.
  • Threaded stats for BaseThreads() and PolyesterThreads() on a working build. They cannot run on head because of finding 1.
  • Serial PDIRK performance after the switch to two caches.

Links


🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5 (review text by Devin CLI, fusion-claude-opus-5-5-high-sidekick-swe-2-medium, local job)
Conversation: https://claude.ai/code/session_0133iSjsLBByPU93BDEQkNDF

Keep the one-solver serial stage schedule and buffer the built-in solver returned
by a positional-only factory for threaded stages. Retain master's threading
option handling and test it with deterministic one-thread statistics references.

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

Copy link
Copy Markdown
Member Author

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

The three blocking findings in this review are addressed in 446d69dac0: positional-only factories succeed with threaded PDIRK and TRBDF2 coverage; a normal merge retains master's threading-option fix/tests; serial PDIRK retains master's one-cache schedule and the 50-state counters, checked against physical RHS calls.

The same regression files fail against the original head (175 passes, 2 failures, 4 errors), then pass after the fix (221 assertions). Full PDIRK Core passes 4,488 assertions, including 4,244 concurrency assertions; PDIRK QA, NonlinearSolve QA, docs, Runic, and typos pass. The appended review's out-of-place always-new Newton regression fails on clean master (3 passes, 2 failures) and passes here (5/5). NonlinearSolve Core reaches the independently reproduced default-branch line-search exception after passing its developer API and new state tests.

Commands, output, baseline comparisons, and coverage limits are in the new PR-body evidence section. No test was disabled or loosened. An eligible independent review remains required; the overall high risk assessment is retained.

Next counted review must come from a model that authored no commit in this PR (risk.md § Independent reviews).

Links:


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

ChrisRackauckas and others added 2 commits November 13, 2026 09:15
Combine the upstream _calc_J!/_jacobian!/_calc_W! alg dispatch and
dolinsolve alg keyword with the StatsDelta sink and next_u plumbing,
and compute the always_new Jacobian state with _stage_of_z into
private cache storage. Bump OrdinaryDiffEqCore to 4.21.0 and
OrdinaryDiffEqDifferentiation to 3.14.0 above the upstream releases.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Muse <[email protected]>
Agent-Harness: Muse CLI Code
Agent-Model: muse-wonder-full-1.0
Agent-Session: local fixer job SciML__OrdinaryDiffEq.jl__4465 (no session URL)
Declare the local Core source once in each affected QA project.
Describe the statistics sink contract without a performance claim.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Codex <[email protected]>
Agent-Harness: Codex CLI 0.170.0
Agent-Model: gpt-6.2-sol
Agent-Job: SciML__OrdinaryDiffEq.jl__4465--20261122T053756Z-codex-gpt-6.2-sol
Agent-Session: local session 01a201c3-092f-7d73-8636-6f243e9ecf35 (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.

3 participants