Repository navigation
FBDF deleteat!/addat!: edit u, uprev and history arrays (stacked on #4719, #4796) - #4807
ChrisRackauckas-Claude wants to merge 14 commits into
Conversation
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI codex-cli 0.160.0 Agent-Model: gpt-6-luna Agent-Session: local session, transcript /home/crackauc/sandbox/goals/performance/jobs/pr-bdf-resize/log.txt on amdci2
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI codex-cli 0.160.0 Agent-Model: gpt-6-luna Agent-Session: local session, transcript /home/crackauc/sandbox/goals/performance/jobs/pr-bdf-resize/log.txt on amdci2
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI codex-cli 0.160.0 Agent-Model: gpt-6-luna Agent-Session: local session, transcript /home/crackauc/sandbox/goals/performance/jobs/pr-bdf-resize/log.txt on amdci2
…rray deleteat!/addat! on an ODEIntegrator only touched full_cache, so fsallast (and fsalfirst when not aliased), the nonlinear solver buffers and J/W kept the old length, and the next step! threw. Cache fields that alias each other were also shortened twice. Visit each distinct buffer once and resize the solver internals the same way resize! does. Fixes SciML#4789 Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Agent-Harness: Claude Code Agent-Model: claude-opus-5-5[1m] Agent-Session: https://claude.ai/code/session_01AXwyJDRaMKgnYMG9M1Ut49
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Agent-Harness: Claude Code Agent-Model: claude-opus-5-5[1m] Agent-Session: https://claude.ai/code/session_01AXwyJDRaMKgnYMG9M1Ut49
FBDFCache holds no u/uprev and keeps u_history, u_corrector and dense as vectors of state-sized arrays, which full_cache does not reach. deleteat! and addat! now edit integrator.u, integrator.uprev and every history array once (by identity), then restart through the FBDF resize hook. Refs SciML#4806 Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Agent-Harness: Claude Code Agent-Model: claude-opus-5-5[1m] Agent-Session: https://claude.ai/code/session_01AXwyJDRaMKgnYMG9M1Ut49
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-4807/log.txt
Merged the default branch into this PR (clean merge, no conflicts; head 28038be) so CI runs on current master. Its earlier failures in SciMLSensitivity Core1 and the downgrade jobs were fixed on master after this PR's last CI run. 🤖 Posted by an AI agent — harness: Devin CLI 3000.11.3 (merge), Claude Code 2.1.285 (posting) · model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium |
Resolve add/add conflicts in OrdinaryDiffEqBDF resize files by keeping the branch versions, which contain the upstream resize hooks plus the FBDF deleteat!/addat! additions. 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__4807 (no session URL)
Independent review (Codex CLI 0.166.0 / gpt-6.1-sol), session 01a1976a-aa2a-76e3-8972-8a94dedaebde, reviewed head f18d934
Review written by the reviewer named above in a session other than the PR author's, and copied here by the posting agent without change to its findings. The posting agent did not re-run the reviewer's commands. Summary: Adds FBDF insertion/deletion hooks that edit state and history buffers and restart the method. The supplied regression passes, but composite FBDF solvers apply each requested state edit twice and need a repair. Blast radius: In-place FBDF integrator addat!/deleteat!, multistep history and restart state; composite algorithms containing FBDF. The QNDF regression exercises the existing fallback. Evidence: Head regression: 28/28 passed, exit 0. Same head test against merge-base BDF: 12 passed, 1 errored with BoundsError, exit 1. Independent probe: 34 passed, 2 failed, exit 1; repeated standalone edits and callback accuracy passed, composite state-size assertions failed. BDF Core, GPU, QA and downgrade CI passed; four other CI jobs failed, with three matching master failures confirmed. Blocking findings
Non-blocking findings
What I ranAll Julia runs used Julia 1.13.2 on aarch64, JULIA_NUM_THREADS=4, OPENBLAS_NUM_THREADS=1, an isolated TMPDIR, the designated writable shared depot with the default depots appended, --startup-file=no, and timeout 3600. Exactly three Julia processes were run, sequentially. Environment and checkout prefixes are omitted from commands below to avoid machine-local paths. Git inspection, exit 0 unless noted: git status --short
git rev-parse HEAD origin/master
git fetch origin '+refs/pull/4807/head:refs/remotes/pr/4807' master
git checkout --detach pr/4807
git diff --stat origin/master...HEAD
git diff origin/master...HEAD
git merge-base origin/master HEAD
git log -1 --no-merges --format=%B origin/master..HEADThe live head matched TARGET.md. origin/master was d035621; the merge-base and PR API baseRefOid were 7139c88. The diff contained only the three reported BDF files. The merge-base BDF subtree was extracted with Head, exit 0: julia +1.13.2 --startup-file=no --project=env-head -e 'using Pkg; Pkg.instantiate(;update_registry=false,allow_autoprecomp=false); using Test, OrdinaryDiffEqBDF; println("Julia ", VERSION); println("BDF source: ", pathof(OrdinaryDiffEqBDF)); @testset "PR head resize regression" begin include("src/lib/OrdinaryDiffEqBDF/test/resize_tests.jl") end'Output: Merge-base, exit 1, same head test file: julia +1.13.2 --startup-file=no --project=env-base -e 'using Pkg; Pkg.instantiate(;update_registry=false,allow_autoprecomp=false); using Test, OrdinaryDiffEqBDF; println("Julia ", VERSION); println("BDF source: ", pathof(OrdinaryDiffEqBDF)); @testset "PR base resize regression" begin include("src/lib/OrdinaryDiffEqBDF/test/resize_tests.jl") end'Output: Independent probe, exit 1: julia +1.13.2 --startup-file=no --project=env-head review-evidence/probe.jlThe probe used a separate coupled four-state linear system and matrix exponentials for each continuation interval. It checked repeated deletion/insertion/deletion with FBDF(time_filter=false/true), exact retained values, order reset, history/dense buffer lengths, and deletion inside a DiscreteCallback with derivative_discontinuity!(integrator, false). These checks passed. Two additional cases used the composite algorithm in blocking finding 1 and checked one edit immediately after stepping, without attempting continuation after a failed dimension assertion. Output: Read-only GitHub commands: Inspected current-head CI: BDF Core, BDF LTS Core, BDF GPU, BDF QA, and BDF downgrade succeeded. Default ForwardDiff Jacobian evaluation also ran in the local tests. Compared failed logs from PR CI and PR IntegrationTest with master CI and master IntegrationTest. The same AD LTS ReverseDiff tape error at test/AD/autodiff_events.jl:117, SciMLSensitivity Core2 unexpected passes at stiff_adjoints.jl:238 plus the tape error, and Core4 threaded-ensemble assertion What I did not verifyNo full package suite, Pkg.test(), local downstream suite, benchmark, or local GPU run. CI's GPU tests do not exercise insertion/deletion of GPU arrays; no GPU kernel or AD rule is changed here. Enzyme, Mooncake, Zygote differentiation through edits, Reactant, MPI, nonstandard state containers, and external NonlinearSolve configurations were not run locally. The base test stopped at the first new FBDF insertion error, so base deletion and QNDF cases were not individually verified. Composite continuation and a repaired implementation were not run; the demonstrated incorrect dimensions already violate the edit contract. The ModelingToolkit CI failure remains unresolved. No upstream comments, reviews, labels, or pushes were made. 🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5 |
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.164.0 Agent-Model: gpt-6.1-sol Agent-Session: local fixer job SciML__OrdinaryDiffEq.jl__4807 (no session URL)
Use the edited scratch-buffer length to apply state edits once across composite caches. Resize each nonlinear subcache and verify retained values and continuation for standalone and composite BDF solvers. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.164.0 Agent-Model: gpt-6.1-sol Agent-Session: local fixer job SciML__OrdinaryDiffEq.jl__4807 (no session URL)
PR: #4807 Reviewed head: 875b04a Risk assessment
Review reportVERDICT: CHANGES Riskmedium (M1: new SciMLBase state-edit hook methods change dispatch for existing FBDF calls, and composite resizing now visits previously unvisited nonlinear solvers; the affected operations are state-size edits, not default step control). Blocking findings
Non-blocking findingsNone identified from the source review. No tests were deleted or loosened; the added continuation checks include an independent matrix-exponential reference. What I ranAI reviewer: Codex CLI 0.164.0, model gpt-6.1-sol. The actual session ID is above; no conversation URL is available.
What I did not verifyThe BDF and NonlinearSolve Core suites, direct resize tests, targeted probes, failing-before/passing-after controls, QA, other supported Julia versions, and the supplied TaylorSeriesImplicit CI failures. There is no passing runtime-test evidence from this review. A project-locked interpreter/dependency environment was unavailable; only scratch dependency instantiation completed. All commands started by this review have finished. AUTHOR_GRADE: {"task":"bugfix","score":3,"difficulty":3,"rounds":1,"author_harness":"Codex CLI 0.164.0","author_model":"gpt-6.1-sol","note":"The patch adds independent analytic assertions, but source review identifies a lost component-algorithm context in recursive resizing. That concern is not runtime-confirmed: host admission limits prevented every affected suite and probe from starting."} Head link: 875b04a 🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol |
Pair each composite subcache with its algorithm so Jacobian preparation uses that component's AD backend. Cover explicit-last composites, mixed backends, dormant members and solver switching after state-size edits. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.164.0 Agent-Model: gpt-6.1-sol Agent-Session: local fixer job SciML__OrdinaryDiffEq.jl__4807 (no session URL)
PR: #4807 Reviewed head: 4606ac0 Risk assessment
Review reportVERDICT: CHANGES Riskmedium (M1: new specializations of SciMLBase state-edit hooks change existing FBDF dispatch; composite resizing also changes nonlinear-cache traversal). Blocking findings
The prior component-algorithm concern is addressed in the delta's source, and the new current-head regression tests pass. No additional code defect was confirmed.
Non-blocking findings
What I ranAI review by Codex CLI 0.164.0, model gpt-6.1-sol; actual session ID above.
What I did not verifyThe remaining 28 NonlinearSolve Core entries, a successful failing-before negative control, QA, other Julia versions, GPU execution, or current CI failure causes. A project-locked interpreter/dependency environment was unavailable: the checkout has no Julia manifest/interpreter pin or Python project/uv.lock. The scratch manifest records this review's dependency resolution. AUTHOR_GRADE: {"task":"bugfix","score":4,"difficulty":3,"rounds":2,"author_harness":"Codex CLI 0.164.0","author_model":"gpt-6.1-sol","note":"The component-algorithm context is consistent with the resize implementations and passes 192 new regression assertions and 122 targeted probe assertions. BDF Core passes. NonlinearSolve Core encounters a failure also reproduced on the default branch; remaining Core coverage and valid negative controls were unavailable after admission timed out."} Head link: 4606ac0 🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol |
Resolve the BDF test conflict by keeping both the FBDF edit tests and upstream QNDF history tests. Pin the NonlinearSolve test environment to the repository BDF and Tsit5 sources so composite resize tests exercise the changed hooks. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6-luna Agent-Job: SciML__OrdinaryDiffEq.jl__4807--20261121T144046Z-codex-gpt-6-luna Agent-Session: local session 01a1fe8d-ab96-7f62-9a0f-d96e0166a647 (no session URL)
Please ignore until reviewed by @ChrisRackauckas.
Stacked PR. This branch contains #4719 (FBDF/QNDF
resize!hooks) and #4796 (FSAL/nlsolver/J-W indeleteat!/addat!), merged locally. Only the last commit, 34b4580, is new here. It toucheslib/OrdinaryDiffEqBDFonly:src/resize.jl(+36), theSciMLBaseimport line, andtest/resize_tests.jl(+35).What changed and why
FBDFCachehas nou/uprevfield, and its history (u_history,u_corrector,dense) is a vector of state-sized arrays, sofull_cachereaches none of it. With #4719 and #4796 applied,deleteat!/addat!on FBDF still throw. The generic fallback resizes tolength(integrator.u), andintegrator.uitself was never edited. This PR addsdeleteat_non_user_cache!/addat_non_user_cache!forFBDFCache. They apply the edit once tointegrator.u,integrator.uprevand every history array, skipping by identity any array the generic pass already edited, so the kept rows are the right ones. They then call #4719's FBDF resize hook, which resizes the nlsolver and restarts at order 1. QNDF/QBDF need nothing extra: they work through the fallback once #4719 and #4796 are in.Verification
Scratch env with
lib/packages dev'd, Julia 1.12.4.New testset "BDF deleteat!/addat! mid-solve" in
lib/OrdinaryDiffEqBDF/test/resize_tests.jl. For FBDF and QNDF it steps to t=0.5 on a coupled linear system, callsaddat!(2→3) ordeleteat!(integ, [2])(3→2), and solves to t=2. It then checks the result against a freshsolveof the edited system from the same state, and againstexp(A_sub (TF-TG)) u_edit, both atrtol=1e-7, atol=1e-10. Both solves usereltol=1e-10, and the observed errors are about 1e-9 relative. 1e-7 leaves room for tolerance-proportional global error, and it still catches a wrong row or a stale history: those give O(1) errors or throw.julia --project=env -e 'using Test; @testset "f" begin include("lib/OrdinaryDiffEqBDF/test/resize_tests.jl") end'BoundsError: attempt to access 2-element Vector{Float64} at index [3]in both testsets)BoundsError: attempt to access 2-element Vector{Float64} at index [3]addat!needs #4796's nlsolver resize)Other BDF test files on this branch:
bdf_regression_tests.jl49/49,nordsieck_tests.jl140/140.Reproducer from #4806 on this branch: FBDF and QNDF
resize!2→3,resize!2→1,deleteat!,addat!allSuccess(on master all 8 throw). DFBDF still throws in all 4 cases. See below.Runic (
--check) andtyposon the three touched files: exit 0.Not verified
NLNewtonCache.dae_jacobiansbuffers resized in OrdinaryDiffEqNonlinearSolve. That is cause 3 in FBDF deleteat!/addat! and DFBDF resize!/deleteat!/addat! throw: history and DAE Newton buffers not resized #4806 and stays open there.test/Integrators_II/deleteat_addat_tests.jlfrom Resize FSAL, nlsolver and J/W buffers in deleteat!/addat!, once per array #4796 were not run. I ran targeted files only.Refs #4806 (FBDF
deleteat!/addat!part; DFBDF remains), #4733Risk assessment
deleteat_non_user_cache!/addat_non_user_cache!methods dispatched onFBDFCacheonly. No public API change. Other solvers andresize!are unaffected.🤖 Generated with Claude Code (model: claude-opus-5-5[1m])
https://claude.ai/code/session_01AXwyJDRaMKgnYMG9M1Ut49
Risk assessment (independent review, codex-cli gpt-6-astra, reviewed head 1b8feb9)
scripts/run-julia.sh --project=evidence/env-4807 -e 'using Test; @testset "BDF resize review" begin include("pr-4807/lib/OrdinaryDiffEqBDF/test/resize_tests.jl") end; include("scripts/probe-4807.jl")': 28/28 assertions passed, and all four additional FBDF/QNDF growth/deletion probes reached Success at t=1. Ran the same probe with--project=evidence/env-base-bdfagainst merge-base BDF: both FBDF cases threw BoundsError and both QNDF cases threw DimensionMismatch. Logs:evidence/test-4807.log,evidence/base-4807.log. Current-head CI has 22 queued checks, no completed failures to inspect. Relevant runs: https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/38872024078, https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/38872024266, https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/38872024525. Latest master runs were also queued; the older QNDF GPU failure was fixed by Use converged solves for QNDF/QBDF in the GPU DAE comparison #4869, with 173 passed / 12 pre-existing broken in https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/38561320497/job/115842951294. Pending CI is not a green result.Reviewed head:
1b8feb9b74eb67823945610a0dff4d3ef1ae66a1(recorded at start and rechecked unchanged at completion). Initial independent risk was medium, recorded before reading the author's risk section.🤖 Posted by an AI agent — harness: codex-cli · model: gpt-6-astra (independent reviewer; appended by Claude Code 2.1.301 · claude-opus-5-5)
Conversation: https://claude.ai/code/session_01VZjwf7Ux9YtTzwHGHMqnsq
Fix by Muse CLI Code muse-wonder-full-1.0 (head f18d934)
Merged the current default branch (including the merged FBDF/QNDF
resize!prerequisite) into this branch and resolved the merge conflicts. The conflicts were add/add conflicts inlib/OrdinaryDiffEqBDF/src/resize.jlandlib/OrdinaryDiffEqBDF/test/resize_tests.jl, plus a content conflict on theSciMLBaseimport inlib/OrdinaryDiffEqBDF/src/OrdinaryDiffEqBDF.jl. Each was resolved by keeping the branch version, which contains the upstream content plus this PR's FBDFdeleteat!/addat!additions. No other code changed. The resulting diff against the default branch is exactly 3 files (73 insertions, 1 deletion): the import line, thedeleteat_non_user_cache!/addat_non_user_cache!hooks forFBDFCache, and theBDF deleteat!/addat! mid-solvetestset. A merge was used rather than a rebase so the push is a fast-forward of the existing branch history.Validation (Julia 1.12.4,
JULIA_NUM_THREADS=4):julia --project=@runic -m Runic --check lib/OrdinaryDiffEqBDF/src/OrdinaryDiffEqBDF.jl lib/OrdinaryDiffEqBDF/src/resize.jl lib/OrdinaryDiffEqBDF/test/resize_tests.jl— exit 0.typos lib/OrdinaryDiffEqBDF/src/OrdinaryDiffEqBDF.jl lib/OrdinaryDiffEqBDF/src/resize.jl lib/OrdinaryDiffEqBDF/test/resize_tests.jl— exit 0.resize_tests.jlrun against a clean upstream checkout gives12 passed, 0 failed, 1 erroredwithBoundsError: attempt to access 2-element Vector{Float64} at index [3]inBDF deleteat!/addat! mid-solve.julia --project=lib/OrdinaryDiffEqBDF -e 'using Pkg; Pkg.instantiate(); using Test; @testset "resize" begin include("lib/OrdinaryDiffEqBDF/test/resize_tests.jl") end'—resize | 28 28 28.5s.GROUP=Core julia --project=lib/OrdinaryDiffEqBDF -e 'using Pkg; Pkg.test("OrdinaryDiffEqBDF")'— exit 0,Testing OrdinaryDiffEqBDF tests passed. Tail:BDF Resize Tests | 28 28,BDF Regression Tests | 125 125,BDF Convergence Tests | 98 98,Nordsieck BDF Tests | 140 140,LHL Factorization Tests | 19 19.GROUP=QA julia --project=lib/OrdinaryDiffEqBDF -e 'using Pkg; Pkg.test("OrdinaryDiffEqBDF")'— exit 0,Testing OrdinaryDiffEqBDF tests passed. Tail:Allocation Tests | 5 pass, 18 broken,JET Tests | 18 pass, 23 broken,Aqua | 21 21(broken entries are pre-existing@test_brokenin the QA files, unchanged here).Not verified: the full monorepo test suite, GPU and downgrade groups, and downstream integration tests. The only failure on the previous head was the SciMLSensitivity Core4 downstream job; the latest default-branch IntegrationTest run also failed, so that failure is not attributed to this PR. CI on the new head was checked once after pushing and had started; it was not waited on.
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__4807 (no session URL)
Fix by Codex CLI 0.164.0 gpt-6.1-sol (head 875b04a)
FBDF hooks use the scratch buffer's post-edit length to edit shared state once across composite caches. Nonlinear-solver resizing visits every composite subcache. Tests assert retained values and exact dimensions before comparing continuation with fresh solves and matrix exponentials, covering standalone FBDF/QNDF, both FBDF selections, and mixed FBDF/QNDF caches. The branch also includes a normal merge of upstream master (4460ff8).
Verification
Julia 1.12.4, four Julia threads, one BLAS thread, isolated temporary storage. No tolerance was loosened and no skip or broken assertion was added. Broken entries in the output are existing upstream assertions.
Formatting and spelling, exit 0 with no output:
Same regression on the unfixed merged source (exit 1), then the final fix with unmodified Core (exit 0):
timeout 3600 julia --compiled-modules=existing --project=lib/OrdinaryDiffEqBDF -e 'using Test; @testset "resize review" begin include("lib/OrdinaryDiffEqBDF/test/resize_tests.jl") end'Full BDF Core, exit 0.
JULIA_PROJECTselects an isolated copy of the Pkg-generated BDF test environment with repository sources preserved;JULIA_LOAD_PATH=@:@stdlib. This runs the official runner with bounds checks:GROUP=Core timeout 10800 julia --compiled-modules=existing --check-bounds=yes -e 'using Pkg; Pkg.instantiate(;allow_autoprecomp=false); cd("lib/OrdinaryDiffEqBDF/test"); include("runtests.jl")'Final BDF QA, exit 0:
GROUP=QA timeout 10800 julia --compiled-modules=existing --project=lib/OrdinaryDiffEqBDF -e 'using Pkg; Pkg.test(; julia_args=["--compiled-modules=existing"])'NonlinearSolve QA, exit 0.
JULIA_PROJECTselects a workspace with eleven monorepo packages developed from this checkout; their source locations were asserted:GROUP=QA timeout 10800 julia --compiled-modules=existing -e 'using Pkg; Pkg.test("OrdinaryDiffEqNonlinearSolve"; julia_args=["--compiled-modules=existing"])'Root integrator and QA groups, both exit 0:
Pre-existing failures and limits
The full NonlinearSolve Core command stops in the Newton BackTracking test with
LineSearchException: Search direction is not a direction of descent. Step length: 0.0(4 passed, 1 errored). It reproduces on clean upstream master and with all local monorepo sources. The existing report #4681 documents this failure family. The remaining Core testsets after that failure were not executed; the failure was not changed or suppressed.GROUP=Core timeout 10800 julia --compiled-modules=existing -e 'using Pkg; Pkg.test("OrdinaryDiffEqNonlinearSolve"; julia_args=["--compiled-modules=existing"])'The checked default-branch push run https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/42569947107 passes SciMLSensitivity Core4 and ModelingToolkit InterfaceI. SciMLSensitivity Core2 and AD LTS reproduce the PR's unexpected-pass/finished-tape failures on the default branch. Those failures have existing reports and are unchanged here.
Adaptive composite FBDF has a separate baseline defect tracked in #4854, reproduced here without resizing on a clean default checkout. The new composite edit regressions use fixed steps and a coupled nilpotent matrix; QNDF uses a finer step for the analytic comparison. Standalone edit regressions remain adaptive.
Not verified: downstream suites locally, GPU, pre-release/LTS Julia, minimum dependency combinations, full monorepo Everything, documentation builds, or new-head CI results. Packaging requires coordinated BDF and NonlinearSolve releases and appropriate dependency bounds; only current local sources were tested.
Links
Risk assessment
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: Codex CLI 0.164.0 · model: gpt-6.1-sol
Conversation: local fixer job SciML__OrdinaryDiffEq.jl__4807 (no session URL)
Fix by Codex CLI 0.164.0 gpt-6.1-sol (head 4606ac0)
Composite nonlinear-cache resizing pairs each cache with its component algorithm. A resize context preserves the state, function, solution and step references while selecting that component's AD backend for Jacobian/J-W preparation. New Core tests cover explicit-first/last composites, ForwardDiff/FiniteDiff mixtures in both orders, both initial selections, dormant members, resize/insertion/deletion, and switching into both members after editing. The test-only Tsit5 dependency is MIT licensed, matching this repository.
Verification
Julia 1.12.4, four Julia threads, one BLAS thread.
VALIDATION_ENVselects an isolated environment with BDF/NonlinearSolve test dependencies and twelve local monorepo packages; source locations were checked. Machine-specific environment values are omitted below.Before the fix, the new regression ran on the original PR implementation and exited 1. Restoring that implementation at runtime with the final test file independently reproduced the same counts. After the fix the command exited 0:
The fixed regression and existing resize file were also run together, exit 0:
Full official BDF Core runner, with bounds checks, exit 0: 2,695 passed, two existing broken assertions, 19 testsets. The invocation also printed the selected BDF, NonlinearSolve, Core and Differentiation source locations before running:
Both QA groups passed through
Pkg.test():The first BDF QA attempt stopped before tests because Pkg interpreted a relative source path against the scratch environment. Correcting scratch source aliases allowed the exact command above to run. No repository code or test assertion changed for that environment repair.
Final formatting/spelling/whitespace checks all exited 0 with no output:
Baseline controls and limits
NonlinearSolve Core was run through its official runner and exited 1:
A separate baseline investigator reproduced that exact Newton failure on clean upstream master 4460ff8: Developer API 27/27, Anderson resize 352/352, Newton four passes/one error. Existing issue 4681 contains a historical bisect; it was checked, not repeated. Core testsets after Newton remain unexecuted. The same final composite regression against clean master produced 28 passed, 60 failed, 24 errored (stale nonlinear buffers / continuation errors), providing the base-method control.
All failed PR checks were compared with default-branch push runs or local controls. Root/Default GPU deprecation-warning assertions, AD LTS ReverseDiff tape errors, SciMLSensitivity Core2, ProbNumDiffEq downstream failures, and Newton are pre-existing. TaylorSeriesImplicit Core/QA, documentation and downgrade failures share the TaylorDiff 0.3.5 dependency precompile error also seen on master. Clean-master loading of TaylorSeriesImplicit succeeded after resolution selected the upstream fixed TaylorDiff 0.3.6 release. There is no additional upstream OrdinaryDiffEq commit to merge for these failures.
Not verified locally: GPU/downstream suites, other Julia versions, full monorepo Everything, documentation builds, or new-head CI completion. No tests were skipped, disabled or loosened. Existing broken assertions were unchanged.
Risk assessment
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__4807 (no session URL)
Fix by Codex CLI 0.170.0 gpt-6-luna (head 21e088a)
Merged current
upstream/master(ace83e0140458338550e662329672dbba241dbd9) into the existing branch. Resolved the BDF test conflict by retaining both the PR's FBDF edit tests and upstream's QNDF history tests. Added local BDF and Tsit5 source entries to the NonlinearSolve test project so its composite resize tests exercise the repository's resize hooks.Validation
Fail-before and pass-after for the NonlinearSolve composite resize tests:
Composite Resize Tests | 120 passed, 20 failed, 8 erroredbecause the test environment resolved the registered BDF package.Composite Resize Tests | 192 passed.The full NonlinearSolve Core command then reached its existing Newton test error (
4 passed, 1 error,LineSearchException). An earlier clean-base control on4460ff80dad621418e6e3a9b63e4afb2e1f5fc02with the same resolved dependencies reproduced this Newton error. Current default-branch NonlinearSolve Core CI passes (run 44896678389).GROUP=Core timeout 3600 julia --compiled-modules=existing --project=lib/OrdinaryDiffEqNonlinearSolve -e 'using Pkg; Pkg.test(; julia_args=["--compiled-modules=existing"])'BDF Core passed, including
BDF Resize Tests | 95 95:GROUP=Core timeout 3600 julia --compiled-modules=existing --project=lib/OrdinaryDiffEqBDF -e 'using Pkg; Pkg.test(; julia_args=["--compiled-modules=existing"])'BDF QA passed: Allocation
5 passed, 18 broken, JET18 passed, 23 broken, Aqua21 passed. NonlinearSolve QA passed: JET13 passed, 33 broken, Aqua41 passed. Broken entries are existing assertions.Formatting and spelling checks exited 0 with no output:
CI started for head
21e088a156; I checked once after pushing and did not wait for completion.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-luna
Conversation: local session 01a1fe8d-ab96-7f62-9a0f-d96e0166a647 (no session URL)