Repository navigation
FBDF/QNDF: O(h²) BDF1 error estimate on the first step - #4615
Draft
ChrisRackauckas-Claude wants to merge 12 commits into
Draft
ChrisRackauckas-Claude wants to merge 12 commits into
ChrisRackauckas-Claude wants to merge 12 commits into
Conversation
Use an explicit-Euler predictor on the first order-1 step (and after restart) so u-u₀≈dt²u'' and the existing factor 1/2 yields an asymptotically correct BDF1 LTE. QNDF also zeros κ on cold start to match QNDF1. FBDF stepsize uses EEst at order 1 and grows past eps(t). Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI 2026.09.23-86fc751 Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/tmp_20260923_181807_1012334/jobs-root/jobs/4606-cursor/log.txt on amdci2.julia.csail.mit.edu
Covers t0=14400 tol=1e-8 iip/oop success and forced dt=1.8e-12 with nreject==0 for FBDF and QNDF. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI 2026.09.23-86fc751 Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/tmp_20260923_181807_1012334/jobs-root/jobs/4606-cursor/log.txt on amdci2.julia.csail.mit.edu
Remove the eps(t)-relative order freeze and forced step growth in the FBDF controller, and the order-1 terk -> EEst swap in stepsize_controller!. FBDF: use the explicit-Euler predictor only when there is no history (iters_from_event == 0, identity mass matrix) and compute the error from u - u0 without the ts-based rescaling, whose second node is not a history point yet. The Lagrange predictor and error are unchanged otherwise. Set dt to the representable increment (t + dt) - t, since the history nodes are the rounded times and dt of a few eps(t) otherwise makes the divided differences inconsistent (spurious EEst ~ 15 at t0 = 14400). QNDF: with an all-zero difference history, seed D[1] = dt*f(uprev) and take a plain BDF1 step (kappa = 0) with error constant 1/2, so the predictor and the D history stay consistent. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Agent-Harness: Claude Code (subagent of orchestrator session) Agent-Model: claude-opus-5-5[1m] Agent-Session: https://claude.ai/code/session_015tNYhuzygK9z8yhh6MNCAz
QNDF: keep the difference table empty until Newton succeeds on a no-history step. The explicit-Euler predictor is used only as the Newton guess and for the error, and D[1] = dt*f(uprev) is seeded right before update_D!, so a Newton failure followed by a smaller dt retries a plain BDF1 start instead of treating the trial predictor as accepted history. FBDF: round the endpoint t + dt toward t when choosing the representable step, so the step used in the formulas and taken by the integrator never exceeds the dt already limited by dtmax and the next tstop. Regression_I dense tests: a fixed-step QNDF solve is NDF1, so check it against the NDF1 recurrence and its leading error constant, and check the adaptive dense output against the analytic solution, instead of comparing the two with each other. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Agent-Harness: Claude Code (subagent of orchestrator session) Agent-Model: claude-opus-5-5[1m] Agent-Session: https://claude.ai/code/session_015tNYhuzygK9z8yhh6MNCAz
With a non-identity mass matrix and no history, the first-step error was (u - uprev)/2. After an inconsistent algebraic start (e.g. an adjoint DAE's terminal jump) that is O(1) in the algebraic rows and does not shrink with dt, so at t0 >> 0 the step fell below eps(t) and the solve aborted. Master masked this with the zero-filled ts[2] node, which scaled the estimate by 2dt/(t + dt), i.e. to about zero for t >> dt. Use M (u - uprev) - dt f(uprev), the explicit-Euler predictor error premultiplied by M, which needs no M inverse. Differential rows give the O(dt^2) BDF1 estimate, and algebraic rows give -dt g(uprev), which is zero for a consistent start and shrinks with dt otherwise. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Agent-Harness: Claude Code (subagent of orchestrator session) Agent-Model: claude-opus-5-5[1m] Agent-Session: https://claude.ai/code/session_015tNYhuzygK9z8yhh6MNCAz
SciMLSensitivity's DAE adjoints solve a mass-matrix ODEProblem with FBDF from an algebraically inconsistent start. On master the cold-start estimate is rescaled through the zero-filled ts[2] (about 2dt/(t+dt)), so the first step is accepted at a normal size, and the next step's Lagrange predictor only extrapolates the algebraic jump by h2/h1. An unscaled estimate, or M(u - uprev) - dt f(uprev) with or without the algebraic rows, forces a tiny first step, after which the second step extrapolates the whole jump and the adjoint aborts below eps(t). Keep the explicit-Euler cold start for identity mass matrices only, and restore master's predictor and estimate when mass_matrix !== I. Add a BDF regression with a stiff constraint started off the manifold at t0 >> 0. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Agent-Harness: Claude Code (subagent of orchestrator session) Agent-Model: claude-opus-5-5[1m] Agent-Session: https://claude.ai/code/session_015tNYhuzygK9z8yhh6MNCAz
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Agent-Harness: Claude Code (subagent of orchestrator session) Agent-Model: claude-opus-5-5[1m] Agent-Session: https://claude.ai/code/session_015tNYhuzygK9z8yhh6MNCAz
Choose the step to the representable endpoint nearest t + dt if it lies in [dtmin, dtmax] and does not pass the next tstop (landing on the tstop itself is allowed below dtmin, as in the core), otherwise its neighbor on the other side of t + dt. If neither is admissible, reject the step and terminate with ReturnCode.DtLessThanMin rather than stepping below dtmin or using a non-representable step. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Agent-Harness: Claude Code (subagent of orchestrator session) Agent-Model: claude-opus-5-5[1m] Agent-Session: https://claude.ai/code/session_015tNYhuzygK9z8yhh6MNCAz
When the core flags a step to land on a tstop or the tspan end, it commits t = tstop regardless of how t + dt rounds. Across t = 0, fl(tstop - t) can put t + dt one ulp past the tstop, and the bounded endpoint search rejected both candidates and terminated with DtLessThanMin. Use tstop - t for flagged steps, which matches the time the core commits. For other steps, hold the representable endpoint only to the bounds dt already satisfies, so a dt the core forces below dtmin is not rejected. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Agent-Harness: Claude Code (subagent of orchestrator session) Agent-Model: claude-opus-5-5[1m] Agent-Session: https://claude.ai/code/session_015tNYhuzygK9z8yhh6MNCAz
Remove _fbdf_representable_dt and its dtmin/dtmax/tstop handling, which moved core step-selection semantics into FBDF and read core-internal fields. FBDF now runs its step with integrator.dt set to the committed increment (t + dt) - t and restores the proposed dt afterwards, so the formulas agree with the times stored in the history while the core keeps its own bounds, tstop and retry decisions. The dtmin/dtmax cap tests move to the core follow-up (SciML#4656); the callback interpolation issue exposed by larger accepted first steps is SciML#4655. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Agent-Harness: Claude Code (subagent of orchestrator session) Agent-Model: claude-opus-5-5[1m] Agent-Session: https://claude.ai/code/session_015tNYhuzygK9z8yhh6MNCAz
This was referenced Sep 27, 2026
FBDF/QNDF: pass the step onto a tstop across an algebraic jump (diagonal mass matrices, #4660)
#4678
Draft
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-4615/log.txt
Member
Merged the default branch into this PR (clean merge, no conflicts; head 603ebca) 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 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please ignore until reviewed by @ChrisRackauckas.
What changed and why
With no history, FBDF used
u₀ = uand QNDF took an NDF1 step with an all-zero difference table. That made the first-step error estimate the whole incrementu - uprev, which is O(h). On a stiff transient this forces a tiny first step, and att0 = 14400that step is beloweps(t0), so the solve aborts (#4606). QNDF's first step was also inconsistent:(1-κ)(u - uprev) = h f(u)is backward Euler with steph/(1-κ). Both methods now take a plain BDF1 first step with an explicit-Euler predictor. FBDF also steps with the increment the integrator actually commits.iters_from_event == 0, identity mass matrix):u₀ = uprev + dt*fsalfirst, andlte = -(u - u₀)/2without thets-based rescaling, whose second node is still the zero-filled placeholder on a first step. Once history exists, the Lagrange predictor and error are unchanged. Mass-matrix problems keep master's first-step code; see Not fixed here.perform_step!setsintegrator.dt = (t + dt) - tfor the step and restores the proposeddtafterwards. The history is stored at the committed timesfl(t + dt), and whendtis a feweps(t)the nominaldtdiffers from that spacing. Att0 = 14400this mismatch gaveEEst = 15.6at step 6 (proposed 2.97e-12, committed 3.64e-12) and the solve aborted. The core's bounds, tstop and retry decisions are untouched. Every return path of the step goes back through the wrapper, which restoresdt. An exception propagates out of the solve.k == 1,Dall zero, identity mass matrix):κ = 0, with the explicit-Euler predictor as the Newton guess and in the error, and error constant 1/2.D[1] = dt*fsalfirstis seeded only after Newton succeeds, so a Newton-failure retry is again a plain BDF1 start. Afterupdate_D!,D[1] = u - uprev.test/Regression_I/ode_dense_tests.jl: the old QNDF check compared a fixed-step solve against the adaptive interpolant at tolerance 0.02. It passed only because master's inconsistent first step cancelled about half of NDF1's first-order error. QNDF now usescompare_fixed_step = false, a new keyword that defaults totrue, and gets independent references:rtol = 1e-12;err/hmust be within 2% of(1/2+κ)λ²u(1);Error constant. Let
u₀ = uₙ + h f(uₙ), and take one BDF1 step. Thenu_BE - u(t+h) = h²/2 u''andu(t+h) - u₀ = h²/2 u'', sou_BE - u₀ = h² u''and the BDF1 local error is(u - u₀)/2, which isκγ₁ + 1/2atκ = 0. The forceddt = 1.8e-12step from the issue givesEEst = 0.0845on both methods, against a true weightedh²|u''|/2 = 0.0865.Evidence
The new testsets in
lib/OrdinaryDiffEqBDF/test/bdf_regression_tests.jlwere each run standalone on this head and on master's sources (origin/master f9ce35d):dt=1.8e-12with 0 rejects; FBDF/QNDF, IIP/OOP)u'=u²,dt=0.8)u = 1.27389vs backward-Euler root1.38197)The last two testsets guard against regressions found in intermediate revisions of this PR. The mass-matrix testset failed 4/4 on 614629c, and the tstop testset failed 14/18 on db3acde. Both pass on master and on this head.
MWE from the issue, retcode naccept/nreject (IIP, OOP). Master is origin/master f9ce35d:
h ≈ 5e-13 < eps(14400))Forced first step
dt = 1.8e-12att0 = 0: master accepts FBDFdt = 1.2e-15after 3 rejects and QNDFdt = 5.5e-14after 2 rejects. This head accepts1.8e-12with 0 rejects on both (EEst = 0.0845).Other runs:
cd lib/OrdinaryDiffEqBDF && GROUP=Core julia +1.12 --project=. -e 'using Pkg; Pkg.test()':GROUP=Regression_I julia +1.12 --project=. -e 'using Pkg; Pkg.test()':test/Core3/dae_adjoint.jl, run with this branch's libraries developed:tstop-cross.jl: all 20 explicit FBDF/QNDF cases give Success, and the sweep has 0/300 failures for FBDF and QNDF, IIP and OOP.integrator(0.5) = 1.25, final2.75. That matches master's Rodas5P (1.25 / 2.75) and is close to ImplicitEuler and TRBDF2 (1.34375 / 2.84375) on the same problem. The bug is in the core and is tracked in Callback interpolation after a tstop-clamped step uses the restored proposal dt #4655. Master's FBDF does not hit it only because it never accepts that large first step.--checkandtyposon all changed files: clean.Not fixed here
dt. Pre-existing on master for ImplicitEuler, TRBDF2 and Rodas5P. This PR makes FBDF accept larger first steps, so FBDF now shows it too.modify_dt_for_tstops!snaps within 100 ulps regardless ofdt/dtmax, and the committed stepfl(t+dt) - tcan exceeddtmaxfor every solver. It also proposes a publiccommitted_stepAPI. Until that lands, FBDF's committed increment can be 1 ulp beyonddtmax, like every other solver, and in the snap case FBDF keeps master's mismatch.h^k u^(k)as the order-k error estimate.t ≫ dt. SciMLSensitivity's DAE adjoints start from inconsistent algebraic states and depend on that first step being accepted: an honest estimate broke Core3dae_adjoint.jlin an intermediate revision. A proper fix needs a consistent start.u₀ = ufirst-step predictor and is not changed.t0 = 14400f0, tol 1e-4 returns Success with an error of about 0.035 (found by a reviewer). The accuracy problem predates this PR.Push back on
integrator.dtfor the duration of FBDF's step, rather than a core-provided committed step (modify_dt_for_tstops! snaps within 100 ulps regardless of dt/dtmax; committed step can exceed dtmax #4656).compare_fixed_stepkeyword in the sharedregression_testhelper, and the replacement QNDF checks.iszero(D[1])as QNDF's "no history" test. It is also true for an exactly constant solution, where the step is equivalent.Fixes #4606
Risk assessment
GROUP=Core, rootRegression_I, SciMLSensitivity Core3dae_adjoint.jl48/48, the zero-crossing tstop sweep with 0/600 failures, and the issue's MWE at t0=14400, tol 1e-8, which fails on master (see Evidence above).Authors: Cursor Agent (model auto) first pass; revised by Claude Code (model claude-opus-5-5[1m]).
🤖 Generated with Claude Code
https://claude.ai/code/session_015tNYhuzygK9z8yhh6MNCAz
Risk assessment
Risk: medium
Blast radius: Step sequences and error estimates change for FBDF and QNDF on all identity-mass-matrix problems. Both are default stiff solvers, and FBDF is also picked by DefaultODEAlgorithm, so downstream numerical results move slightly: different accepted/rejected step counts and larger accepted first steps. The public API is unchanged. Two risky internals:
perform_step!now overwritesintegrator.dtwith the committed increment(t+dt)-twhile the step runs and puts it back afterwards. If the step throws,dtis not restored.iszero(D[1]).Because FBDF now accepts larger first steps, it exposes the existing callback-interpolation bug Callback interpolation after a tstop-clamped step uses the restored proposal dt #4655. The description discloses this.
Evidence: On head
acf2b3f09, 135 checks pass, 4 fail and 1 is skipped. The skipped one is the unexpanded sublibrary-ci matrix placeholder; the per-sublibrary jobs ran separately. All 4 failures also fail on master4a5c0e71b, the same way, so none is a regression:SciMLSensitivity.jl/Core1: pre-existing. Both fail with the same Mooncake/MooncakeAdjointError During Testatconcrete_solve_derivatives.jl:451.tests / GPU (julia 1): pre-existing. Both fail QNDFmass=diag_cuattest/gpu/dae_tests.jl:481; master fails 3 variants and the PR 1. This is the mass-matrix path, which the PR deliberately leaves alone (f.mass_matrix === Igate).downgrade-sublibraries (lib/DiffEqBase): pre-existing. Both fail the samehigh_level_solve.jl:94–101assertions (1 failed, 3 errored).downgrade-sublibraries (lib/OrdinaryDiffEqDifferentiation): pre-existing. Both fail with the sameMethodError: diag(::ScalarOperator).These pass on head: OrdinaryDiffEqBDF Core (Julia 1 and lts), BDF QA, BDF GPU, BDF downgrade, root QA, Regression_I and Regression_II (1/lts/pre), ModelingToolkit and the ModelingToolkit downstream groups.
The head's CI ran on 2026-09-27, about a week before the master runs I compared against. GitHub reports the PR as mergeable, but it has not been re-run on current master.
Test changes:
compare_fixed_step=falsekeyword on the sharedregression_testhelper.rtol=1e-12, the error constant within 2%, and a dense-output bound against the analytic solution.It is disclosed and the reasoning is given, but it is still the removal of an existing assertion. No
@test_brokenor skips were added and no tolerances were loosened. There are no review comments on the PR.Independent review: Devin CLI / fusion-claude-opus-5-5-high-sidekick-swe-2-medium rated it medium, medium-high confidence: CI shows no regressions and the description is unusually complete, but the PR changes the step-by-step numerics of default stiff solvers, briefly rewrites
integrator.dt, and replaces an existing QNDF regression check.Merge: needs human review. Findings:
integrator.dtswap is unprotected (notry/finally). The proper core API is deferred to modify_dt_for_tstops! snaps within 100 ulps regardless of dt/dtmax; committed step can exceed dtmax #4656.iszero(D[1])cold-start heuristic.Next review: must come from a non-Codex harness (round fixed by Codex CLI gpt-6.1-sol at head 3036e4e)
🤖 Risk assessment posted by an AI agent (fleet master) — harness: Devin CLI / fusion-claude-opus-5-5-high-sidekick-swe-2-medium; dispatched by Devin CLI 3000.11.3 fleet-master caretaker, model Fusion (claude-opus-5-5 medium + swe-2 medium)
Conversation: local Devin transcript speckle-whale (no session URL)
Independent review (Codex CLI 0.162.1 gpt-6.1-sol, head 3036e4e)
VERDICT: CHANGES
Needs verification of the failing downstream check; no additional implementation defect found. The startup correction is supported by local failing-before/passing-after evidence. Risk is high under H2, which explicitly names this PR: FBDF participates in default solver selection, and its error estimate and effective step increment change. The older medium ratings in the PR body do not meet the supplied criteria.
Local evidence: I extracted all four new BDF regression testsets and the new QNDF fixed-step/dense-output testset verbatim into tmp/newtests.jl, nested under one outer testset so all failures are collected. I ran them on scratch copies of head 3036e4e and base 59ba40e (the master parent of the merge), leaving repo's tracked files unchanged. Commands used JULIA_NUM_THREADS=4 JULIA_NUM_PRECOMPILE_TASKS=4 timeout 3600 choom -n 500 -- julia --startup-file=no --project=tmp/{head,base}/lib/OrdinaryDiffEqBDF -e 'using Pkg; Pkg.instantiate(); include("tmp/newtests.jl")'. Julia was 1.12.7.
Confirmed by running:
Gates: G1 is satisfied by analytic backward-Euler roots, exponential reference values, and the independently derived NDF1 recurrence/error constant. G2 has relevant successful AD and GPU jobs in the supplied head snapshot; no AD rule or GPU kernel is edited. G3 is satisfied for startup-history handling by the Newton-failure/fresh-start comparison, which exercises both mutable and constant caches. The general no-test-regressions gate remains unverified because of Core4. High risk requires Chris's decision even after verification is complete.
Not verified: Core4 failure logs, a matching master Core4 run, and a rerun of the failed CI check; the unauthenticated GitHub CLI reports that authentication is required. I did not run full BDF Core, root Regression_I, QA, downstream, GPU, or AD suites locally; passing jobs cited above come from the supplied snapshot. Exception recovery after the temporary integrator.dt assignment and the disclosed callback/tstop limitations were not independently reproduced.
🤖 Posted by an AI agent — harness: Codex CLI 0.162.1 · model: gpt-6.1-sol
Conversation: Codex exec session 01a14b1b-dafb-7012-900d-6ee67266e9a4 (no public URL)
Codex CLI gpt-6.1-sol rated it high (H2) at head 3036e4e
Round 1 fix — Core4 CI verification (2026-10-17)
The verification blocker in the Codex review at head
3036e4eis addressed by inspecting the failing PR and master Core4 job logs. No implementation changes were requested or made; the branch remains at3036e4ebb8d1881be98087a11f015566b9cd4eed.3036e4e, tested as merge284e45ainto master59ba40e— https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/38853472808/job/116819642536AssertionError: mi2 !== nothinga9cc40a— https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/39049524638/job/117453456193AssertionError: mi2 !== nothingBoth logs first report
2: EnsembleAlg = SciMLBase.EnsembleThreads(): Error During Testintest/Core4/ensembles.jl:19, followed by the exception above andthreadsfor_commonin Enzyme'ssrc/rules/parallelrules.jl:233. Both end withSome tests did not pass: 15 passed, 0 failed, 1 errored, 2 broken.This establishes that the reported Core4 failure also occurs on master; it does not establish that Core4 passes.Dependency comparison: both use Julia 1.13.2, SciMLSensitivity 7.119.13, Enzyme 0.13.216, EnzymeCore 0.8.23, LLVM 9.13.2, GPUCompiler 1.23.0, SciMLBase 3.58.0 and OrdinaryDiffEqBDF 2.4.13 (each run develops its respective repository sources). Comparing all 379 package/version entries found 17 version differences, so these are not identical locked environments. The same exception, test location and Enzyme source location occur in both.
Commands run and observed results:
gh run view 38853472808 --repo SciML/OrdinaryDiffEq.jl --job 116819642536 --log: downloaded and inspected the PR failure above.gh run list --repo SciML/OrdinaryDiffEq.jl --branch master --workflow IntegrationTest --limit 5 --json databaseId,headSha,conclusion,createdAt,url: latest run39061511222is still in progress; latest completed run39049524638failed.gh run view 39049524638 --repo SciML/OrdinaryDiffEq.jl --job 117453456193 --log: downloaded and inspected the matching master failure above.gh run rerun 38853472808 --repo SciML/OrdinaryDiffEq.jl --failed: succeeded; attempt 2 Core4 job is queued at https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/38853472808/job/117487737409. Its outcome is not yet verified.The newest master's Core4 job is also queued: https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/39061511222/job/117483269136. The comparison uses the latest completed run rather than claiming an outcome for a queued job. The existing Codex high-risk H2 assessment and requirement for Chris Rackauckas's merge decision remain in force. This note is verification evidence, not an independent review or merge verdict.
🤖 Posted by an AI agent — harness: Codex CLI 0.162.1 · model: gpt-6.1-sol
Conversation: local session 01a14b67-8e86-7591-bb3d-5a6e854c5121 (no session URL)
Risk assessment (independent review, Codex CLI 0.164.0-alpha.11.1 gpt-6-astra, slot 1, head 3036e4e)
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: Corrects FBDF/QNDF startup error scaling and adds analytic recurrence, retry and shifted-time tests. A paired full-package probe confirms that the newly accepted large FBDF first step exposes wrong callback interpolation and a wrong final solution after a callback rewind.
Blast radius: FBDF and QNDF identity-mass startup/restart paths, QNDF cold-start history after nonlinear failure, FBDF committed-time rounding, and callbacks reached by the changed accepted-step sequence.
Evidence: Head BDF Regression CI passes 97/97. With the same external dependency resolution, the analytic callback probe is accurate on current master but returns 1.25 instead of 1.5 on head, and a rewind ends at 2.75 instead of 3.0 despite Success. Current-head Enzyme Core4 failure matches recent completed master.
Blocking findings
lib/OrdinaryDiffEqBDF/src/bdf_perform_step.jl:1557— confirmed by running: foru' = 1,u(0) = 1,tspan = (0,2),FBDF(),dt = 5,tstops = [1], and tolerances1e-8, this predictor/error-estimator change accepts the initial interval[0,1]. A discrete callback at 1 querying the midpoint of its accepted interval obtains1.2499999999999998instead of the analytic1.5. Rewinding to that same valid midpoint withchange_t_via_interpolation!makes the final state2.7499999988532386instead of3.0, withReturnCode.Success. The same dynamic-midpoint probe on current master with matching external dependencies gives midpoint and final values within1e-8of their analytic answers. The underlying core defect predates this PR:lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl:637restores the proposed step length beforehandle_callbacks!, so interpolation divides by the wrong interval. This PR exposes it on a previously accurate FBDF call. Integrate or require the accepted-step-length correction in companion PR Fix callback interpolation at tstops and restart BDF after rewinds #4664 before merging this startup change, and retain an analytic callback/interpolation/rewind regression. The correction costs one saved scalar step length and a regression solve; it requires no new numerical approximation.Non-blocking findings
None.
What I ran
git rev-parse HEAD; full SHA matches the recorded PR head.git diff origin/master...HEAD; inspected all changed files and relevant callers/test wiring. RootAGENTS.mdandCLAUDE.mdare absent. Initial risk was recorded before reading the author's risk assessment.git log -1 --first-parent --no-merges --format=%B; uses the newest PR-line non-merge commit, excluding master commits imported by a merge.gh pr view 4615 --repo SciML/OrdinaryDiffEq.jl --json number,url,state,isDraft,headRefOid,baseRefName,baseRefOid,title,files,statusCheckRollup;gh pr checks 4615 --repo SciML/OrdinaryDiffEq.jl --json name,state,bucket,link,workflow; read the PR body after the initial risk freeze. Retrieval/git commands exited 0; failed check outcomes are described separately below.gh issue view 4606 --repo SciML/OrdinaryDiffEq.jl --json title,body,state,urlandgh issue view 4655 --repo SciML/OrdinaryDiffEq.jl --json title,body,state,url: read the original shifted-origin startup failure and the callback interpolation report after the initial independent risk assessment.3036e4ebb8d1881be98087a11f015566b9cd4eedand base14b964b315e1310b5e3621a1bcfe6b92e9e506aa, using the same external dependency Manifest. Both evaluations completed normally; this probe prints observations rather than asserting, and has no separate process exit code.tprev = 0.5396984964784779,tmid = 0.769849248239239, and see1.7698492478878176versus expected1.769849248239239. Final states are2.9999999998265485without rewind and2.9999999994411772with rewind, both Success. Head usestprev = 0,tmid = 0.5, and sees1.2499999999999998versus1.5; final states are3.000000000103964without rewind and2.7499999988532386with rewind, both Success. Every query is strictly inside its current accepted interval. The independent oracle isu(t) = 1+t; comparing against1e-8shows base passing and head failing this regression contract.gh run view 38853472960 --repo SciML/OrdinaryDiffEq.jl --job 116842551277 --log, exit 0: BDF Core, Julia 1.13.2,BDF Regression | 97 97. Source inspection verifies analytic backward-Euler roots, exponential solutions and the independently derived NDF1 recurrence/error constant. The fixed/adaptive comparison is replaced with these independent checks and a derived dense-error bound, rather than merely dropping numerical coverage.gh run view 38853472808 --repo SciML/OrdinaryDiffEq.jl --log-failed, exit 0: current Core4 attempt fails attest/Core4/ensembles.jl:19withAssertionError: mi2 !== nothingin Enzyme's threaded rule; 15 pass / 1 error / 2 broken.gh run list --repo SciML/OrdinaryDiffEq.jl --branch master --event push --limit 5; inspected the IntegrationTest-specific recent list.gh run view 41050161729 --repo SciML/OrdinaryDiffEq.jl --log-failed, exit 0: latest completed master IntegrationTest has the same Core4 test, exception, Enzyme threaded stack and 15 pass / 1 error / 2 broken. This establishes observed failure parity; it does not make either check green or establish identical locked dependencies for those CI runs.What I did not verify
I did not rerun all new first-step tests on the unfixed base, the full BDF suite, or the root Regression_I suite locally. The earlier review's 60/60 head and 34-pass/26-fail base results are attributed prior evidence, not my executions. GPU/AD suites and the companion #4664 fix were not executed locally for this review. G1 is supported by analytic roots/exponentials and the recurrence checks; G3 includes Newton-failure/retry history tests, but the new callback regression is missing. No speedup is claimed. The first assessment froze risk and candidates before opening the PR description. A fresh independent assessor then froze a complete review of this exact PR head before reading its description, any prior review, other assessment notes, or coordinator-run Julia output. The final comparison and REVIEWER_GRADE below come from that fresh assessment. It subsequently evaluated prior same-head findings and newly available raw execution evidence; prior claims are distinguished from executions in this review session. The independent freeze remains unchanged. The fresh frozen static review initially found no blocker. Post-freeze inspection of the paired analytic callback execution changed its final verdict to CHANGES; this revision is not presented as a finding already in the blind freeze.
🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5
Conversation: https://claude.ai/code/session_01379heiiB35TtywhR7uSU74