Skip to content

Raise TaylorDiff compat floors to 0.3.6 - #4994

Merged
ChrisRackauckas merged 1 commit into
masterfrom
compat/taylordiff-0.3.6
Nov 13, 2026
Merged

ChrisRackauckas merged 1 commit into
masterfrom
compat/taylordiff-0.3.6

Conversation

@ChrisRackauckas

Copy link
Copy Markdown
Member

🚧 UNREVIEWED — awaiting review by @ChrisRackauckas. Filed by an AI agent running as @ChrisRackauckas; Chris has not seen this.
Harness: codex-cli 0.164.0 · Model: gpt-6.1-sol
Conversation: local session 01a1d30d-afe7-7600-bbf9-9169905e41d0 (no session URL)

Raise the TaylorDiff compat floor to 0.3.6 in OrdinaryDiffEqTaylorSeries and OrdinaryDiffEqTaylorSeriesImplicit so a floor resolve includes the fix for TaylorDiff's load failure with current ChainRules. The upstream fix is JuliaDiff/TaylorDiff.jl/pull/114.

Bump the sublibrary patch versions to 2.5.1 and 1.1.1, following the compat-only convention in the BinaryHeaps compat PR and the PDIRK compat-floor PR. Ignore this draft until reviewed by @ChrisRackauckas.

Verification

I created separate Julia 1.10.12 environments with Pkg.add([PackageSpec(name = "TaylorDiff", version = VersionNumber(version)), PackageSpec(name = "ChainRules")]), using version = "0.3.5" and "0.3.6". Both selected the newest registered ChainRules, 1.74.13.

The same load script starts with using TaylorDiff, ChainRules and prints the package versions after a successful import. I ran it with --startup-file=no --compile=min -O0 --compiled-modules=no in each environment.

Before, TaylorDiff 0.3.5 (error excerpt; exit code 1):

ERROR: LoadError: TypeError: non-boolean (Symbolics.Num) used in boolean context

After, TaylorDiff 0.3.6 (exit code 0):

Julia 1.10.12
TaylorDiff 0.3.6; ChainRules 1.74.13
using TaylorDiff: PASS

I developed both sublibraries and their local runtime [sources] dependencies into another isolated environment, added TaylorDiff 0.3.6 plus current ChainRules, and imported both sublibraries with the same Julia flags (exit code 0):

Julia 1.10.12
OrdinaryDiffEqTaylorSeries 2.5.1
OrdinaryDiffEqTaylorSeriesImplicit 1.1.1
TaylorDiff 0.3.6
ChainRules 1.74.13
using OrdinaryDiffEqTaylorSeries, OrdinaryDiffEqTaylorSeriesImplicit: PASS

The functional test runner activated the developed environment and called Pkg.test(package; julia_args = ["--startup-file=no", "--compiled-modules=yes", "--threads=4"]) on Julia 1.10.12:

  • GROUP=Core, package = "OrdinaryDiffEqTaylorSeries": exit 0.
  • GROUP=Core, package = "OrdinaryDiffEqTaylorSeriesImplicit": exit 0.
Nonlinear IIP System |    4      4  8.3s
     Testing OrdinaryDiffEqTaylorSeries tests passed

Implicit Solver Convergence Tests |    4      4  41.7s
     Testing OrdinaryDiffEqTaylorSeriesImplicit tests passed

GROUP=QA for OrdinaryDiffEqTaylorSeries exited 1. I repeated it on a clean worktree of base commit 4460ff80dad621418e6e3a9b63e4afb2e1f5fc02, also selecting TaylorDiff 0.3.6, and observed the identical failure and identical list of 15 reexports:

Allocation Tests |    2       1      3  56.8s
JET Tests     |    1      1  22.4s
No unapproved public reexports: Test Failed
Aqua                                           |   14     1     15  21.0s

The allocation summary has two passing assertions and one existing broken assertion. The sole QA failure on both branch and base is isempty(reexported), including AutoSpecialize, DEStats, and successful_retcode. No tests or assertions were changed.

git diff --check and git diff --no-ext-diff --unified=0 | typos - both exited 0 with no output. Runic and a docs build do not apply to this manifest-only diff. The import checks exercise the exact TaylorDiff floor with current dependencies; the full all-dependency downgrade matrix, GPU tests, and downstream tests were not run.

Risk assessment

  • Risk: medium-low (ML4: raises a dependency compat lower bound; the patch version bumps also match L5).
  • Blast radius: resolution for users of the two Taylor sublibraries; TaylorDiff 0.3.5 is excluded. No solver source or public signature changes.
  • Evidence: TaylorDiff 0.3.5 fails to import with ChainRules 1.74.13; 0.3.6 and both developed sublibraries import successfully with the same ChainRules version. Test group results are recorded above.
  • Independent review: pending; this is the author's ML4 assessment.
  • Merge: needs human review — unreviewed draft with no independent rating; the Julia 1.10 QA failure also reproduces on the clean base.

🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol
Conversation: local session 01a1d30d-afe7-7600-bbf9-9169905e41d0 (no session URL)

Require the TaylorDiff release that loads with current ChainRules in both
Taylor sublibraries and bump their patch versions for the compat change.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Codex <[email protected]>
Agent-Harness: codex-cli 0.164.0
Agent-Model: gpt-6.1-sol
Agent-Session: local session 01a1d30d-afe7-7600-bbf9-9169905e41d0 (no session URL)
@ChrisRackauckas

Copy link
Copy Markdown
Member Author

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

PR: #4994

Reviewed head: 8b24951
Raw SHA-256: 3e9cea4bf6034b6ae27c8964860c029759b28172f1d58b19628def753fc685f8
Source SHA-256: d21776d06eae3dc064e91ddba7a4513b11ce3e718d787902d305cfcce0e9c7a2
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1d335-24b0-7f62-830e-0741d1b35a32
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes

Risk assessment

  • Risk: medium-low (ML4)
  • Verdict: MERGE
  • Reviewed head: 8b24951

Review report

VERDICT: MERGE
Round: 1
Head: 8b24951
Slot: 1
CI: CI is not green
Session: 01a1d335-24b0-7f62-830e-0741d1b35a32

Risk

medium-low (ML4: raises TaylorDiff's compat lower bound in two Taylor sublibraries).

Blocking findings

None. The diff changes only two patch versions and two TaylorDiff compat floors. Tests, assertions, solver code, dependency identities and public APIs are unchanged.

  • Verdict: MERGE
  • Round: 1
  • Blocking priorities: none
  • Deferred P2 issues: none supplied

Non-blocking findings

  • Existing accuracy failure, confirmed by running: lib/OrdinaryDiffEqTaylorSeries/src/TaylorSeries_perform_step.jl:168 and :233, the adaptive-order paths. For u' = 2t*cos(t^2) - 2u + 2sin(t^2), u(0)=0, the exact solution is sin(t^2). On [0,1], ExplicitTaylorAdaptiveOrder(min_order=Val(2), max_order=Val(6)) with abstol=reltol=1e-10 returns Success with endpoint absolute error 0.15842904018877046, for both in-place and out-of-place array RHS forms. ExplicitTaylor(order=Val(4)) also returns Success with endpoint error 3.857240838855969e-5. All six diagnostic cases, including the accurate fixed-step Taylor2 controls, produce identical error vectors on the PR head and clean merge base 4460ff80dad621418e6e3a9b63e4afb2e1f5fc02, using TaylorDiff 0.3.6. Resolved dependency versions match except the reviewed package's own patch version. This is not introduced by this diff. Suggested follow-up: add this independent analytic regression and investigate adaptive error/order control separately; the root cause was not localized here.

What I ran

All Julia work used isolated source archives and environments, the supplied layered JULIA_DEPOT_PATH, the requested job TMPDIR, two Julia threads, four precompile tasks, and disabled automatic precompilation. The checkout remains clean.

  • julia --version: julia version 1.13.2. No tracked Julia Manifest or interpreter pin exists in this checkout.
  • uv run --locked python --version: Python 3.15.0. uv warned that --locked has no effect outside a project; this Julia repository has no uv.lock or Python project. Python TOML checks confirmed that only the versions and TaylorDiff floors change.
  • git diff --check origin/master...HEAD: passed.
  • Pkg.add(PackageSpec(name="TaylorDiff", version=v"0.3.6")) in both copied sublibraries: resolved successfully with ChainRules 1.74.13 and ChainRulesCore 1.26.8.
  • Pkg.test(; julia_args=["--startup-file=no", "--compiled-modules=existing", "--check-bounds=yes"]): explicit GROUP=Core passed 148/148; implicit functional suite passed 4/4; explicit GROUP=QA passed 20, with one existing broken allocation assertion unchanged by the PR (AllocCheck 2 pass/1 broken, JET 1 pass, Aqua 17 pass).
  • Isolated TaylorDiff load/coefficient probe, pinned against ChainRules 1.74.13: 0.3.5 exits 1 during import with TypeError: non-boolean (Symbolics.Num) used in boolean context, originating in the ChainRules tanh rule invoked by TaylorDiff code generation. 0.3.6 exits 0, passing 36/36 Taylor-coefficient checks against analytic exponential and sine derivatives through order five.
  • Independent explicit solver probe against sin(t^2): 14 pass, 16 fail. Separate baseline/head diagnostic reruns reproduced the identical errors described above; no tolerance was relaxed.
  • Independent stiff implicit probe for u'=-100(u-cos(t))-sin(t), exact solution cos(t): 16/16 passed, exercising Taylor-Gauss orders 2/4, Taylor-Radau order 3 and Taylor-Lobatto order 4 at dt=1/32 and 1/64. Errors decreased in every case; the largest fine-step endpoint error was 1.7008558350628533e-7.

What I did not verify

Other Julia versions and the repository-wide Everything suite. CI was not inspected independently; its supplied status remains not green. PR discussion, author risk ratings and other reviews were not read. No GitHub writes or checkout edits were made.

AUTHOR_GRADE: {"task":"deps","score":5,"difficulty":1,"rounds":1,"author_harness":"codex-cli 0.164.0","author_model":"gpt-6.1-sol","note":"Pinned TaylorDiff 0.3.5 reproduces the current ChainRules import failure; 0.3.6 loads and passes independent coefficient checks. Both affected functional suites and explicit QA pass. The additional accuracy failure reproduces identically on the merge base."}

Head link: 8b24951


🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol
Conversation: local session 01a1d335-24b0-7f62-830e-0741d1b35a32 (no session URL)

@ChrisRackauckas

Copy link
Copy Markdown
Member Author

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

PR: #4994

Reviewed head: 8b24951
Raw SHA-256: f26655266b02e9e3dec1590e29713f8178efa377729af97a4a2783a1caedf4f1
Source SHA-256: b542819aea4ae144fe3496c31e912da01f57df819379daf088d5acacfc9a61d2
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1d396-9883-7e41-b2ca-0ee0680327ac
Slot: 2
Confidence: unknown
Own risk fixed before author rating/discussion: yes

Risk assessment

  • Risk: medium-low (ML4)
  • Verdict: MERGE
  • Reviewed head: 8b24951

Review report

VERDICT: MERGE
Round: 3
Head: 8b24951
Slot: 2
CI: CI is not green
Session: 01a1d396-9883-7e41-b2ca-0ee0680327ac

Risk

medium-low (ML4: raises the TaylorDiff compatibility lower bound in two peripheral Taylor solver packages; no solver, API, or test changes).

Blocking findings

None attributable to this diff. The two compatibility floors and patch-version increments are consistent. Both affected suites passed with TaylorDiff 0.3.6.

  • Verdict: MERGE
  • Round: 3
  • Blocking priorities: none
  • Deferred P2 issues: none

Non-blocking findings

The following probe failures also reproduce on unmodified origin/master at 4460ff80dad621418e6e3a9b63e4afb2e1f5fc02, using the same resolved TaylorDiff 0.3.6 dependencies. They are existing limitations, not regressions established by this PR.

  • lib/OrdinaryDiffEqTaylorSeries/src/alg_utils.jl:121: higher-order Float32 inverse-trigonometric/hyperbolic evaluations encounter mixed Float32/Float64 TaylorScalar arithmetic ambiguities. The independent coefficient probe produced 144 passes and 24 errors on each tree; all 84 Float64 cases passed. For example, asin(TaylorDiff.make_seed(0.5f0, 1.0f0, Val(2))) throws an ambiguous-division MethodError. Suggested follow-up: investigate type preservation and mixed-type dispatch in TaylorDiff and add coverage upstream.
  • lib/OrdinaryDiffEqTaylorSeries/src/alg_utils.jl:121: tan(TaylorDiff.make_seed(0.5, 1.0, Val(4))) returns Float64, dropping the Taylor representation. An in-place u′ = tan(t) problem with ExplicitTaylor(order=Val(4)) throws MethodError: no method matching AbstractFloat(::Symbolics.Num) on both trees. Suggested follow-up: provide upstream Taylor propagation for this operation or reject it explicitly.
  • lib/OrdinaryDiffEqTaylorSeriesImplicit/src/TaylorSeries_perform_step.jl:160: additional smooth/stiff analytic problems can return ConvergenceFailure with fixed steps and abstol=reltol=1e-12. For example, the in-place Riccati problem u′=1+u², u(0)=0.1, span (0,0.5), ImplicitTaylor(order=Val(1), order_q=Val(2)), dt=1/8, fails at time zero. The implicit probe recorded 17 passes and 21 failures on each tree, with all 37 numerical/return-code diagnostic rows identical. Suggested follow-up: investigate nonlinear stopping behavior separately; the cause is not established here.

What I ran

Reviewer: codex-cli 0.164.0, model gpt-6.1-sol. Blind review of the diff, checkout instructions, affected code/tests, and newest commit attribution trailers; no PR body, comments, or earlier reviews read.

All Julia runs used Julia 1.13.2, --startup-file=no, the package Project.toml environments, and the inherited layered JULIA_DEPOT_PATH. Scratch copies came from git archive HEAD and git archive origin/master. TMPDIR was set to the requested round-three directory. The checkout remained unchanged.

  • git diff origin/master...HEAD, git diff --check origin/master...HEAD, and a source/test comparison: exactly four metadata substitutions, no whitespace errors, and identical affected solver/test sources between head and master. Final git status --porcelain=v1 was empty.
  • uv run --locked python --version: Python 3.15.0; uv warned that --locked has no effect outside a project. This checkout has no Python project/uv.lock, Julia Manifest.toml, or interpreter-version lock.
  • bash ../scratch/run-suites.sh, under a memory-limited systemd scope. For each affected package it ran GROUP=ALL timeout 14400 julia --startup-file=no --project="$review_scratch/head/lib/$pkg" with Pkg.instantiate(;allow_autoprecomp=false) and Pkg.test(;julia_args=["--startup-file=no"],force_latest_compatible_version=false). Both exited 0. Explicit: 168 passed, one existing broken allocation assertion, including JET and Aqua. Implicit: 4 passed. Resolution selected TaylorDiff 0.3.6, ChainRules 1.74.13, ChainRulesCore 1.26.8.
  • bash ../scratch/run-probes.sh: isolated exact-version environments reproduced TaylorDiff 0.3.5 failing to precompile with ChainRules 1.74.13, specifically TypeError: non-boolean (Symbolics.Num) used in boolean context in the tanh rule. TaylorDiff 0.3.6 with the same ChainRules printed LOAD_OK and exited 0.
  • bash ../scratch/run-followup.sh and bash ../scratch/run-final-probes.sh: exercised both head and master. The final coefficient probe compared orders 1/2/4/8 for 21 functions, Float32/Float64, against 256-bit complex contour-integral references (128 samples); its tolerance was fixed at 512 machine epsilons at coefficient scale. Maximum error among completed cases was 3.263 epsilons; both trees produced 144 passes, 24 errors, as detailed above. Analytic nonlinear/nonautonomous ODE probes covered in-place/out-of-place calls, fixed/adaptive order, dense output, and second-order convergence: 40/40 passed on each tree, maximum high-order dense error 4.286e-12, observed second-order slopes 1.9496–2.0280. Separate implicit and tan probes reproduced the non-blocking symptoms above. Initial probe runs also contained a reviewer tuple/vector comparison error; that assertion was corrected before these final results.

What I did not verify

Other Julia versions/platforms, the full monorepo/downstream suite, remote CI results, or TaylorDiff 0.3.5 numerical behavior with older ChainRules. No locked Python interpreter/dependency environment is defined by this repository. Existing probe failures were reproduced, not fixed or fully diagnosed. CI must satisfy the normal merge gate independently of this advice.

AUTHOR_GRADE: {"task":"deps","score":5,"difficulty":2,"rounds":3,"author_harness":"codex-cli 0.164.0","author_model":"gpt-6.1-sol","note":"The focused compatibility-floor change excludes a reproduced unloadable TaylorDiff release; both affected full suites pass with 0.3.6. Additional probe failures reproduce identically on master with the same dependencies, so no regression attributable to this diff was established."}

REVIEWER_GRADE: {"task": "deps", "score": 5, "rounds": 3, "reviewer_harness": "codex", "reviewer_model": "gpt-6.1-sol", "verdict": "agree", "note": "Both reports confirm four metadata-only changes, the TaylorDiff 0.3.5 load failure, and passing affected suites with 0.3.6. Each reproduces its additional probe failures on the baseline; neither establishes a regression attributable to this diff."}

Head link: 8b24951


🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol
Conversation: local session 01a1d396-9883-7e41-b2ca-0ee0680327ac (no session URL)

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review November 13, 2026 07:04
@ChrisRackauckas
ChrisRackauckas merged commit 760d930 into master Nov 13, 2026
132 of 136 checks passed
@ChrisRackauckas
ChrisRackauckas deleted the compat/taylordiff-0.3.6 branch November 13, 2026 07:05
ChrisRackauckas added a commit to ChrisRackauckas-Claude/OrdinaryDiffEq.jl that referenced this pull request Nov 14, 2026
…erged-stage

Brings in the TaylorDiff compat floor raise (SciML#4994) that fixes the
TaylorSeries downgrade-sublibraries failure on this branch.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude <[email protected]>
Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-opus-5-5
Agent-Session: local fixer job SciML__OrdinaryDiffEq.jl__4724 (no session URL)
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.

1 participant