Skip to content

Avoid per-step deepcopy in ExplicitTaylorAdaptiveOrder - #4766

Merged
ChrisRackauckas merged 9 commits into
SciML:masterfrom
ChrisRackauckas-Claude:taylor-adaptive-no-deepcopy
Nov 3, 2026
Merged

ChrisRackauckas merged 9 commits into
SciML:masterfrom
ChrisRackauckas-Claude:taylor-adaptive-no-deepcopy

Conversation

@ChrisRackauckas-Claude

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

Copy link
Copy Markdown
Member

Summary

ExplicitTaylorAdaptiveOrder was deepcopying integrator.controller_cache on every order-selection trial (several times per step) and push!ing onto an unused order_history. That dominated the AdaptiveOrder hot path: on this machine a warmed Lorenz IIP step! was 13.8 µs / 144 allocs / 6432 B, and solve at 1e-8 was 18.7 ms vs Taylor10 at 0.206 ms.

This PR snapshots only the controller-cache scratch fields into a per-trial NamedTuple of each field's own type (no convert through typeof(t)), and drops order_history. The snapshot is generated from the cache's isbits fields (skipping controller/EEst) plus array history copied elementwise as a 3-tuple (PIDControllerCache.err), so it tracks sync_controllers! scratch without a hardcoded field-name list. Lorenz/Kepler IIP trajectories (sol.t, sol.u, and the per-step chosen orders) at 1e-8 and 1e-12 are bitwise identical to master, as is Float32-t / Float64-u with PIDController.

Test plan

  • Allocation regression: warmed @allocated step! bound < 2048. Master (src stashed): 3360 bytes, FAIL. After: 144 bytes, PASS. Julia 1.10.12: 16 bytes, PASS.
  • Bitwise identity vs master dumps: Lorenz and Kepler IIP, abstol=reltol in {1e-8, 1e-12}.
  • Dual t (ForwardDiff derivative through tspan): unfixed snapshot MethodError Float64(::Dual) FAIL (before.txt); after PASS (after.txt, d ≈ -0.5*exp(-0.5)).
  • Float32 t / Float64 u + PIDController(0.7, -0.4) at 1e-6: sol.t and sol.u bitwise == master e70688847 (43 steps).
  • Pinned JULIA_NUM_THREADS=1 taskset -c 12 @benchmark minima (Julia 1.12.4, 5 solve samples / 40 step samples, evals=1):
workload master solve min after solve min master step after step
Lorenz IIP AdaptiveOrder 1e-8 18.73 ms (226079 allocs, 9.75 MiB) 2.41 ms (40885 allocs, 1.82 MiB) 13.8 µs / 144 allocs / 6432 B 1.25 µs / 0 allocs / 0 B
Lorenz IIP AdaptiveOrder 1e-12 87.12 ms 11.23 ms 7.09 µs / 72 allocs / 3216 B 0.94 µs / 0 allocs / 0 B
Kepler IIP AdaptiveOrder 1e-8 3.57 ms 0.666 ms 7.43 µs / 72 allocs / 3216 B 1.16 µs / 0 allocs / 0 B
Lorenz IIP Taylor10 1e-8 (ref) 0.205 ms 0.206 ms — —

@allocated step! on the Lorenz bench was 3216–6432 B on master (order-loop deepcopy) vs 0 B after. The Core regression test uses a 2-eq linear RHS and still sees 144 B from step!'s return on 1.12 (16 B on 1.10).

Core group tail (GROUP=Core Pkg.test, round 2)

Test Summary:                       | Pass  Total   Time
AdaptiveOrder Dual tspan derivative |    2      2  10.7s
Test Summary:                                        | Pass  Total  Time
AdaptiveOrder Float32 t PIDController matches master |    3      3  7.2s
Test Summary:                        | Pass  Total  Time
AdaptiveOrder step! allocation bound |    1      1  6.7s
Test Summary:        | Pass  Total   Time
Nonlinear IIP System |    4      4  14.7s
     Testing OrdinaryDiffEqTaylorSeries tests passed

QA group tail (GROUP=QA Pkg.test, round 2)

AllocCheck found 5 allocation sites in ExplicitTaylorAdaptiveOrder ... perform_step!
Test Summary:    | Pass  Broken  Total     Time
Allocation Tests |    2       1      3  59.2s
Test Summary: | Pass  Total     Time
JET Tests     |    1      1  2m39.2s
Test Summary: | Pass  Total     Time
Aqua          |   17     17  1m10.9s
     Testing OrdinaryDiffEqTaylorSeries tests passed

AdaptiveOrder remains broken=true in AllocCheck static analysis (5 sites); runtime step! is 0-alloc on Lorenz/Kepler after this change.

What I did not verify

  • Composite / predictive controllers on AdaptiveOrder (Predictive still needs nlsolver as on master).
  • OOP AdaptiveOrder @benchmark (identity was IIP Lorenz/Kepler; Float32 PID is IIP).
  • Downstream OrdinaryDiffEq umbrella tests and GPU.
  • Whether AllocCheck can be unmarked broken=true after further cleanup of the remaining static sites.
  • Unitful t (same convert path as Dual; Dual is the regression).

Reviewer pushback

  • Per-trial NamedTuple vs a mutable snapshot parameterized on the controller-cache field types (NamedTuple is 0-alloc for the in-tree isbits caches).
  • Array snapshots still assume length-3 history (PIDControllerCache.err).
  • Dropping order_history if anyone was poking it as an unofficial diagnostic (it was written and never read in-tree).
  • Leaving AllocCheck broken=true for AdaptiveOrder even though runtime step! is now 0-alloc on the measured problems.

Please ignore until reviewed by @ChrisRackauckas.

Risk assessment

Independent review: Devin SWE-2 round 1 CHANGES (snapshot types); round 2 preserves field types

🤖 Generated with Cursor Agent 2026.10.01-14929f9 (model: unknown (Cursor auto)), transcript /log.txt; orchestrated by Claude Code (claude-opus-5-5[1m]) https://claude.ai/code/session_01LPHREnnonfLg1VcE1EJovv

Made with Cursor

Review findings addressed

  • [P2] Custom controller caches with array fields of length ≠ 3 threw (ArgumentError: AdaptiveOrder controller array snapshot expects length 3, got 4). Fixed in e7353fc. The allocation-free field snapshot now only applies to OrdinaryDiffEqCore's IControllerCache, PIControllerCache, PIDControllerCache and PredictiveControllerCache. Their sync_controllers! copies exactly the fields the snapshot walks, and their only array is PID's err, which is always ones(QT, 3). Every other controller cache (user-defined AbstractControllerCaches, composite caches) uses master's protocol: deepcopy before the order trial, sync_controllers! after. That covers arbitrary array lengths, matrices, and any other scratch state a custom sync_controllers! restores. The four cache types are owner-internal in OrdinaryDiffEqCore, so they are imported and added to the ExplicitImports ignore list in test/qa/qa.jl. OrdinaryDiffEqFIRK handles PredictiveControllerCache the same way.
    • New Core test AdaptiveOrder custom controller cache with length-4 history, run IIP and OOP. It uses a custom controller whose cache has a Vector{Float64} history of length 4, an accept counter, and a sync_controllers! override. It checks the retcode and solution, and checks that the counter equals stats.naccept, which shows the order-selection pseudo-steps were rolled back.
    • Before the source change (test only, Julia 1.13.0): Error During Test ... ArgumentError: AdaptiveOrder controller array snapshot expects length 3, got 4.
    • After: AdaptiveOrder custom controller cache with length-4 history | 6 6 on Julia 1.13.0 and 1.10.12. The same controller on the merge base (59ba40e) gives identical output to the fixed branch: Success, u_end=[0.9048374198048081, 1.8096748396096163], counter 55 == stats.naccept 55, for both IIP and OOP.
    • GROUP=Core Pkg.test() (Julia 1.13.0): all 26 testsets pass, including the master-identity Float32 PID and BigFloat PI tests and both step! allocation bounds, and the run ends with OrdinaryDiffEqTaylorSeries tests passed. GROUP=QA: Allocation 2 pass / 1 broken (the AdaptiveOrder AllocCheck entry was already marked broken), JET 1/1, Aqua 17/17. AllocCheck reports 8 static sites on Julia 1.13.0 both with and without this commit; the 5 quoted above were measured on 1.12.4. Runic 1.10.0 --check and typos are clean on the changed files.
    • Not run locally: the full QA group on Julia 1.10, the downstream/umbrella tests, and GPU.

🤖 Posted by an AI agent — harness: Claude Code 2.1.301 · model: claude-opus-5-5
Conversation: local session ID bf8d6de7-a858-41b2-b438-bc6101c93513 (headless, no URL)

Review findings addressed (round 2)

  • [P2] Non-public OrdinaryDiffEqCore cache imports plus QA exemptions in the Taylor fix. Fixed in 3da8de7 by moving the snapshot protocol into OrdinaryDiffEqCore as documented public API:
    • New public OrdinaryDiffEqCore.snapshot_controller(cache) and restore_controller!(cache, snapshot). Both have docstrings and @docs entries plus a table row in docs/src/api/controllers.md, under "Optional methods".
    • The default is deepcopy(cache), written back with sync_controllers!, which is the protocol master used. So any custom controller that implements sync_controllers! keeps working, whatever its fields.
    • The IController, PIController, PIDController and PredictiveController caches have allocation-free NamedTuple methods, placed next to their sync_controllers! in Core.
    • OrdinaryDiffEqTaylorSeries now calls only that public pair. Its generated field-walking snapshot, its imports of IControllerCache / PIControllerCache / PIDControllerCache / PredictiveControllerCache, and the four ExplicitImports exemptions are removed.
    • Taylor's QA env (test/qa/Project.toml) gains [sources] OrdinaryDiffEqCore = {path = "../../../OrdinaryDiffEqCore"}, as the Tsit5, Verner, SymplecticRK and other sublibrary QA envs have. Without it the QA env resolved OrdinaryDiffEqCore from the registry, so QA did not test the in-repo Core.
    • Before (Taylor source from e7353fc, exemptions removed), GROUP=QA: all_explicit_imports_are_public errors with "IControllerCache is not public in OrdinaryDiffEqCore but it was imported from OrdinaryDiffEqCore", and the same for the other three types.
    • After, Taylor GROUP=QA: Allocation 2 pass / 1 broken (the AdaptiveOrder AllocCheck entry was already marked broken), JET 1/1, Aqua 17/17 with no new exemptions. Base.ispublic(OrdinaryDiffEqCore, :snapshot_controller) and Base.ispublic(OrdinaryDiffEqCore, :restore_controller!) return true.
    • New Core test file lib/OrdinaryDiffEqCore/test/controller_snapshot_tests.jl (in the Core group), 28/28. For each built-in cache it checks a snapshot/restore round trip, that the snapshot covers every field sync_controllers! transfers, and a 0-byte @allocated round trip. It also checks that a custom cache falls back to deepcopy plus its sync_controllers!.
    • Taylor GROUP=Core still passes all 26 testsets, including the bitwise master-identity Float32 PID and BigFloat PI trajectories, both step! allocation bounds, and the length-4 custom-controller regression.

Breaking change

None: no public name is removed, renamed or changed in behavior. The required bumps, both made in this PR as earlier Core API additions such as b1d788586 did:

  • OrdinaryDiffEqCore needs a minor bump, 4.19.0 → 4.20.0, for the new public snapshot_controller / restore_controller!.
  • OrdinaryDiffEqTaylorSeries needs a minor bump, 2.4.0 → 2.5.0, with its OrdinaryDiffEqCore compat raised from 4 to 4.20 because it calls the new functions. OrdinaryDiffEqCore 4.20.0 must be registered before this Taylor release.

Verification (round 2)

Every command was run locally with JULIA_NUM_THREADS=4.

  • GROUP=Core in lib/OrdinaryDiffEqCore, Julia 1.13.0: Controller snapshot/restore | 28 28, then Testing OrdinaryDiffEqCore tests passed.
  • GROUP=QA in lib/OrdinaryDiffEqCore, Julia 1.13.0: AllocCheck 1/1; JET 30 pass / 1 broken (an existing broken = true in test/qa/jet.jl); Aqua 26/26.
  • GROUP=Core in lib/OrdinaryDiffEqTaylorSeries, Julia 1.13.0: 26 testsets, 0 failures or errors, tests passed.
  • The same Taylor test/runtests.jl with GROUP=Core on Julia 1.10.12, run in an env with the in-repo packages developed: 26 testsets, 0 failures or errors. The new Core test file also passes on 1.10.12: 28/28.
  • GROUP=QA in lib/OrdinaryDiffEqTaylorSeries, Julia 1.13.0, resolving OrdinaryDiffEqCore v4.20.0 from the repo: Allocation 2 pass / 1 broken (already broken before this PR), JET 1/1, Aqua 17/17. The before/after ExplicitImports result is given above.
  • Docs: targeted makedocs of docs/src/api/controllers.md against the in-repo OrdinaryDiffEqCore. snapshot_controller and restore_controller! render with anchors, with no @ref or docs-block errors. For this local check, the page's "Algorithm-integrated controllers" @docs block was dropped from the scratch copy, because it names BDF, Nordsieck and ImplicitDiscreteSolve types that were not loaded.
  • Runic.jl 1.10.0 --check and typos are clean on every changed file.

Not verified: the full docs/make.jl build, Core and Taylor QA on Julia 1.10, the umbrella/downstream groups, and GPU.


🤖 Posted by an AI agent — harness: Claude Code 2.1.301 · model: claude-opus-5-5
Conversation: local session ID bf8d6de7-a858-41b2-b438-bc6101c93513 (headless, no URL)

Risk assessment (independent review, codex-cli gpt-6.1-sol, reviewed head 3da8de7)

  • Risk: low
  • Blast radius: ExplicitTaylorAdaptiveOrder controller rollback and internal order-history storage; two additive public OrdinaryDiffEqCore controller hooks. Existing custom caches retain deepcopy plus sync_controllers!. Other solvers do not call the new hooks.
  • Evidence: Reviewed head 3da8de7199529cfd6b8a26d9109c20539a3eba5a, unchanged at the final check. On Julia 1.13.0 with JULIA_NUM_THREADS=4, Taylor Core passed 148/148 assertions across 26 testsets; Core snapshot tests passed 28/28; Taylor Aqua/ExplicitImports passed 16/16. The same Taylor regression test fails against the unmodified merge base with 3216 < 2048. Independent warmed-step probes measured PI/PID allocations of 2144/7200 bytes on base and 0/0 on head. Six Lorenz trajectory comparisons passed 19/19 assertions for identical saved times, states, and orders. CI was checked at the start and end: 22 pending, no failures, at both checks. Sublibrary CI, main CI, docs. The latest default-branch runs inspected were also queued, including default-branch sublibrary CI; there were no failed PR jobs requiring log comparison.
  • Independent review: codex-cli 0.163.0 gpt-6.1-sol rated it low, high confidence: the optimized rollback preserves tested trajectories and custom-controller compatibility, and the allocation regression discriminates against base.
  • Merge: needs human review — technically mergeable, but adding public extension hooks falls outside the repository's no-public-API-change auto-merge rule. Required CI remains pending.

🤖 Posted by an AI agent — harness: codex-cli · model: gpt-6.1-sol (independent reviewer; appended by Claude Code 2.1.301 · claude-opus-5-5)
Conversation: https://claude.ai/code/session_01VZjwf7Ux9YtTzwHGHMqnsq

ChrisRackauckas and others added 6 commits October 3, 2026 08:24
Order-selection trials cloned the whole controller cache and grew
order_history every step. Snapshot only the restored fields into
preallocated storage and drop the unused history.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Cursor Agent <[email protected]>
Agent-Harness: Cursor Agent 2026.10.01-14929f9
Agent-Model: unknown (Cursor auto)
Agent-Session: local session, transcript /home/crackauc/sandbox/goals/performance/jobs/pr-taylor-deepcopy/log.txt on amdci2
Order-selection restore was converting every controller field through
typeof(t), which MethodError'd Dual tspan and rounded Float32-t PID
history. Snapshot the cache's own isbits/array values as a NamedTuple.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Cursor Agent <[email protected]>
Agent-Harness: Cursor Agent 2026.10.01-14929f9
Agent-Model: unknown (Cursor auto)
Agent-Session: local session, transcript /home/crackauc/sandbox/goals/performance/jobs/pr-taylor-deepcopy/log.txt on amdci2
isbits-only NamedTuple snapshots dropped BigFloat PIController q11/errold,
so order trials leaked state. Include every scalar scratch field and make
array history length-generic; tighten Float32 PID and add BigFloat regressions.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Cursor Agent <[email protected]>
Agent-Harness: Cursor Agent 2026.10.01-14929f9
Agent-Model: unknown (Cursor auto)
Agent-Session: local session, transcript /home/crackauc/sandbox/goals/performance/jobs/pr-taylor-deepcopy/log.txt on amdci2
Runtime-length ntuple boxed the length-3 err history (~1 KB/step).
Specialize on Val(3) after an explicit length check and add a PID
allocation regression.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Cursor Agent <[email protected]>
Agent-Harness: Cursor Agent 2026.10.01-14929f9
Agent-Model: unknown (Cursor auto)
Agent-Session: local session, transcript /home/crackauc/sandbox/goals/performance/jobs/pr-taylor-deepcopy/log.txt on amdci2
Julia 1.10/1.11 step! has a fixed 16-byte infrastructure allocation for every solver, so == 0 fails CI while the PID snapshot path is still 0 extra bytes. Keep the bound tight against the round-3 1 KB ntuple regression.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Cursor Agent <[email protected]>
Agent-Harness: Cursor Agent 2026.10.01-14929f9
Agent-Model: unknown (Cursor auto)
Agent-Session: local session, transcript /home/crackauc/sandbox/goals/performance/jobs/pr-taylor-deepcopy/log.txt on amdci2
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-4766/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 66db7bc) 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 and others added 3 commits October 16, 2026 07:07
…ptiveOrder

The allocation-free field snapshot assumed every array field was a length-3
history (PIDControllerCache.err), so a user-defined AbstractControllerCache
with, e.g., a length-4 Vector threw an ArgumentError on the first step.
Restrict the field snapshot to OrdinaryDiffEqCore's I/PI/PID/Predictive
caches, whose sync_controllers! copies exactly the walked fields, and send
every other controller cache through the documented protocol: deepcopy
before the order trial, sync_controllers! after.

Adds a Core regression test with a custom controller holding a length-4
history and an accept counter, run IIP and OOP; it errors before this
change and checks that the counter equals stats.naccept after it.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Agent-Harness: Claude Code 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: local session ID bf8d6de7-a858-41b2-b438-bc6101c93513 (headless claude -p, no URL)
…qCore

ExplicitTaylorAdaptiveOrder pseudo-steps the step-size controller once per
candidate order and rolls it back. The allocation-free rollback depended on
four non-public OrdinaryDiffEqCore cache types and their field layouts, with
matching ExplicitImports exemptions in the Taylor QA test.

OrdinaryDiffEqCore now owns that protocol as documented public API:
snapshot_controller(cache) / restore_controller!(cache, snapshot). The
default is deepcopy + sync_controllers!, so every custom controller that
implements sync_controllers! keeps working. The I/PI/PID/Predictive caches
get allocation-free NamedTuple methods next to their sync_controllers!.
OrdinaryDiffEqTaylorSeries calls only the public pair, its local snapshot
code and the four QA exemptions are gone, and its QA environment resolves
the in-repo OrdinaryDiffEqCore like the other sublibrary QA environments.

OrdinaryDiffEqCore 4.19.0 -> 4.20.0 (new public API). OrdinaryDiffEqTaylorSeries
2.4.0 -> 2.5.0 with OrdinaryDiffEqCore compat raised to 4.20, since it needs
the new functions.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Agent-Harness: Claude Code 2.1.301
Agent-Model: claude-opus-5-5
Agent-Session: local session ID bf8d6de7-a858-41b2-b438-bc6101c93513 (headless claude -p, no URL)
@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 01a1983c-7a7b-7972-abf8-91bb0fe6ee2d, reviewed head 3da8de7

  • Verdict: MERGE-WITH-ISSUES
  • Risk: medium-low (ML7: additive public snapshot/restore API preserves existing calls; ML3: peripheral Taylor performance change with allocation regressions and reported benchmarks; ML8: state-restoration tests cover built-in and custom caches).
  • Round / slot: 1 / 1
  • Blocking priorities: none

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 public controller snapshot/restore hooks to reduce adaptive-order Taylor allocations and removes unused order history. Focused before/after tests and independent analytic probes support merging with minor documentation repairs.

Blast radius: ExplicitTaylorAdaptiveOrder IIP/OOP order-selection trials and its internal history storage; new OrdinaryDiffEqCore extension hooks. Existing Tsit5, Vern, Rodas, FBDF, default selection, callbacks and interpolation implementations are unchanged.

Evidence: Blind diff assessment frozen in INITIAL.md and INITIAL.sha256 before author context. On Julia 1.13.2, Core snapshot tests passed 28/28; the six added Taylor testsets passed 16/16 on head and failed 2/16 on base, specifically both allocation assertions. Independent probes passed 28/28. CI recorded 258 successes, two failures and three skips; both failures match completed master runs.

Blocking findings

None.

Non-blocking findings

  1. non-blocking [P3] lib/OrdinaryDiffEqCore/src/integrators/controllers.jl:478 — The new public docstrings promise restoration of per-solve state without explicitly excluding EEst. Built-in snapshots omit it, and Taylor saves/restores it separately. Clarify that these hooks restore controller scratch state and that callers must preserve EEst themselves when pseudo-stepping; apply the clarification to both docstrings.
  2. non-blocking [P3] lib/OrdinaryDiffEqTaylorSeries/Project.toml:31 — The new ForwardDiff test dependency lacks the license declaration requested by the review specification. Its packaged license is MIT, which I inspected; state that license in the dependency rationale. This adds no runtime hard dependency or licensing blocker.

What I ran

  • Read the complete RULES.md and review brief. No repository AGENTS.md or CLAUDE.md was present. Ran gh pr view 4766 --repo SciML/OrdinaryDiffEq.jl --json number,url,state,isDraft,headRefOid,baseRefName,baseRefOid; the PR was open and draft, with the requested head. Ran git fetch origin +refs/pull/4766/head:refs/remotes/pr/4766 master, git checkout --detach refs/remotes/pr/4766, git rev-parse HEAD, git diff --stat origin/master...HEAD, git diff origin/master...HEAD, and git merge-base origin/master HEAD. The merge-base equals the Base above. Inspected surrounding controller implementations, callers, documentation and test wiring. Saved the blind assessment with sha256sum INITIAL.md > INITIAL.sha256 before opening author context.
  • Obtained author trailers using gh api --paginate repos/SciML/OrdinaryDiffEq.jl/pulls/4766/commits; selected the last commit with at most one parent, which was the reviewed head. Inspected the PR description after the blind freeze.
  • All three Julia invocations used Julia 1.13.2 on aarch64, JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1, an isolated temporary directory, the writable shared depot followed by default depots, JULIA_PKG_PRECOMPILE_AUTO=0, and timeout 3600. In the command forms below, REVIEW_DEPOT represents the configured shared depot; each command had the prefix JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 TMPDIR="$PWD/tmp" JULIA_DEPOT_PATH="$REVIEW_DEPOT:" JULIA_PKG_PRECOMPILE_AUTO=0 timeout 3600.
  • Run 1: julia +1.13.2 --startup-file=no run_head.jl (exit 1). The harness activated env-head, developed the checkout's DiffEqBase/Core/TaylorSeries/Tsit5 packages, and added ForwardDiff. It included the new lib/OrdinaryDiffEqCore/test/controller_snapshot_tests.jl: 28 passed. The subsequent Taylor include could not start because my temporary environment omitted SciMLBase as a direct dependency: ArgumentError: Package SciMLBase not found in current path. No Taylor assertion ran in this invocation. Corrected the temporary environment without changing source or tests.
  • Run 2: created a detached base worktree with git worktree add --detach ../base 59ba40e4b5bbae713d8df7b792f6ea62f033ff78, then ran julia +1.13.2 --startup-file=no run_base.jl (exit 1). Used the same resolved external dependencies and developed the base packages offline. Included the unchanged contiguous added Taylor test block from lib/OrdinaryDiffEqTaylorSeries/test/runtests.jl:259 through the custom-controller test. Result: 14 passed, two failed, no errors. Allocation failures were 3216 < 2048 and 7200 == 0. Dual-time derivative, Float32/PID and BigFloat/PI trajectory fixtures, and IIP/OOP custom-history checks all passed on base.
  • Run 3: julia +1.13.2 --startup-file=no --project=env-head run_head_remaining.jl (exit 0). Included the previously unexecuted Taylor additions plus independent probes: 44/44 passed. Thus both added allocation regressions fail before and pass after; the other added behavior tests pass on both revisions. No successful head test was rerun. Independent analytic checks covered IIP/OOP decay systems with I, PI and PID controllers: maximum absolute endpoint errors ranged from 2.79e-14 to 1.76e-13 against exponential solutions. Float64/BigFloat rollback probes covered all four built-in caches, reusable snapshots, and actual I/PI/PID controller trial calls. Predictive scratch restoration was tested directly.
  • Ran gh pr checks 4766 --repo SciML/OrdinaryDiffEq.jl and inspected failed logs using gh run view RUN_ID --repo SciML/OrdinaryDiffEq.jl --log-failed, with writable temporary caching. PR sublibrary CI passed Core and Taylor Core groups on lts/1/pre and Taylor QA. Its NonlinearSolve failure is LineSearchException: Search direction is not a direction of descent. Step length: 0.0 in Newton Tests; the exact failure also appears in completed master sublibrary CI. PR downstream CI failed SciMLSensitivity Core4 with AssertionError: mi2 !== nothing in EnsembleThreads, also present in completed master downstream CI. Compared against recent default-branch push runs using gh run list --repo SciML/OrdinaryDiffEq.jl --branch master --event push --limit 5 and completed runs for the two workflows. Main CI, including AD/GPU jobs, and documentation CI passed.

What I did not verify

I did not run whole package suites, Pkg.test(), local QA, the full documentation build, or downstream suites. I did not reproduce the author's wall-clock benchmark table or Lorenz/Kepler trajectory comparisons; I verified allocation regressions and the added mixed-precision/BigFloat baseline fixtures instead. The Dual-time and custom-cache tests pass on base, so they do not demonstrate fixes relative to the merge-base; the discriminating regressions here are the allocation tests. I did not run predictive-controller Taylor solves, GPU, MPI, Reactant, or Enzyme/Mooncake/Zygote-specific probes locally. No such specialized implementation is changed; the changed ForwardDiff/Dual-time path ran locally. The initial temporary-environment setup error prevented Taylor execution in run 1 and was resolved for runs 2 and 3.

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

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