Repository navigation
Report lazy interpolation for composites with a lazy member - #4931
singhharsh1708 wants to merge 4 commits into
Conversation
Independent review (Codex CLI 0.163.0, model gpt-6.1-sol, reasoning effort high): MERGE, risk medium-high (MH1). Reviewed head: Full reviewVERDICT: MERGE Riskmedium-high (MH1: Changes errors when stripping default and composite ODE solutions, affecting the core solution/interpolation interface.) Risk assessment
Blocking findingsNone. Non-blocking findingsNone. What I ranLauncher locations are normalized to Repository inspection, all exit 0: git rev-parse HEAD
git diff origin/master...HEAD
git diff --check origin/master...HEAD
git merge-base origin/master HEAD
git rev-parse origin/master
git log -1 --format=%B
git log -1 --no-merges --format=%B
git status --short
gh pr view 4931 --repo SciML/OrdinaryDiffEq.jl --json state,headRefOid,baseRefOid
gh issue view 4906 --repo SciML/OrdinaryDiffEq.jl --json title,body,state,urlHEAD matched the requested commit; merge-base matched the supplied base SHA. The PR remained open. Neither author trailer was present. Final head status was clean; the base worktree’s sole tracked modification was the copied test. Changed regression file, head - exit 0: jrun --project=. -e 'using TestEnv; TestEnv.activate(); using Test, SafeTestsets; @show VERSION; include("test/InterfaceI/ode_strip_test.jl")'Output tail: Fail-before verification, merge-base - exit 1: I copied the PR’s The preceding three testsets passed, as did the eager-default assertion. Supplemental head probe - exit 0, 21 assertions passed: jrun --project=. -e '
using TestEnv; TestEnv.activate()
using Test, OrdinaryDiffEq, OrdinaryDiffEqCore, OrdinaryDiffEqLowOrderRK
import SciMLBase
@show VERSION
@testset "Composite traits" begin
for (alg, expected) in ((Vern7(), true), (Vern7(lazy=false), false), (AutoVern7(Rodas5P()), true), (AutoVern7(Rodas5P(); lazy=false), false), (DefaultODEAlgorithm(), true), (DefaultODEAlgorithm(lazy=Val(false)), false), (AutoTsit5(Rosenbrock23()), false), (OrdinaryDiffEqCore.CompositeAlgorithm((Tsit5(), BS5()), i->1), true), (OrdinaryDiffEqCore.CompositeAlgorithm((Tsit5(), BS5(lazy=false)), i->1), false))
@test SciMLBase.has_lazy_interpolation(alg) === expected
end
end
@testset "Analytic decay" begin
f!(du,u,p,t) = (du[1] = -p[1]*u[1])
for alg in (Vern7(), Vern7(lazy=false), AutoVern7(Rodas5P()), AutoVern7(Rodas5P(); lazy=false))
p = [1.0]
prob = ODEProblem(f!, [1.0], (0.0,1.0), p)
sol = solve(prob, alg)
@test SciMLBase.successful_retcode(sol)
@test isapprox(sol(0.5)[1], exp(-0.5); atol=1e-8, rtol=1e-8)
sol = solve(prob, alg)
p[1] = 2.0
err = sol(0.5)[1] - exp(-0.5)
lazy = SciMLBase.has_lazy_interpolation(alg)
println("trait=", lazy, " error_after_parameter_mutation=", err)
@test (abs(err) > 1e-3) == lazy
end
end
'Output tail: The first probe invocation used the same command with unqualified Inspected the supplied checks and failed-log excerpts for main CI, sublibrary CI, and downstream CI:
What I did not verify
AUTHOR_GRADE: {"task":"bugfix","score":5,"difficulty":2,"rounds":1,"author_harness":"unknown","author_model":"unknown","note":"Small, focused trait fix with a regression that fails on the merge-base and passes on head. Independent composite-trait and analytic-decay probes also pass; unmatched CI failures remain unattributed."} 🤖 Posted by an AI agent · harness: Claude Code · model: claude-opus-5-5 (coordinating gpt-6.1-sol reviewers) |
40a939e to
eeb30f8
Compare
eeb30f8 to
ac1e6f5
Compare
PR: #4931 Reviewed head: ac1e6f5 Risk assessment
Review reportVERDICT: CHANGES Riskmedium (M1: adds dispatch on SciMLBase.has_lazy_interpolation that changes existing composite/default solution-stripping calls) Blocking findings
Non-blocking findings
What I ran
What I did not verify
AUTHOR_GRADE: {"task":"bugfix","score":3,"difficulty":1,"rounds":1,"author_harness":"unknown","author_model":"unknown","note":"The small trait extension is consistent by inspection and its dependency API is public in both checked versions. Solver checks never passed resource admission, so functional correctness and regression coverage remain unverified; no runtime regression was established."} Head link: ac1e6f5 🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol |
|
Interpolating stripped eager default solutions is what #4921 fixes and tests; on its own this PR only changes which solutions are allowed to strip. Merged master to refresh the stale downstream runs. |
SciMLBase.has_lazy_interpolationnow returnstruefor aCompositeAlgorithmwith a lazy member, soAutoVern7(Rodas5P())and the default solver report what their dense output does, asVern7()does.The only reader of the trait for a composite is
strip_solution, which now throwsLazyInterpolationExceptionfor these solutions, as it does forVern7(): the stripped solution has nofto build the lazy stages with. Sostrip_solution(solve(prob))with the default solver now throws, even when only Tsit5 ran, where before it returned a stripped solution that interpolated wrongly (#4927).DefaultODEAlgorithm(lazy = Val(false))still strips, so the default-solver testset inode_strip_test.jlnow uses it and checks that the lazy default throws. Non-lazy composites such asAutoTsit5(Rosenbrock23())are unchanged here; theirCompositeCacheMethodErroris #4907 (#4921).integrator_interface.jlreads the trait throughunwrap_alg, i.e. for the current member, so it is unaffected.With this branch the issue's snippet prints
true false true falsefor the four algorithms (master:true false false false);ode_strip_test.jland Core QA pass.Fixes #4906
Risk assessment
CompositeAlgorithm, sostrip_solutionon a default-solver solution now throws).SciMLBase.has_lazy_interpolationfor aCompositeAlgorithmnow returns true when any member is lazy. Its only composite reader isstrip_solution, which now throwsLazyInterpolationExceptionforAutoVern7(...)and default-solver solutions, as it already does forVern7(); before, it returned a stripped solution that interpolated wrongly (Stripped default-solver solutions interpolate with the Hermite fallback, silently wrong #4927). Code callingstrip_solution(solve(prob))with the default solver will error and needsDefaultODEAlgorithm(lazy = Val(false)). Non-lazy composites andintegrator_interface.jl(which reads the trait for the current member) are unchanged.true false true falsefor the four algorithms (master:true false false false). The default-solver testset inode_strip_test.jlnow useslazy = Val(false)and checks that the lazy default throws;ode_strip_test.jland Core QA pass per the body. The red checks (SciMLSensitivity Core2, ProbNumDiffEq, AD lts, DiffEqDevTools downgrade, both GPU lanes, NonlinearSolve Core Julia 1) also fail on master.