Skip to content

Update ODEProblem internals assertions for current SciMLBase - #119

Merged
ChrisRackauckas merged 2 commits into
SciML:mainfrom
ChrisRackauckas-Claude:fix-ode-problem-internals-assertions
Sep 26, 2026
Merged

ChrisRackauckas merged 2 commits into
SciML:mainfrom
ChrisRackauckas-Claude:fix-ode-problem-internals-assertions

Conversation

@ChrisRackauckas-Claude

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

Copy link
Copy Markdown
Member

Summary

Core/ode_problem.jl errors on all lanes (lts and julia '1'):

Expression: ode_prob.f.f.f == FVM.pde_odes!
FieldError: type typeof(FiniteVolumeMethod1D.pde_odes!) has no field `f`

Since SciMLBase 3.53, ODEFunction{iip, AutoSpecialize} stores the raw function — specialization is now installed solver-side — so ode_prob.f.f is pde_odes! directly and the third .f accesses a field that does not exist. Not a Julia 1.13 change; reproduced identically on Julia 1.10.12 and 1.13.0.

Also replaces the deprecated ode_prob.kwargs.data.callback access (warns on current Base: "use values(kwargs) instead of kwargs.data") with ode_prob.kwargs[:callback].

Test plan

  • test/ode_problem.jl passes on Julia 1.10.12 and 1.13.0 with SciMLBase 3.53.3; on unfixed code the f.f.f assertion throws FieldError on both
  • CI

🤖 Generated with Devin CLI 3000.10.21 (model: SWE-2 Max). Session: local session, /home/crackauc/.local/share/devin/cli/sessions.db

CI triage (2026-09-25)

Head commit 9e689a1, run https://github.com/SciML/FiniteVolumeMethod1D.jl/actions/runs/34707665764 vs base main (fc4dead), run https://github.com/SciML/FiniteVolumeMethod1D.jl/actions/runs/35227686992:

check classification evidence
Tests - Core (Julia 1, x86) master-red Identical failure on base: Makie fails to precompile on 32-bit (DomainError with -1.020934592e9 in sqrt during Makie precompile, Failed to precompile Makie), erroring Core/dirichlet_source.jl via CairoMakie. Third-party/env issue, untouched by this PR (only test/ode_problem.jl changed).
Tests - Core (Julia 1) fixed by PR Base fails with FieldError: type typeof(FiniteVolumeMethod1D.pde_odes!) has no field 'f' in Core/ode_problem.jl; head passes.
Tests - Core (Julia lts) fixed by PR Base fails with Core/ode_problem.jl: Error During Test (same FieldError); head passes.
Tests - Core (Julia pre), QA, Downgrade, Runic, Typos, benchmark, detect pass Green on head.

No merge with base needed: branch is one commit behind main (fc4dead touches only .github/workflows/Documentation.yml, git merge-tree shows a clean trivial merge, no conflicts). No code changes made — the single red lane is pre-existing on main and unrelated to this PR, so there is nothing PR-caused to fix. Local verification: full Core group passes on Julia 1.10.12 with SciMLBase 3.56.0, including Core/ode_problem.jl 13/13; typos clean; Runic --check clean on the changed file.


🤖 Posted by an AI agent — harness: opencode 1.18.31 · model: opencode/muse-spark-1.3-contributor-free
Conversation: /home/crackauc/sandbox/fleet-master-jobs/nw-finitevolumemethod1d-119/log.txt

Risk assessment

  • Risk: low
  • Blast radius: Only test/ode_problem.jl; no production behavior, public-API, or SemVer change. Tests retain SciMLBase field inspection but introduce no private dependency helper. Function-identity and callback assertions remain intact; only the wrapper-depth assumption is relaxed. The description omits the recursive compatibility handling for older SciMLBase versions.
  • Evidence: Head 9e689a1 has 11 passing checks and one failure: tests / Core (julia 1, ubuntu-latest, x86) / Tests - Core (Julia 1). Its Makie precompilation DomainError with -1.020934592e9 also occurs on default-branch commits fc4dead and f2aab1e: pre-existing, no observed test regression. Core Julia 1 and lts fail on default with the function-wrapper assertion error and pass on head; Downgrade also passes. Logs compared: head, latest default, preceding default.
  • Independent review: Codex CLI 0.156.1 (Mac) / gpt-6-astra rated it low, high confidence: the complete diff preserves substantive assertions, changes only tests, and the sole failing check reproduces on two default-branch commits.
  • Merge: auto-merge candidate

🤖 Risk assessment posted by an AI agent (fleet master) — harness: Codex CLI 0.156.1 (Mac) / gpt-6-astra; dispatched by Claude Code head, model claude-opus-5-5[1m]
Conversation: local Claude Code session 3cd6500a-1f81-46b5-ac0b-c466e15b6a53 on Chris's Mac (session ID, no URL)

ChrisRackauckas and others added 2 commits September 12, 2026 11:33
`ode_prob.f.f.f` assumed `AutoSpecialize` wraps `f` in two extra
layers; since SciMLBase 3.53 the `ODEFunction` stores the raw function
and specialization is installed solver-side, so `ode_prob.f.f` is
`pde_odes!` directly. The test errored on `julia lts` and `julia '1'`
with `typeof(pde_odes!) has no field 'f'`.

Also replace `ode_prob.kwargs.data.callback` (deprecated on current
Base: "use values(kwargs) instead of kwargs.data") with
`ode_prob.kwargs[:callback]`.

Verified locally: `test/ode_problem.jl` passes on Julia 1.10.12 and
1.13.0 with SciMLBase 3.53.3.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Devin <noreply@cognition.ai>
Agent-Harness: Devin CLI 3000.10.21
Agent-Model: SWE-2 Max
Agent-Session: local session, /home/crackauc/.local/share/devin/cli/sessions.db
SciMLBase 3.53+ stores `f` unwrapped (one ODEFunction level), while
SciMLBase 3.18-era versions wrap the specialization in a second
ODEFunction. The downgrade CI lane resolves the old version, so a fixed
number of `.f` dereferences fails there. Recurse until the raw function
instead.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Devin <noreply@cognition.ai>
Agent-Harness: Devin CLI 3000.10.21
Agent-Model: SWE-2 Max
Agent-Session: /home/crackauc/.local/share/devin/cli/summaries/history_4c9fddb81d834736.md
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Status note: the Core failure is in test/dirichlet_source.jl (DomainError from a broadcast sqrt), which also fails on master (https://github.com/SciML/FiniteVolumeMethod1D.jl/actions/runs/34675968759) and is unrelated to this PR's ode_problem.jl assertion updates.

@ChrisRackauckas
ChrisRackauckas merged commit 96883ed into SciML:main Sep 26, 2026
11 of 12 checks passed
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