Skip to content

Add the missing ChainRulesCore test dependency - #1582

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:downstream-chainrulescore-dep
Sep 7, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:downstream-chainrulescore-dep

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Sep 6, 2026 •

Copy link
Copy Markdown
Member

What changed and why

test/downstream/remake_autodiff.jl has done using ChainRulesCore since
#1567, but ChainRulesCore was never added to
test/downstream/Project.toml. GROUP=DownstreamAD therefore fails on master, and because
Autodiff Remake is the group's first testset the error aborts the run before anything else
in the group executes.

This adds the dependency and its compat bound (1.18, matching the root Project.toml).
Two lines, nothing else.

Verification

Pre-existing on master, not introduced by any open PR. The DownstreamAD jobs on master's own
run at 2f74543d (https://github.com/SciML/SciMLBase.jl/actions/runs/34027316086) fail with:

Autodiff Remake: Error During Test at .../SafeTestsets.jl:30
  Got exception outside of a @test
  LoadError: ArgumentError: Package ChainRulesCore not found in current path.
ERROR: LoadError: Some tests did not pass: 0 passed, 0 failed, 1 errored, 0 broken.

Locally on unmodified master, same error, DSAD exit=1.

After, GROUP=DownstreamAD julia +release --project -e 'using Pkg; Pkg.test()' on Julia
1.12.6:

Autodiff Remake                       |     0            51.9s
Autodiff Observable Functions         |    13       1      14  13m13.1s
Ensemble adjoint gradient correctness |             1       1   0.3s

     Testing SciMLBase tests passed

Read that Autodiff Remake | 0 carefully. The body of remake_autodiff.jl is gated
behind if VERSION < v"1.12", so on 1.12 the file loads and runs zero tests. This run proves
the group no longer aborts at load; it does not exercise the tests this PR unblocks. The
group's other files do run and pass.

This unblocks a test that then fails, and I have not fixed that here

On Julia LTS the gated body does run, and the testset added by #1567 — which has never
executed even once, because the missing dependency always aborted the file first — errors:

Despecialized parameter cotangent remake: Error During Test at test/downstream/remake_autodiff.jl:124
  Expression: cotangent.prob.p isa SciMLBase.DespecializedParameters
  type InplaceableThunk has no field prob

That is tracked and fixed in #1583 and
#1584, which stacks on this PR.

For the record, the cause is not what the thunk in that message suggests. The test called
ChainRulesCore.rrule(getindex, sol, x, 1) with no RuleConfig, so it never dispatched to
SciMLBase's ODESolution rule at all and fell through to the generic ChainRules
AbstractArray getindex rule, whose cotangent is an InplaceableThunk. Unthunking it does
not help — it then throws ArgumentError: invalid index: x(t). Passing a config exposes a
genuine library bug in SciMLBaseChainRulesCoreExt, which #1584 fixes.

So expect the LTS DownstreamAD check on this PR to be red, on that assertion rather than on
the load error. That is the point of the change: the group can now reach its tests, and the
first thing it finds is a genuine pre-existing bug that was invisible before.

Not verified

Julia LTS end-to-end green on this PR alone; that needs #1584 as well.


This PR should be ignored until reviewed by @ChrisRackauckas.

🤖 Generated with Claude Code

https://claude.ai/code/session_019wKpyZHy9u4QhR4ePiVmam

`test/downstream/remake_autodiff.jl` has used `ChainRulesCore` since SciML#1567, but
it was never added to `test/downstream/Project.toml`. `GROUP=DownstreamAD` fails
on master with

    Autodiff Remake: Error During Test
      LoadError: ArgumentError: Package ChainRulesCore not found in current path.

Autodiff Remake is the group's first testset, so the error aborts the run before
the rest of the group executes.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019wKpyZHy9u4QhR4ePiVmam
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review September 7, 2026 01:00
@ChrisRackauckas
ChrisRackauckas merged commit 82306f2 into SciML:master Sep 7, 2026
68 of 69 checks passed
ChrisRackauckas referenced this pull request Sep 7, 2026
`plot(integrator)` threw for any system carrying symbolic metadata, and it could
not resolve observed equations at all: the recipe indexed `integrator.u`
directly, labelled the independent variable by indexing `variable_symbols` at
`0`, never wrapped a scalar `idxs`, shared one label buffer across series, and
dropped the plot function from an `idxs` tuple. Symbolic values now resolve
through `SymbolicIndexingInterface`, matching the solution recipe, so the same
`idxs` produces the same series and labels for an integrator as for a solution.

The lookup is exposed as the public, documented
`SciMLBase.symbolic_interpolation(integrator, t, idxs)`, the integrator analogue
of `sol(t; idxs)`, so solver packages can route `integrator(t; idxs)` to it.

`getindepsym(::DEIntegrator)` returns the first independent variable rather than
the whole vector, matching its own docstring and every other method; without
this, naming the independent variable in `idxs` is never recognised as the time
axis. `plot_analytic = true` now raises `ArgumentError` rather than
`UndefVarError` from a branch that referenced names SciMLBase does not define.



Claude-Session: https://claude.ai/code/session_019wKpyZHy9u4QhR4ePiVmam

Co-authored-by: ChrisRackauckas-Claude <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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