Skip to content

Raise SymbolicIndexingInterface compat lower bound to 0.3.47 - #5153

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-sii-compat-downgrade-sde
Sep 14, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-sii-compat-downgrade-sde

Conversation

@ChrisRackauckas-Claude

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

Copy link
Copy Markdown
Member

Ignore until reviewed by @ChrisRackauckas.

What changed and why

Raises the SymbolicIndexingInterface compat lower bound to 0.3.47 in lib/ModelingToolkitBase/Project.toml (was 0.3.39) and the root Project.toml (was 0.3.46). Nothing else changes.

#5131 added the testsets "Array unknowns on a completed system" to lib/ModelingToolkitBase/test/odesystem.jl and test/sdesystem.jl. They index an array unknown on a completed (non-scalarized) system (prob[x], sol[x]). With SymbolicIndexingInterface ≤ 0.3.46, _getsym(sys, ::ArraySymbolic, ...) recurses into getsym(sys, idx::Vector{Int}), which calls is_observed(sys, ::Int) for every index. variable_symbols(csys) on a completed system is [x, w] (length 2), so index 3 is not "a variable", is_observed continues to parameter_index(sys, 3) → parameter_index(::IndexCache, ::Int), which has no method, and the SII fallback fails with MethodError: no method matching symbolic_container(::ModelingToolkitBase.IndexCache). SymbolicIndexingInterface 0.3.47 (SciML/SymbolicIndexingInterface.jl@373e18ee9, "Avoid recursive getsym call") returns GetStateIndex(idx) directly and never takes that path. Regular CI resolves 0.3.55 and passes; only the downgrade jobs, which resolve the floor (0.3.46), hit it.

Noticed on #5148, which does not touch these tests. It is a master failure:

Verification (Julia 1.10.11, local Pkg.develop of lib/ModelingToolkitBase with the downgrade job's versions pinned: SciMLBase 3.54.0, SymbolicUtils 4.37.0, Symbolics 7.37.0, DiffEqBase 7.18.1, StochasticDiffEq 7.1.3, OrdinaryDiffEq 7.8.1)

The scripts are the "Array unknowns on a completed system" testsets extracted verbatim from test/sdesystem.jl and test/odesystem.jl (plus a pkgversion print).

Before (master 444ccfb0, SymbolicIndexingInterface pinned to 0.3.46):

$ julia +1.10 --project=envdown sde_array_test.jl
SII=0.3.46 SciMLBase=3.54.0 Symbolics=7.37.0 SymbolicUtils=4.37.0 StochasticDiffEq=7.1.3
Array unknowns on a `complete`d system: Error During Test at sde_array_test.jl:26
  Expression: prob[x] ≈ [1.0, 2.0, 3.0]
  MethodError: no method matching symbolic_container(::ModelingToolkitBase.IndexCache)
    [1] parameter_index(indp::ModelingToolkitBase.IndexCache, sym::Int64)
    [2] parameter_index  @ lib/ModelingToolkitBase/src/systems/abstractsystem.jl:196 [inlined]
    [3] is_observed      @ lib/ModelingToolkitBase/src/systems/abstractsystem.jl:380 [inlined]
    ...
Array unknowns on a `complete`d system: Error During Test at sde_array_test.jl:36
  Expression: length((sol[x])[end]) == 3
  MethodError: no method matching symbolic_container(::ModelingToolkitBase.IndexCache)
ERROR: LoadError: Some tests did not pass: 8 passed, 0 failed, 2 errored, 0 broken.
$ julia +1.10 --project=envdown ode_array_test.jl
SII=0.3.46 SciMLBase=3.54.0 Symbolics=7.37.0 SymbolicUtils=4.37.0 DiffEqBase=7.18.1 OrdinaryDiffEq=7.8.1
  Expression: prob[x] ≈ [1.0, 2.0, 3.0]
  MethodError: no method matching symbolic_container(::ModelingToolkitBase.IndexCache)
  Expression: ≈((sol[x])[end], (analytic(1.0))[1:3], rtol = 1.0e-6)
  MethodError: no method matching symbolic_container(::ModelingToolkitBase.IndexCache)
  Expression: ≈((msol[x])[end], (sol[x])[end], rtol = 1.0e-6)
  MethodError: no method matching symbolic_container(::ModelingToolkitBase.IndexCache)
  Expression: ≈((dsol[x])[end], (analytic(1.0))[1:3], rtol = 1.0e-5)
  MethodError: no method matching symbolic_container(::ModelingToolkitBase.IndexCache)
ERROR: LoadError: Some tests did not pass: 20 passed, 0 failed, 4 errored, 0 broken.

After (this branch; Pkg.free + Pkg.add(name="SymbolicIndexingInterface", version="0.3.47") + Pkg.pin, everything else unchanged):

$ julia +1.10 --project=envafter sde_array_test.jl
SII=0.3.47 SciMLBase=3.54.0 Symbolics=7.37.0 SymbolicUtils=4.37.0 StochasticDiffEq=7.1.3
Test Summary:                          | Pass  Total   Time
Array unknowns on a `complete`d system |   10     10  18.5s

$ julia +1.10 --project=envafter ode_array_test.jl
SII=0.3.47 SciMLBase=3.54.0 Symbolics=7.37.0 SymbolicUtils=4.37.0 DiffEqBase=7.18.1 OrdinaryDiffEq=7.8.1
Test Summary:                          | Pass  Total   Time
Array unknowns on a `complete`d system |   24     24  27.4s

The whole lib/ModelingToolkitBase/test/sdesystem.jl also passes in the same after-environment (included directly; 16 top-level testsets, no failures, no errors):

$ julia +1.10 --project=envafter run_sdesystem_file.jl
SII=0.3.47
...
Test Summary:                          | Pass  Total  Time
Array unknowns on a `complete`d system |   10     10  6.3s
SDESYSTEM_FILE_DONE

typos and Runic report nothing on the two changed files.

Not verified

  • I did not run the full Downgrade / Downgrade Sublibraries workflows locally, only the affected testsets and sdesystem.jl with the job's pinned versions.
  • Not the whole odesystem.jl file with SII 0.3.47 (only its "Array unknowns on a completed system" testset, 24/24).
  • The master Downgrade Sublibraries (InterfaceI) job for 444ccfb also has two unrelated errors in test/array_equation_dae.jl:60,118 (a parameter-despecialization barrier requires exactly one parameter wrapper, thrown in DiffEqBase 7.18.1 solve.jl:842). They are not touched by this PR; that file is unchanged since 2026-08-17 and the previous green master run resolved DiffEqBase 7.15.0, so it looks like a DiffEqBase-floor issue that surfaced when the resolver moved to 7.18.1.
  • With ModelingToolkit (tearing) loaded, the raw mprob.u0 ≈ prob.u0 / mprob.f(...) ≈ prob.f(...) comparisons in the same testsets fail on the regular tests / InterfaceI and InterfaceII jobs for 444ccfb (https://github.com/SciML/ModelingToolkit.jl/actions/runs/34779646543). That is a separate regression from Support array unknowns on a completed system for every problem type #5131 (unknown order after mtkcompile), handled in Compare complete/mtkcompile array-unknown problems through symbolic indices #5154.

🤖 Generated with Claude Code (model: claude-fable-5-1)
https://claude.ai/code/session_01VorhgJYhDasyVLpGNrviga

Indexing an array unknown on a `complete`d system (`prob[x]`, `sol[x]`)
goes through `SymbolicIndexingInterface._getsym(::ArraySymbolic)`. Before
SymbolicIndexingInterface 0.3.47 that path recursed into
`getsym(sys, ::Vector{Int})`, which calls `is_observed(sys, ::Int)` for each
index and ends in `parameter_index(::IndexCache, ::Int)`, a method that does
not exist, so the fallback errors with
`MethodError: no method matching symbolic_container(::IndexCache)`.
0.3.47 builds `GetStateIndex(idx)` directly and never takes that path.

This only shows on the downgrade jobs, which resolve the lowest allowed
version (0.3.46).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Agent-Harness: Claude Code
Agent-Model: claude-fable-5-1
Agent-Session: https://claude.ai/code/session_01VorhgJYhDasyVLpGNrviga
Claude-Session: https://claude.ai/code/session_01VorhgJYhDasyVLpGNrviga
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review September 14, 2026 10:20
@ChrisRackauckas
ChrisRackauckas merged commit 9ebc49e into SciML:master Sep 14, 2026
100 of 110 checks passed
ChrisRackauckas added a commit that referenced this pull request Sep 14, 2026
- Document the PDE solution interface shared by discretizers (#5149)
- Point the docs `ModelingToolkit` source at the repository root (#5152)
- Unify array-equation support behind a capability trait; fold in #5101 ODE support and MultiObjectiveOptimizationFunction (#5148)
- Raise SymbolicIndexingInterface compat lower bound to 0.3.47 (#5153)
- Compare `complete` and `mtkcompile` array-unknown problems through symbolic indices (#5154)



Agent-Harness: Claude Code
Agent-Model: claude-opus-5[1m]
Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

3 participants