Skip to content

Skip the step between tstops an ulp apart - #4805

Draft
ChrisRackauckas-Claude wants to merge 6 commits into
SciML:masterfrom
ChrisRackauckas-Claude:fix-4750-tstops-ulp-apart
Draft

ChrisRackauckas-Claude wants to merge 6 commits into
SciML:masterfrom
ChrisRackauckas-Claude:fix-4750-tstops-ulp-apart

Conversation

@ChrisRackauckas-Claude

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

Copy link
Copy Markdown
Member

Status: blocked. Do not merge as is.

An independent review (Devin, SWE-2 Fusion with Opus 5.5) found two blocking defects. I reproduced both on the current head (9e7364c53f); probe scripts are probe.jl and probe_sde.jl (u' = -u; du = dW):

  1. Stale dense output on the skipped interval. The skip records [t_n, t_n + gap] with uprev == u but with integrator.k left over from the previous step.

    this PR master
    Rodas5P sol'(70*0.01) (exact −0.4966) +4.90e12 −0.5000
    FBDF sol'(70*0.01) −2.55e12 −67.9
    50-ulp gap, max |sol − exact|: Rodas5P / FBDF 3.7e-5 / 3.1e-3 2.2e-14 / 3.2e-12
    50-ulp gap, max |sol' − exact'|: Tsit5 / Rodas5P / FBDF 4.9e-3 / 2.7e10 / 5.8e11 1e-12 / 6.6e-3 / 0.84
  2. SDEs lose the Brownian increment over the gap. With du = dW, tstops [0.7, 0.7 + 50eps] and seed 1234, |u(T) − W(T)| is 7.5e-8 (EM) and 3.1e-8 (SRIW1) on this PR, and 0 / 2.2e-16 on master.

Why I am not patching it. Repairing finding 1 means storing interpolation data that makes the gap interpolate to the constant u_n with derivative f(u_n, t). That data is method-specific:

  • explicit RK stores stage derivatives in k;
  • Rosenbrock stores scaled differences;
  • FBDF interpolates from its own history.

The sol interpolation also has several entry points (scalar, vector, in-place, and the integrator's current interpolant), and none of them has a per-interval override. Narrowing to the 1-ulp case does not help either: it leaves the bad interval at the node. Master's real ulp step is also poor there (FBDF derivative −67.9, and up to 30 in a 2-ulp gap), so the requested Val{1} assertion at the stops cannot pass for FBDF by going back to master's behaviour.

What the skip actually buys. On current master, issue reproducer, accepted / rejected:

#4751 alone #4751 + this PR
Tsit5 1017 / 0 1017 / 0
Rodas5P 1017 / 0 1017 / 0
FBDF 1280 / 94 1043 / 2

With #4751 merged, the generic skip gains nothing for one-step methods. Its only win is FBDF, where the ulp step enters the variable-step history.

Proposal.

  • Do not widen the core skip. Close this PR, or keep it as a record.
  • Land Restore the controller's step after a step shortened onto a tstop #4751, which removes the regrowth for every method.
  • Fix the FBDF residual in OrdinaryDiffEqBDF. For example, keep a step shorter than the 100-eps tstop tolerance out of the BDF history and order/step-size logic, while still computing a real step so that dense output stays valid. That is a separate, BDF-local design.
  • The poor dense derivative of a genuine ulp-sized step on master (Rodas5P, FBDF) is pre-existing and separate; it could get its own issue.

The non-blocking point about stale EEst and double dt growth becomes moot if the skip is not widened. If it were kept, the controller would need to be bypassed for the skipped step rather than fed the previous EEst, and that interacts with #4751's restore logic.


When the next tstop is within the 100-eps snapping tolerance that modify_dt_for_tstops! already uses (e.g. 0.7 from 0:0.1:T next to 70 * 0.01 from a 10 ms PeriodicCallback), solve! now moves t onto it without calling perform_step!. This widens the existing skip in handle_tstop_step!, which only covered dt < eps(t) and so missed the common exactly-one-ulp case (dt == eps(t)). Both times are still visited, so callbacks at either time still fire; the ulp step just no longer costs f evaluations or enters a multistep (FBDF) history. The tolerance computation is factored into _tstop_tol and shared by both sites.

This is the half of #4750 that is independent of #4749. The step-size regrowth after the skipped stop is #4749, addressed by the open #4751; this PR does not depend on it and they compose (one trivial adjacency conflict in integrator_utils.jl).

Verification

Regression test in test/InterfaceI/ode_tstops_tests.jl: for Tsit5, Rodas5P and FBDF, solving to 70 * 0.01 with a tstop at 0.7 must cost the same f evaluations and give the same u as solving to 0.7, with a DiscreteCallback firing at both times.

Before the fix (src stashed): 7 passed, 6 failed

  Expression: sol2.stats.nf == sol1.stats.nf
   Evaluated: 87 == 81
  Expression: sol2.u[end] == sol1.u[end]
   Evaluated: 0.4965853038395246 == 0.49658530383952465
  ... (same pair for Rodas5P: 134 == 123, FBDF: 147 == 144)
Test Summary:                               | Pass  Fail  Total
tstops an ulp apart do not take an ulp step |    7     6     13

After:

Test Summary:                               | Pass  Total
tstops an ulp apart do not take an ulp step |   13     13

Issue reproducer (accepted / rejected, "ticks + save times" rows):

master this PR this PR + #4751
Tsit5 1242 / 0 1238 / 0 1017 / 0
Rodas5P 1242 / 0 1240 / 0 1017 / 0
FBDF 1319 / 102 1304 / 78 1043 / 2

("ticks only" baselines: 1000/0, 1000/0, 1026–1028/2.) With both, the 17 extra accepted steps are the skipped ulp "steps", which cost no f evaluations. Alone, this PR removes the ulp perform_step! but most of the remaining cost is the #4749 regrowth.

Whole test/InterfaceI/ode_tstops_tests.jl:

Test Summary: | Pass  Total     Time
Tstops Tests  |   75     75  1m24.2s

Runic and typos are clean on both changed files.

Not verified

  • I did not run the full InterfaceI group or any other group locally (machine heavily loaded); only the tstops test file. CI covers the rest.
  • StochasticDiffEq / DelayDiffEq: handle_tstop_step! is in OrdinaryDiffEqCore and used by solve!; I did not run their suites.
  • step! does not go through handle_tstop_step! (before or after this change), so stepping manually still performs the ulp step.

For the reviewer

  • The skip threshold is now 100 eps of max(|t|, |t + dt|) rather than 1 eps. Skipping means the state is not advanced over up to ~100 ulps of time; with |f| * 100 eps(t) below rounding of u for any realistic problem this is harmless, but a very fast-varying f at large |t| would see an O(|f'| * 100 eps(t)) state lag. 100 eps is the same tolerance already used to snap onto stops.
  • In the skip path the step controller still runs on the previous step's error estimate (as it already did for the dt < eps(t) case).

Refs #4750 (does not fix it as is; see Status)

Please ignore this draft until reviewed by @ChrisRackauckas.

Risk assessment

  • Risk: high
  • Blast radius: core solve! loop in OrdinaryDiffEqCore for ODE and SDE solves with tstops: dense output and derivatives on skipped intervals, ContinuousCallback root-finding, SDE noise.
  • Evidence: blocking defects reproduced (see Status).
  • Independent review: Devin CLI 3000.11.3, fusion-claude-opus-5-5-high-sidekick-swe-2-medium, rated it high, CHANGES: stale interpolation data and dropped Brownian increment on the skipped interval.
  • Merge: do not merge; see the proposal in Status.

🤖 Generated with Claude Code 2.1.293 (model: claude-opus-5-5), transcript /log.txt

🤖 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 3d5e109)

Merged upstream master to bring in TaylorDiff 0.3.6 for both Taylor sublibraries. The earlier jobs selected 0.3.5 and failed to precompile with TypeError: non-boolean (Symbolics.Num) used in boolean context. Both jobs passed on master and in local downgrade replays.

Withdrew the 100-ULP tstop skip. The solver code matches master. The new tests cover analytic state updates, dense values and derivatives, exact discrete callback times, a continuous root, and the saved Wiener path. The FBDF performance problem remains open.

Validation

The focused runner included the complete ODE and SDE tstop test files against the same dependency environment on Julia 1.12.4. The before run used the merge commit's widened skip. The after run used this head.

timeout 3600 julia --startup-file=no --compiled-modules=existing -O1 "$SCRATCH/tstop-regressions.jl"
Before exit 1; after exit 0
Tstop regressions                                                 |  124    14    138  2m37.7s
    State updates on short tstop steps                            |    4     4      8     3.1s
    Dense output between close tstops                             |   17     7     24     4.9s
    Continuous callback near close tstops                         |          2      2     3.5s
    Brownian increment between close tstops                       |    3     1      4     1.2s
Tstop regressions |  138    138  2m28.1s

The full interface and QA groups also passed on Julia 1.12.4.

for group in QA InterfaceI; do
    GROUP="$group" timeout 3600 julia --compiled-modules=existing --project=. -e 'using Pkg; Pkg.test(; julia_args=["--compiled-modules=existing"])'
done
GROUP=Interface1 timeout 3600 julia --project=lib/StochasticDiffEq -e 'using Pkg; Pkg.test()'
GROUP=QA timeout 3600 julia --compiled-modules=existing --project=lib/StochasticDiffEq -e 'using Pkg; Pkg.test(; julia_args=["--compiled-modules=existing"])'
Quality Assurance Tests |  111    111  39.8s
     Testing OrdinaryDiffEq tests passed
Tstops Tests  |  103    103  1m38.6s
     Testing OrdinaryDiffEq tests passed
tstops Tests  |   35     35  20.0s
Solver Reversal Tests |  152    152  19m46.3s
     Testing StochasticDiffEq tests passed
Quality Assurance |   20     20  2m27.9s
JET           |    6      6  19.4s
     Testing StochasticDiffEq tests passed

For each Taylor project, the CI downgrade action resolved TaylorDiff 0.3.6 on Julia 1.11.9. The commands ran with the workflow's skip list and GROUP=Core.

julia +1.11.9 --startup-file=no "$DOWNGRADE_ACTION" "$EFFECTIVE_SKIP" "$project" alldeps 1.11 ""
julia +1.11.9 --startup-file=no --compiled-modules=existing --project="$project" -e 'using Pkg; Pkg.instantiate(); Pkg.build(); Pkg.test(; allow_reresolve=false, julia_args=["--compiled-modules=existing"])'
  [b36ab563] TaylorDiff v0.3.6
     Testing OrdinaryDiffEqTaylorSeries tests passed
  [b36ab563] TaylorDiff v0.3.6
Implicit Solver Convergence Tests |    4      4  1m17.2s
     Testing OrdinaryDiffEqTaylorSeriesImplicit tests passed

Runic and spelling passed with empty output. files contains the three Julia files changed by the fix commit.

julia --project=@runic -m Runic --inplace "${files[@]}"
julia --project=@runic -m Runic --check "${files[@]}"
typos "${files[@]}"
git diff --check

GPU, prerelease Julia, and downstream tests were outside the local validation.

Links

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 01a2018d-3ebc-7c80-95db-de9a980711b2 (no session URL)

When the next tstop lies within the 100-eps snapping tolerance that
modify_dt_for_tstops! already uses (e.g. 0.7 from 0:0.1:T next to
70 * 0.01 from a periodic callback), solve! now moves t onto it without
calling perform_step!, extending the existing skip that only covered
dt < eps(t). The ulp step no longer costs function evaluations or enters
a multistep history, and callbacks still fire at both times.

Fixes SciML#4750

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude <[email protected]>
Agent-Harness: Claude Code 2.1.293
Agent-Model: claude-opus-5-5
Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/jobs/fix-OrdinaryDiffEq.jl-4750/log.txt on amdci2.julia.csail.mit.edu
@ChrisRackauckas

Copy link
Copy Markdown
Member

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

Independent review (Devin CLI 3000.11.3, model fusion-claude-opus-5-5-high-sidekick-swe-2-medium): CHANGES, risk high.

Full review

VERDICT: CHANGES
RISK: high

This changes the core solve! step loop in OrdinaryDiffEqCore. ODE and SDE solves that use tstops go through it. DDE solves do not, because DelayDiffEq.solve! calls perform_step! directly.

Blocking findings

  1. The skipped step leaves stale interpolation data in the solution, so dense output and derivatives near the skipped stops are wrong. Confirmed by running. Location: lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl:327-338 (handle_tstop_step!).
    In the skip path integrator.accept_step = true is set without perform_step!. _loopfooter! then accepts the step, sets tprev = t_n, moves t onto the next stop and saves the interval. That interval has uprev == u == u_n, but integrator.k still belongs to the previous step [t_{n-1}, t_n]. Methods whose interpolant does not collapse to u_n under those conditions return garbage on [t_n, t_n + gap]:

    • Rosenbrock: Θ1*y₀ + Θ*(y₁ + Θ1*(k[1] + Θ*k[2])), rosenbrock_interpolants.jl:200.
    • FBDF.
    • Derivatives (Val{1}) for every method, including Tsit5.

    On master the old skip only fired for dt < eps(t), so there was no float strictly inside the interval and the problem could not be seen. The PR widens the skip to dt <= 100 eps and also covers the 1-ulp case, so the bad interval now has interior points and a node where the derivative is evaluated.
    Commands: scratch/probe.jl and scratch/probe2.jl, each run with MODE=pr (PR code) and MODE=master (master's handle_tstop_step! @eval'd back in). Problem: u' = -u, u(0) = 1.

    • The issue's own 1-ulp case, tstops [0.7, 70*0.01], abstol/reltol 1e-8. Exact value is -4.965853e-01.

      PR sol(70*0.01, Val{1}) master
      Rodas5P +4.902200e+12 -5.000000e-01
      FBDF -2.547620e+12 -6.79e+01 (also bad, but 10 orders of magnitude less)
    • Gap of 2 to 90 ulp, abstol/reltol 1e-10. Max |sol(t) − exp(−t)| inside the gap:

      PR master
      Rodas5P 3.732e-05 2.2e-14
      FBDF 2.891e-03 3.2e-12
      Tsit5 sol'(t) 4.5e-03 1e-12
    • The issue's scenario, but with ticks built by accumulating t += 0.01 (a normal way to build a periodic grid). This gives save/tick pairs 1 to 99 ulp apart, all inside the new window. Max error over all interior floats of the gaps:

      PR value / derivative master value / derivative
      Rodas5P 9.3e-06 / 3.3e+12 4.3e-15 / 3.2
      FBDF 4.5e-03 / 6.5e+14 2.8e-08 / 78
    • A ContinuousCallback fires spuriously and at the wrong time. Condition u - c with c = exp(-0.7) - 1.866e-5, tstops [0.7, 0.7 + 50 eps(0.7)]. The only true crossing is t* = 0.7000375773315405.

      • Rodas5P on the PR fires at [0.7000000000000007, 0.7000012732539328]: one event inside the skipped gap that does not exist, then one event 3.6e-5 early.
      • Rodas5P on master fires once at 0.7000375773315837.
      • Tsit5 and FBDF are correct in both modes for this threshold.

    Required change: the skip must leave consistent interpolation data for the interval it records. Either fill k (or the method's interpolation cache) so that the interval interpolates to the constant u_n with derivative f(u_n, t), or don't record an interpolation interval for the skipped stop at all. The regression test must also check sol(t) and sol(t, Val{1}) at the stops and at interior floats of a multi-ulp gap, for Rodas5P and FBDF. The current test checks only nf and u[end], which is why this got through.

  2. SDEs: the skip throws away the Brownian increment over the gap. Confirmed by running. Location: same function. SDEIntegrator = ODEIntegrator{<:SDEAlgTypes} (lib/StochasticDiffEqCore/src/integrators/type.jl:23) uses this solve!. In the skip path apply_step!/accept_noise! still advance W by dt, but u never gets the increment.
    Probe: du = dW (f = 0, g = 1), so u(T) == W(T) must hold exactly for EM. Tstops [0.7, 0.7 + 50 eps(0.7)], seed = 1234:

    | | EM |u(T) − W(T)| | SRIW1 |u(T) − W(T)| |
    |---|---|---|
    | PR | 7.457e-08 | 3.131e-08 |
    | master | 0.0 | 2.2e-16 |

    The noise over 100 ulp scales as sqrt(dt) ≈ 1e-7, so it is not below rounding the way the PR body's argument ("|f| * 100 eps(t) below rounding") assumes for drift. That argument does not hold for diffusion. Required: exclude integrators with a noise process from the widened skip, or apply the increment. Also add an SDE test.

Non-blocking findings

  • Suspected from reading: in the skip path, _loopfooter! runs stepsize_controller! and step_accept_controller! on the previous step's stale EEst. Because next_step_tstop is set, it also restores dt = dtpropose first. So the growth factor from the landing step can be applied twice, without a new error estimate, and the PI/PID controller histories record a fake step. The PR body notes the stale estimate but not the double growth. In my runs Tsit5 and Rodas5P showed no rejections, so I saw no harm, but this deserves a comment or a guard.

  • Confirmed by running: the PR makes the skip silently change the state. For Tsit5 with accumulated ticks, |u(10) − exact| is 2.28e-16 on the PR vs 2.05e-18 on master. This is far below tolerance here, but it is an O(|f| · 100 eps(t)) per-stop error that grows with |t|. The PR body acknowledges it.

  • Confirmed by running: the accumulated-ticks setup gives slightly more accepted steps on the PR than on master:

    PR naccept master naccept
    Tsit5 2218 2203
    Rodas5P 2215 2203
    FBDF 2583 2561

    nf is lower on the PR. Skipped stops are counted as accepted steps. The claim of a cheaper solve holds for nf, not for naccept.

  • Pre-existing, not caused by this PR: with tstops [0.7, 70*0.01], SRIW1 aborts with DtLessThanMin at t=0.7000000000000001 on both master and the PR.

  • Rules: the diff is a single concern. It adds no dependencies and no exports. 3 comment lines out of ~34 added, and they describe present behaviour. Runic and typos are clean.

  • Sibling work: Restore the controller's step after a step shortened onto a tstop #4751 (open) rewrites the landed/dtpropose restore in _loopfooter!. The stale-EEst double-growth point above interacts with that rewrite, so the fix for finding 1 should be coordinated with it. I did not test the two PRs together.

What I ran

All runs used Julia 1.11.9, a scratch env with every lib/* package and the repo root Pkg.developed from the PR checkout, and TMPDIR under the review dir.

  • PR regression test, PR vs master code: master gives 3 passed / 6 failed, with exactly the PR body's numbers (87 == 81, 134 == 123, 147 == 144, and the u[end] 1-ulp mismatches). The PR passes all 9 assertions. The body's before/after claim reproduces.
  • The issue reproducer: the PR gives Tsit5 1238/0, Rodas5P 1240/0, FBDF 1304/78; master gives 1242/0, 1242/0, 1319/102. This matches the PR body's table. The "+ Restore the controller's step after a step shortened onto a tstop #4751" column was not checked.
  • test/InterfaceI/ode_tstops_tests.jl in full on the PR: Tstops Tests | 75 75 (passes).
  • lib/StochasticDiffEq/test/tstops_tests.jl on the PR: 31/31 pass. It does not cover the noise drop above.
  • Probes scratch/probe.jl and scratch/probe2.jl (logs in scratch/pr.log, master.log, p2pr.log, p2master.log) covered:
    • dense output and derivative inside gaps;
    • the derivative at the stop;
    • spurious ContinuousCallback events;
    • the SDE u(T) == W(T) invariant;
    • the accumulated-tick grid.
  • julia +1.12 --project=@runic -m Runic --check on both changed files: clean. typos on both changed files: clean.
  • No Julia processes from this review are left running.

What I did not verify


🤖 Posted by an AI agent — harness: Devin CLI 3000.11.3 (review), 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)

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-4805/log.txt
@ChrisRackauckas

Copy link
Copy Markdown
Member

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

Merged the default branch into this PR (clean merge, no conflicts; head 053b233) so CI runs on current master. Its earlier failures in SciMLSensitivity Core1 and the downgrade jobs were fixed on master after this PR's last CI run.


🤖 Posted by an AI agent — harness: Devin CLI 3000.11.3 (merge), Claude Code 2.1.285 (posting) · model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium
Conversation: local Claude session 3c311569-dda6-4687-bc9f-65febb212c33 (fleet master)

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

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

Independent review (Codex CLI 0.166.0 / gpt-6.1-sol), session 01a1975c-6740-7471-b8d5-4a4e37a1d58c, reviewed head 9e7364c

  • Verdict: CHANGES
  • Risk: high (H2: default-path numerical updates are omitted for tstop steps up to 100 ULPs; MH1 also applies to callback and interpolation behavior).
  • Round / slot: 1 / 1
  • Blocking priorities: P1, P2

Review written by the reviewer named above in a session other than the PR author's, and copied here by the posting agent without change to its findings. The posting agent did not re-run the reviewer's commands.

Summary: The PR skips numerical steps between nearby floating-point tstops while preserving callback times. Its regression test fails before and passes after, but independent analytic probes confirm lost state updates, corrupted dense output, and dropped stochastic increments, requiring changes.

Blast radius: Floating-point tstop handling in ODE and SDE solve! paths, including Tsit5, Rodas5P, FBDF, callbacks, dense interpolation, and solver caches. The final tspan endpoint is also a tstop.

Evidence: Blind assessment sealed in INITIAL.md and INITIAL.sha256 before author context. On Julia 1.13.2, the complete head tstops file passes 75/75; the same file on merge-base passes the 62 existing assertions but the added test has 7 passes and 6 failures. Independent analytic baseline diagnostics satisfy all 11 probe conditions, whereas head satisfies only 2 and fails 9. CI has 256 successful checks, two failures, and three skipped checks; both exact failures also appear in inspected master logs.

Blocking findings

  1. [P1] The time-only threshold discards significant deterministic state updates — confirmed by running, lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl:330. For gap = 50eps(1.0), u0 = 0, tspan = (1.0, 1.0 + gap), and constant u' = 1/gap, both Tsit5 and Euler return Success with final state 0 instead of the exact 1. With ordinary u' = 1 at t0 = 1e12, the same 50-ULP interval is 0.006103515625 time units: both methods again return 0 instead of 0.006103515625. These probes use dt = gap, adaptive = false, and absolute/relative tolerances of 1e-12; base computes the exact increments within floating-point rounding. A small distance relative to the time coordinate does not bound the state error. Retain the numerical update; any omission needs a justified error bound tied to state and tolerances rather than time ULPs alone.
  2. [P1] Skipped intervals reuse incompatible dense-output data — confirmed by running, lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl:334. For u' = -u, u(0) = 1, stops at a = 0.7 and endpoint b = a + 50eps(a), query q = a + 20eps(a) should give u(q) = exp(-q) and u'(q) = -exp(-q). With solver tolerances 1e-10, head Rodas5P has value error 3.586e-5 and derivative -5.331e9; FBDF has value error 0.001925 and derivative -5.792e11. The exact derivative is approximately -0.496585. Base value errors are 2.154e-14 and 3.246e-12, with derivatives -0.49 and -0.522153 respectively. The skip leaves k/history unrefreshed while the footer saves an interval and evaluates callbacks normally. Retain valid solver-specific interpolation data and test interior values and derivatives; address BDF history handling without fabricating an ordinary completed numerical step. Continuous-callback consequences are suspected from reading, not separately exercised.
  3. [P1] The shared skip also drops Brownian increments — confirmed by running, lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl:334. For du = dW, u(0) = 0, EM with dt = 0.01, adaptive = false, seed 1234, tstops = [0.7], and endpoint 0.7 + 50eps(0.7), the exact pathwise solution is u(T) = W(T). Base gives equality exactly. Head returns Success with u(T) = 1.2976782191507106 versus saved W(T) = 1.297678293719505, losing 7.456879447254039e-8. Stochastic increments scale as the square root of time and cannot be dropped using the ODE rounding rationale. Exclude stochastic solves from this omission or compute their required drift/noise update, and add a pathwise additive-noise regression.
  4. [P2] The added regression does not supply independent accuracy or stale-cache evidence — suspected from reading, test/InterfaceI/ode_tstops_tests.jl:329. Comparing endpoint states to another solve and asserting identical RHS counts detects the requested omission, but does not establish numerical accuracy over that interval. The analytic counterexamples above pass baseline conditions and fail on head while all 13 added assertions pass. Add analytic tests for state evolution and dense values/derivatives over the gap, plus stochastic coverage of the shared path, to satisfy G1 and G3. Equality to another solve is useful for equivalence testing but is insufficient as the accuracy oracle here.

Non-blocking findings

None.

What I ran

  • Git inspection commands succeeded: git -C src status --short, git -C src rev-parse HEAD, git -C src fetch origin '+refs/pull/4805/head:refs/remotes/pr/4805' master, git -C src checkout --detach pr/4805, git -C src diff --stat origin/master...HEAD, git -C src diff origin/master...HEAD, git -C src rev-parse origin/master, and git -C src merge-base origin/master HEAD. The checkout was clean. The tested base is merge-base 59ba40e, also reported as baseRefOid by the PR metadata. The fetched master tip is d035621. A separate base source tree was extracted with git -C src archive 59ba40e4b5bbae713d8df7b792f6ea62f033ff78 | tar -x -C base.
  • gh pr view 4805 --repo SciML/OrdinaryDiffEq.jl --json number,url,state,isDraft,headRefOid,baseRefName,baseRefOid confirmed the listed head and an open draft. After sealing the blind assessment, I read the PR description, gh issue view 4750 --repo SciML/OrdinaryDiffEq.jl, and the author's trailers using git -C src log -1 --no-merges --format=%B origin/master..HEAD. No prior-review file was read.
  • Exactly three Julia runs, sequentially, on Julia 1.13.2/aarch64. These commands represent the supplied depot by SHARED_DEPOT to omit machine-local paths:
JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 JULIA_NUM_PRECOMPILE_TASKS=1 TMPDIR="$PWD/tmp" JULIA_DEPOT_PATH="$SHARED_DEPOT:" timeout 3600 julia +1.13.2 --startup-file=no run_head.jl
JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 JULIA_NUM_PRECOMPILE_TASKS=1 TMPDIR="$PWD/tmp" JULIA_DEPOT_PATH="$SHARED_DEPOT:" timeout 3600 julia +1.13.2 --startup-file=no --compiled-modules=existing run_base.jl
ASSERT_PROBES=true JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 JULIA_NUM_PRECOMPILE_TASKS=1 TMPDIR="$PWD/tmp" JULIA_DEPOT_PATH="$SHARED_DEPOT:" timeout 3600 julia +1.13.2 --startup-file=no --compiled-modules=existing run_probe.jl
  • Run 1 exits 0: the wrapper activates an isolated environment, instantiates with allow_autoprecomp=false, and includes the complete head test/InterfaceI/ode_tstops_tests.jl. All assertions pass, totaling 75/75; the added test's summary is 13 passed, 13 total.
  • Run 2 exits 1: a separate environment uses the archived merge-base source with identical dependency versions. The wrapper confirms the new helper is absent, runs analytic baseline diagnostics, then includes the unchanged head test file. All 62 existing assertions pass. The added test's summary is 7 passed, 6 failed, 13 total: base RHS counts are 87 != 81 for Tsit5, 134 != 123 for Rodas5P, and 147 != 144 for FBDF; the three endpoint-equality assertions also fail. This establishes failing-before/passing-after from my own runs.
  • Run 3 exits 1: independent analytic probes on head report 2 passed, 9 failed, 11 total. Four constant-RHS checks fail, Rodas5P and FBDF each fail a dense-value and a dense-derivative check, and EM fails pathwise noise preservation. Tsit5 satisfies the conservative dense checks, although its interior derivative error rises from 1.017e-12 on base to 0.003015 on head. Numerical checks use absolute bounds of 1e-12 for constant increments/noise preservation, 1e-8 for dense values, and 1 for dense derivatives; the last bound deliberately detects gross errors exceeding the full scale of the exact derivative. Every baseline diagnostic satisfies these same bounds.
Analytic probe Base observation Head observation
Constant RHS, exact increment 1, Tsit5 / Euler 0.9999999999999999 / 1 0 / 0
Constant RHS at time 1e12, exact increment 0.006103515625 Correct within 1.735e-18 0, both methods
Rodas5P dense value error 2.154e-14 3.586e-5
FBDF dense value error 3.246e-12 0.001925
Rodas5P / FBDF dense derivative -0.49 / -0.522153 -5.331e9 / -5.792e11
EM absolute error against saved Wiener path 0 7.456879447254039e-8
  • CI inspection: gh pr checks 4805 --repo SciML/OrdinaryDiffEq.jl reports two failed jobs. I inspected failed logs using gh run view <run-id> --repo SciML/OrdinaryDiffEq.jl --log-failed with a writable cache; the PR sublibrary log used --job 117057984947. I inspected the latest five completed master push runs and the latest corresponding IntegrationTest and Sublibrary CI runs.
  • PR IntegrationTest run 38872016502 fails SciMLSensitivity Core4 at the threaded-ensemble test with Enzyme's AssertionError: mi2 !== nothing. Master run 41249816054 contains the same assertion in the same Core4 test.
  • PR Sublibrary CI run 38872016919 fails NonlinearSolve Newton tests with LineSearchException: Search direction is not a direction of descent. Step length: 0.0. Master run 41249816432 contains the same Newton-test exception. These comparisons establish existing failures without attributing them to this PR.
  • PR CI run 38872016727 reports successful InterfaceI jobs on lts, stable, prerelease, and x86, plus successful AD and GPU groups. These green jobs do not catch the demonstrated regressions.

What I did not verify

No whole-package suite, Pkg.test(), or local downstream suite was run. Local runs cover forward Float64 time, scalar out-of-place ODEs for the analytic probes, EM additive noise, and the existing tstops file's additional configurations. I did not independently exercise continuous-callback root finding, post-gap multistep histories, reinit!, additional SDE methods, DDE-specific behavior, unitful or non-Float64 time, GPU, AD, MPI, or Reactant. CI reports AD/GPU success, but coverage of this exact widened tiny-step branch within those groups was not established. Base implicit dense derivatives already have limited tiny-interval accuracy; I verified the much larger regression above, not a repair of that pre-existing limitation. The independent probes are review fixtures, not changes to the PR's tests.

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

ChrisRackauckas and others added 3 commits November 12, 2026 11:37
Bring in the TaylorDiff compatibility floors for both Taylor sublibraries.

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__4805--20261122T043911Z-codex-gpt-6.2-sol
Agent-Session: local session 01a2018d-3ebc-7c80-95db-de9a980711b2 (no session URL)
Restore the upstream step threshold so close stops still advance the
state, construct dense output, and apply stochastic increments. Exercise
the analytic ODE state and derivative, callbacks, and the Wiener path.

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__4805--20261122T043911Z-codex-gpt-6.2-sol
Agent-Session: local session 01a2018d-3ebc-7c80-95db-de9a980711b2 (no session URL)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants