Repository navigation
Overload with_concrete_parameters for DespecializedParameters - #1652
Conversation
Independent review of Raw report SHA-256: VERDICT: CHANGES RiskMedium-high (MH1: default MTK observed solution indexing changes the callback parameter dispatch boundary and empty-result typing); confidence medium. The measured performance improvement accompanies observable core behavior changes. Released cross-package integration remains blocked. The SII compatibility-floor increase also meets ML4; the highest applicable criterion controls. At this level the applied rubric requires requester decision; this reviewer does not merge. Blocking findings
Non-blocking findingsConsider retaining a small, discriminating prebuilt-getter AD regression in DownstreamAD after the companion release. The added allocation sentinel guards performance. The independent Enzyme case below passes on both commits, so it does not guard the specific Enzyme exception claimed in the PR. What I ran
What I did not verifyThe registered 0.3.57 dependency environment, successful published integration CI, the full synthetic-merge runtime suite, Julia 1.10/LTS/current 1.13, 32 bit, Python, QA, Reactant/GPU or MPI execution are not established by this local run. No claims of those passes are made. QA-LTS is declared by the head but absent from the emitted matrix; branch-required status configuration returns HTTP 404, so required-name policy is unknown. The original Enzyme exception is not reproduced by the reconstructed probe. The pre-existing Zygote constructor and SII fixture failures remain unresolved; no correction to their underlying causes was verified. The separate SII remainder has eight existing broken assertions. Their underlying issues are not established as corrected. Local coverage is conditional on the companion commit and uses Julia 1.12.1 only. Reviewer provenance: Codex Desktop, native cli_version 0.159.2; model Grade handoff: PR/head-commit account verified as @SebastianM-C through public GitHub API. Author agent/model/cost unknown. Task: core symbolic-observed getter performance/AD integration; difficulty 4/5 (cross-package inference and differentiation); review round 1, fresh initial review of supplied head. Author-work score 4/5 (minor merge-readiness work): the implementation and allocation benefit are supported, while the introduced dependency requirement still needs its companion release and successful integration verification. No substantive candidate code repair is established. Local setup limitations and matched pre-existing failures are not counted as author code defects. Reviewer accuracy remains unknown without independent ground truth. Links: PR #1652 ; commit ; CI run ; CI run ; PR #197 ; commit Supporting public evidence · SHA-256 dbe265f4b0e20aacf9a0fe0024dfc99f06c2947df583ab8532729c705f221879Supporting evidenceInitial assessment SHA256: Conditional dependency: public SII companion commit Review command ledgerPortable labels: Common execution environment: export TMPDIR="$PWD/scratch"
export JULIA_PKG_PRECOMPILE_AUTO=0
export JULIA_NUM_PRECOMPILE_TASKS=1Source preparation (all exit 0): git clone https://github.com/SciML/SciMLBase.jl.git source
git -C source fetch origin f0e907c5550f394db309e375bbd3a3934519095a a0bacd1cb0da86e3d72f41235e68089ced110fb2
git -C source checkout --detach f0e907c5550f394db309e375bbd3a3934519095a
git -C source worktree add --detach ../base a0bacd1cb0da86e3d72f41235e68089ced110fb2
git -C source merge-base HEAD a0bacd1cb0da86e3d72f41235e68089ced110fb2
git -C source worktree add --detach ../merge-base 365283c66ec24db40c3fae1f2694693070dd7a46
git -C source diff 365283c66ec24db40c3fae1f2694693070dd7a46 HEAD > pr.diff
git clone https://github.com/SciML/SymbolicIndexingInterface.jl.git sii
git -C sii fetch origin pull/197/head
git -C sii worktree add --detach ../sii-companion FETCH_HEADRegistry-only exact-head setup (exit 1): julia --startup-file=no --project=env/native -e 'using Pkg; Pkg.Registry.update(); Pkg.develop(path="source"); Pkg.instantiate()'Output: possible SII versions 0.1.0–0.3.55; SciMLBase 3.58.1 requires 0.3.57–0.3; no versions left. Public General independently confirms 0.3.55 as latest listed version. No runtime tests executed in this environment. Conditional exact-head setup with the unmodified public companion (exit 0): julia --startup-file=no --project=env/head -e 'using Pkg; Pkg.develop([PackageSpec(path="source"), PackageSpec(path="sii-companion")]); Pkg.add(["ModelingToolkit", "OrdinaryDiffEq", "ForwardDiff", "Zygote", "Enzyme", "Mooncake", "SciMLTesting", "SafeTestsets"]); Pkg.instantiate()'The head test dependencies and all applicable compatibility constraints were promoted into a separate environment. An initial resolve/instantiate accidentally allowed automatic precompilation; that process tree was stopped, and subsequent work uses the common serial settings above. This setup event is not a passed test. Full CI log commands (all exit 0 except aggregate integration limit): gh run view 39920009126 --repo SciML/SciMLBase.jl --log
gh run view 39920009126 --repo SciML/SciMLBase.jl --log-failed
gh run view 39920009374 --repo SciML/SciMLBase.jl --log
gh run view 39920009374 --repo SciML/SciMLBase.jl --log-failed
gh run view 39920009501 --repo SciML/SciMLBase.jl --log
gh run view 39920009501 --repo SciML/SciMLBase.jl --log-failed
gh run view 39920009577 --repo SciML/SciMLBase.jl --log
gh run view 39920009577 --repo SciML/SciMLBase.jl --log-failed
gh run view 39920009639 --repo SciML/SciMLBase.jl --log
gh run view 39920009639 --repo SciML/SciMLBase.jl --log-failed
gh run view 39920009701 --repo SciML/SciMLBase.jl --log
gh run view 39920009701 --repo SciML/SciMLBase.jl --log-failed
gh run view 39920009766 --repo SciML/SciMLBase.jl --log
gh run view 39920009766 --repo SciML/SciMLBase.jl --log-failed
gh run view 39920009907 --repo SciML/SciMLBase.jl --log
gh run view 39920009907 --repo SciML/SciMLBase.jl --log-failed
gh run view 39920009968 --repo SciML/SciMLBase.jl --log
gh run view 39920009968 --repo SciML/SciMLBase.jl --log-failed
gh api repos/SciML/SciMLBase.jl/actions/runs/39920009501/logsIntegration aggregate log commands exit 1 (gh request-count limit); archive fallback exits 0. The archive is read with Python zipfile into scratch and all 47 aggregate job logs inspected. Other log retrieval commands exit 0. Branch required-status configuration query (exit 1): gh api repos/SciML/SciMLBase.jl/branches/master/protection/required_status_checksHTTP 404; repository-required check names remain unknown. The SII version-list snapshot SHA256 is gh api repos/JuliaRegistries/General/contents/S/SymbolicIndexingInterface/Versions.toml --jq .content | base64 -d
gh api 'repos/JuliaRegistries/General/commits?path=S%2FSymbolicIndexingInterface%2FVersions.toml&per_page=1' --jq '.[] | {sha,html_url}'Both exit 0. Immutable public reference: registered SII versions Initial sentinel (exit 0; compiled modules/package images at defaults, serial precompile task cap 1): julia --startup-file=no --project=env/head -e 'using Pkg; Pkg.resolve(); Pkg.instantiate(); include("source/test/downstream/despecialized_observed.jl"); println("REVIEW_SENTINEL_PASS"); println("whole getter allocations=", @allocated getz(sol)); Pkg.status()'Output: Reusable review probesThese are independent scratch probes, not PR source edits. Original failures remain recorded. Focused controls ask separate unresolved questions; their strict final assertion prevents caught backend errors from producing a success verdict. probes/run-serial.shSHA256 #!/usr/bin/env bash
set -u
export TMPDIR="$PWD/scratch"
export JULIA_PKG_PRECOMPILE_AUTO=0
export JULIA_NUM_PRECOMPILE_TASKS=1
run_review() {
label="$1"
shift
printf '%s START %s\n' "$(date -u +%FT%TZ)" "$label"
"$@" > "$label.log" 2>&1
review_exit=$?
printf '%s\t%s\t%s\n' "$(date -u +%FT%TZ)" "$label" "$review_exit" >> runtime-exits.tsv
printf '%s END %s exit=%s\n' "$(date -u +%FT%TZ)" "$label" "$review_exit"
tail -8 "$label.log"
}
run_review prepare-controls julia --startup-file=no --compiled-modules=existing --pkgimages=existing --project=env/head probes/prepare-controls.jl
run_review native-base julia --startup-file=no --compiled-modules=existing --pkgimages=existing --project=env/native-base probes/registered-base.jl
run_review sentinel-base julia --startup-file=no --compiled-modules=existing --pkgimages=existing --project=env/merge-base probes/run-sentinel.jl
run_review sentinel-head-check julia --startup-file=no --compiled-modules=existing --pkgimages=existing --project=env/head probes/run-sentinel.jl
run_review actual-head julia --startup-file=no --compiled-modules=existing --pkgimages=existing --project=env/head probes/actual-path.jl
run_review actual-base julia --startup-file=no --compiled-modules=existing --pkgimages=existing --project=env/merge-base probes/actual-path.jl
run_review core-head env GROUP=Core julia --startup-file=no --compiled-modules=existing --pkgimages=existing --threads=11 --project=env/head probes/run-groups.jl
run_review sii-state-head julia --startup-file=no --compiled-modules=existing --pkgimages=existing --project=env/head probes/run-sii.jl
run_review downstream-head bash -c 'cd env && GROUP=Downstream julia --startup-file=no --compiled-modules=existing --pkgimages=existing --threads=11 --project=head ../probes/run-groups.jl'
run_review downstream-ad-head bash -c 'cd env && GROUP=DownstreamAD julia --startup-file=no --compiled-modules=existing --pkgimages=existing --threads=11 --project=head ../probes/run-groups.jl'
run_review sii-group-head bash -c 'cd env && GROUP=SymbolicIndexingInterface julia --startup-file=no --compiled-modules=existing --pkgimages=existing --threads=11 --project=head ../probes/run-groups.jl'probes/run-sentinel.jlSHA256 using Pkg
Pkg.resolve()
Pkg.instantiate()
using Test
@testset "PR sentinel unchanged" begin
include(joinpath(@__DIR__,"..","source","test","downstream","despecialized_observed.jl"))
endprobes/run-groups.jlSHA256 include(joinpath(@__DIR__, "..", "source", "test", "runtests.jl"))probes/run-sii.jlSHA256 using Test
@testset "SII companion state indexing tests unchanged" begin
include(joinpath(@__DIR__,"..","sii-companion","test","state_indexing_test.jl"))
endprobes/prepare-controls.jlSHA256 using Pkg
for (envdir,src) in [("env/merge-base","merge-base"),("env/base-tip","base")]
Pkg.activate(envdir)
Pkg.compat("SymbolicIndexingInterface", "0.3.36")
Pkg.develop([PackageSpec(path=src),PackageSpec(path="sii-companion")];preserve=Pkg.PRESERVE_ALL)
Pkg.resolve()
Pkg.instantiate()
end
Pkg.activate("env/downstream")
Pkg.develop([PackageSpec(path="source"),PackageSpec(path="sii-companion")])
Pkg.resolve()
Pkg.instantiate()probes/registered-base.jlSHA256 using Pkg
Pkg.develop(path="merge-base")
Pkg.instantiate()
Pkg.status()probes/actual-path.jlSHA256 using SciMLBase, ModelingToolkit, OrdinaryDiffEq, SymbolicIndexingInterface, Test
using OrdinaryDiffEqRosenbrock: Rodas5
using OrdinaryDiffEqBDF: FBDF
using ModelingToolkit: t_nounits as t, D_nounits as D
using ForwardDiff, Zygote, Enzyme, Mooncake, DifferentiationInterface, ADTypes
import SciMLStructures as SS
@variables x(t) w(t)
@parameters a
@mtkcompile sys = System([D(x) ~ -a*x, w ~ a*x^2 + 2t], t)
prob = ODEProblem(sys, [x=>2.0, a=>0.7], (0.0,1.0))
getw = getsym(sys,w)
for alg in (nothing, Tsit5(), Rodas5(), FBDF())
sol = alg === nothing ? solve(prob; saveat=0.1, abstol=1e-10,reltol=1e-10) : solve(prob,alg;saveat=0.1,abstol=1e-10,reltol=1e-10)
expected = [0.7*4*exp(-1.4*s)+2*s for s in sol.t]
@test sol.prob.p isa SciMLBase.DespecializedParameters
@test getw(sol) ≈ expected rtol=1e-8
for inds in (:, 2:4, [4,2,4], [3], Int[], sol.t .<0.5, falses(length(sol.t)))
@test getw(sol,inds) ≈ expected[inds] rtol=1e-8
end
@test getw(sol,3) ≈ expected[3] rtol=1e-8
@test getw(sol,CartesianIndex(3)) ≈ expected[3] rtol=1e-8
@test_throws BoundsError getw(sol,[length(sol.t)+1])
println("analytic solve/index oracle PASS alg=", alg === nothing ? "default" : nameof(typeof(alg)), " values=",getw(sol)[[1,end]])
end
sol=solve(prob,Tsit5();saveat=0.001,abstol=1e-10,reltol=1e-10)
getw(sol)
allocs = [@allocated(getw(sol)) for _ in 1:5]
times = [@elapsed(getw(sol)) for _ in 1:10]
println("MEASURE points=",length(sol.t)," bytes=",minimum(allocs)," time_min_s=",minimum(times)," outputbytes=",sizeof(getw(sol)))
# The direct hook must preserve alias identity and propagate mutation/errors.
for raw_value in ([2.0], (rate=2.0,), 2.0, nothing, (params=2.0,))
wrapper=SciMLBase.DespecializedParameters(raw_value)
@test with_concrete_parameters(p->SciMLBase.unwrap_parameters(p),wrapper) === raw_value
end
raw=[2.0]; wrapped=SciMLBase.DespecializedParameters(raw)
seen=with_concrete_parameters((p,x)->(p,x),wrapped,:payload)
println("HOOK sees wrapper=",seen[1] isa SciMLBase.DespecializedParameters)
if hasmethod(with_concrete_parameters,Tuple{typeof(identity),typeof(wrapped)})
@test seen[2] === :payload
@test SciMLBase.unwrap_parameters(seen[1]) === raw
end
with_concrete_parameters((p)->(p[1]=3.0),wrapped)
@test raw==[3.0]
@test_throws ErrorException with_concrete_parameters(_->error("sentinel"),wrapped)
# Differentiate a prebuilt getter on a solved default MTK problem. Linear scaling of all
# saved states gives an independent analytic derivative 2*a*sum(u^2).
# Rebuild the solution through its public builder, keeping its time/metadata/parameters.
const AD_SOL=sol
const GETW=getw
function state_loss(q)
us=[q .* u for u in AD_SOL.u]
s=SciMLBase.build_solution(AD_SOL.prob,AD_SOL.alg,AD_SOL.t,us)
return sum(GETW(s))
end
expected=2*0.7*sum(u[1]^2 for u in sol.u)
@test ForwardDiff.derivative(state_loss,1.0) ≈ expected rtol=1e-10
println("AD analytic oracle=", expected)
for (name,run) in (
"Zygote" => ()->Zygote.gradient(state_loss,1.0)[1],
"Enzyme" => ()->Enzyme.autodiff(Enzyme.set_runtime_activity(Enzyme.Reverse),Enzyme.Const(state_loss),Enzyme.Active,Enzyme.Active(1.0))[1][1],
"Mooncake" => ()->DifferentiationInterface.derivative(state_loss,AutoMooncake(),1.0),
)
try
g=run();@test g ≈ expected rtol=1e-9
println("AD ",name," PASS gradient=",g)
catch e
println("AD ",name," ERROR ",sprint(showerror,e))
end
end
println("REVIEW_ACTUAL_PATH_DONE")probes/perf-ad-focused.jlSHA256 println("STAGE loading focused packages");flush(stdout)
using SciMLBase, ModelingToolkit, OrdinaryDiffEq, SymbolicIndexingInterface, Test
using ModelingToolkit: t_nounits as t, D_nounits as D
using ForwardDiff, Zygote, Enzyme, Mooncake, DifferentiationInterface, ADTypes
@variables x(t) w(t)
@parameters a
@mtkcompile sys = System([D(x) ~ -a*x, w ~ a*x^2 + 2t], t)
prob=ODEProblem(sys,[x=>2.0,a=>0.7],(0.0,1.0))
const AD_SOL=solve(prob,Tsit5();saveat=0.001,abstol=1e-10,reltol=1e-10)
const GETW=getsym(sys,w)
@test AD_SOL.prob.p isa SciMLBase.DespecializedParameters
@test GETW(AD_SOL) ≈ [2.8 * exp(-1.4 * s) + 2 * s for s in AD_SOL.t] rtol=1e-8
# Empty selection has an exact cardinality oracle; record its public return type separately.
empty_result=GETW(AD_SOL,Int[])
@test isempty(empty_result)
println("EMPTY result_type=",typeof(empty_result));flush(stdout)
Base.@noinline function measure_getter(g,sol)
g(sol)
allocs=[@allocated(g(sol)) for _ in 1:5]
times=[@elapsed(g(sol)) for _ in 1:10]
return (;bytes=minimum(allocs),time_min_s=minimum(times),outputbytes=sizeof(g(sol)))
end
m=measure_getter(GETW,AD_SOL)
println("FOCUSED MEASURE points=",length(AD_SOL.t)," bytes=",m.bytes,
" time_min_s=",m.time_min_s," outputbytes=",m.outputbytes)
flush(stdout)
function state_loss(q)
us=[q .* u for u in AD_SOL.u]
s=SciMLBase.build_solution(AD_SOL.prob,AD_SOL.alg,AD_SOL.t,us)
return sum(GETW(s))
end
hook_body(p,c)=c*sum(abs2,p)
hook_loss(q)=with_concrete_parameters(hook_body,SciMLBase.DespecializedParameters([q,2q]),3.0)
function check_backends(f::F,expected,label) where {F}
@test ForwardDiff.derivative(f,1.0) ≈ expected rtol=1e-10
failed=String[]
for (name,run) in (
"Zygote" => ()->Zygote.gradient(f,1.0)[1],
"Enzyme" => ()->Enzyme.autodiff(Enzyme.set_runtime_activity(Enzyme.Reverse),
Enzyme.Const(f),Enzyme.Active,Enzyme.Active(1.0))[1][1],
"Mooncake" => ()->DifferentiationInterface.derivative(f,AutoMooncake(),1.0),
)
try
got=run();@test got ≈ expected rtol=1e-9
println("STRICT AD ",label," ",name," PASS gradient=",got," oracle=",expected)
catch e
push!(failed,label*"/"*name)
println("STRICT AD ",label," ",name," ERROR ",sprint(showerror,e))
end
flush(stdout)
end
return failed
end
# For fixed saved states, d/dq sum(a*(q*u)^2+2t)=2a*sum(u^2).
failed=check_backends(state_loss,1.4 * sum(u[1]^2 for u in AD_SOL.u),"prebuilt-getter")
# The hook's active parameter payload gives L(q)=3*(q²+(2q)²)=15q², L'(1)=30.
append!(failed,check_backends(hook_loss,30.0,"active-parameters-hook"))
println("STRICT backend_failures=",failed);flush(stdout)
@test isempty(failed)
println("REVIEW_FOCUSED_AD_STRICT_PASS");flush(stdout)probes/run-focused.shSHA256 #!/usr/bin/env bash
set -u
export TMPDIR="$PWD/scratch"
export JULIA_PKG_PRECOMPILE_AUTO=0
export JULIA_NUM_PRECOMPILE_TASKS=1
run_review() {
label="$1"
shift
printf '%s START %s\n' "$(date -u +%FT%TZ)" "$label"
"$@" > "$label.log" 2>&1
review_exit=$?
printf '%s\t%s\t%s\n' "$(date -u +%FT%TZ)" "$label" "$review_exit" >> runtime-exits.tsv
printf '%s END %s exit=%s\n' "$(date -u +%FT%TZ)" "$label" "$review_exit"
tail -8 "$label.log"
}
run_review focused-head julia --startup-file=no --compiled-modules=existing --pkgimages=existing --project=env/head probes/perf-ad-focused.jl
run_review focused-base julia --startup-file=no --compiled-modules=existing --pkgimages=existing --project=env/merge-base probes/perf-ad-focused.jlExecuted results and control interpretationHost: Julia 1.12.1, x86_64 Linux. Conditional packages include ModelingToolkit 11.45.5, ModelingToolkitBase 1.77.5, OrdinaryDiffEq 7.8.1, OrdinaryDiffEqBDF 2.4.13, OrdinaryDiffEqRosenbrock 2.7.5, Enzyme 0.13.216, Mooncake 0.5.65, Zygote 0.7.14, SciMLSensitivity 7.119.13 and SciMLTesting 2.13.3. These are actual local versions, not a claim about other CI lanes.
The original probe is retained unchanged. Its caught Zygote error makes its process exit insufficient to establish backend success. On the base, the empty-selection comparison is an oracle applicability failure, not proof of a wrong numerical result. The separate focused probe uses an exact empty-cardinality oracle, records the different return types, and fails its final assertion if any attempted backend fails. Existing Julia-version guards matter: the declared observable tests exclude Zygote on Julia 1.12+, the remake AD tests do not execute active assertions there, and ensemble adjoints explicitly skip there. Those guards were not changed. The independent focused probe separately attempts Zygote and Enzyme on this host; their outcome is reported per backend rather than being hidden by the declared group's success. No candidate/source/test assertion or tolerance was changed. No local test result establishes a successful registered-dependency environment, successful public integration job, or an unexecuted architecture/backend. Matched focused performance and AD resultsBoth executions use the identical
Independent derivative oracles: getter state scaling The timing samples describe these warmed sequential local runs; they are not a full statistical performance benchmark. The allocation sentinel separately supplies the faithful unchanged-source failing-before/passing-after result. These reconstructed AD probes exercise the changed path and active parameters, but both bases pass Enzyme here: the author's original Enzyme exception is not reproduced or established as fixed by this probe. The Zygote constructor failure is present on the unchanged common ancestor in this selected Julia 1.12.1 path; it is not introduced by the candidate. Its underlying cause was not fixed or fully localized. SII failure attribution and unreached-file controlsFull declared head group: exit 1, with Remake 4,605/4,605 followed by comprehensive indexing 3,747 pass / 2 errors. The group stops before its four subsequent files. The unchanged common-ancestor comprehensive file also exits 1 with exactly 3,747 pass / 2 errors. Both errors are BoundsErrors while constructing expected values at repository-relative The comprehensive file is byte-identical on head and common ancestor, SHA256 The remaining files execute unmodified, in their declared order and separate SafeTestsets modules within one head Julia process. An outer test set allows later files to run even if an earlier one fails. This is separately scoped coverage, not a claim that the original declared SII group passed. probes/prepare-sii-control.jlSHA256 using Pkg
Pkg.develop(path="merge-base";preserve=Pkg.PRESERVE_ALL)
Pkg.resolve()
Pkg.instantiate()probes/sii-base-comprehensive.jlSHA256 using Test, SafeTestsets
@safetestset "Base comprehensive indexing unchanged" begin
include(joinpath(@__DIR__,"..","merge-base","test","downstream","comprehensive_indexing.jl"))
endprobes/sii-remainder.jlSHA256 using Test, SafeTestsets
@testset "Previously unreached SII files unchanged" begin
for (label,file) in [
("Symbol and integer based indexing of integrators","integrator_indexing.jl"),
("Problem Indexing","problem_interface.jl"),
("Adjoints","adjoints.jl"),
("ModelingToolkit Remake","modelingtoolkit_remake.jl"),
]
println("STAGE ",label);flush(stdout)
@eval @safetestset $label begin
include($(joinpath(@__DIR__,"..","source","test","downstream",file)))
end
end
endprobes/run-sii-controls.shSHA256 #!/usr/bin/env bash
set -u
export TMPDIR="$PWD/scratch"
export JULIA_PKG_PRECOMPILE_AUTO=0
export JULIA_NUM_PRECOMPILE_TASKS=1
run_review() {
label="$1"
shift
printf '%s START %s\n' "$(date -u +%FT%TZ)" "$label"
"$@" > "$label.log" 2>&1
review_exit=$?
printf '%s\t%s\t%s\n' "$(date -u +%FT%TZ)" "$label" "$review_exit" >> runtime-exits.tsv
printf '%s END %s exit=%s\n' "$(date -u +%FT%TZ)" "$label" "$review_exit"
tail -8 "$label.log"
}
run_review prepare-sii-control julia --startup-file=no --compiled-modules=existing --pkgimages=existing --project=env/downstream-base probes/prepare-sii-control.jl
run_review sii-base-comprehensive julia --startup-file=no --compiled-modules=existing --pkgimages=existing --threads=11 --project=env/downstream-base probes/sii-base-comprehensive.jl
run_review sii-remainder-head julia --startup-file=no --compiled-modules=existing --pkgimages=existing --threads=11 --project=env/downstream probes/sii-remainder.jlFinal runtime ledger and target checkThe final separate SII remainder process exits 0 with 469 pass / 8 broken / 477 total. All eight broken assertions are already marked Final validation at 2026-10-23 17:55:08 UTC: PR open, nondraft; head and base unchanged; master ref equals admitted base. Public General still lists SII 0.3.55 as maximum, with the same version-file hash. CI remains 73 completed checks (65 failure, 8 success), no pending. All four detached source trees are clean at their recorded exact commits, and regenerated common-ancestor-to-head diff SHA256 remains Final public metadata commands (all exit 0): gh api repos/SciML/SciMLBase.jl/pulls/1652 --jq '{state,draft,head:.head.sha,base:.base.sha,updated_at}'
gh api repos/SciML/SciMLBase.jl/git/ref/heads/master --jq .object.sha
gh api repos/JuliaRegistries/General/contents/S/SymbolicIndexingInterface/Versions.toml --jq .content | base64 -d
gh api repos/SciML/SciMLBase.jl/commits/f0e907c5550f394db309e375bbd3a3934519095a/check-runs --paginate --jq '.check_runs[] | {name,status,conclusion,html_url,id}'
git -C source status --porcelain
git -C base status --porcelain
git -C merge-base status --porcelain
git -C sii-companion status --porcelainDependency-entry comparison (executed on both head/common-ancestor pairs, output import tomllib
from pathlib import Path
for first, second in [("head", "merge-base"), ("downstream", "downstream-base")]:
a = tomllib.loads(Path("env", first, "Manifest.toml").read_text())["deps"]
b = tomllib.loads(Path("env", second, "Manifest.toml").read_text())["deps"]
print([k for k in a.keys() | b.keys() if k != "SciMLBase" and a.get(k) != b.get(k)])The initial risk artifact is unchanged. Its SHA256 is recorded at the start of this evidence. The appended final risk assessment retains MH1; SHA256 Full exact-head CI inventory73 check runs and execution classificationExact-head CI evidenceAssociated PR head: The grouped workflow checks out the synthetic merge 47 integration jobs, 13 grouped runtime jobs, documentation, both benchmarks, Catalyst release test, and downgrade fail dependency resolution. The direct errors name unavailable SymbolicIndexingInterface compatibility. Benchmark cleanup additionally reports a missing cache handler after resolution failed. Those are not executed numerical failures. Four green grouped pre lanes explicitly say: Julia 1.14.0-alpha1 is not a release candidate; skipping build+test and reporting the pre lane as passing. Other greens: matrix detection, Runic format, Runic suggestions, spelling. The supplied head test_groups.toml declares QA lts and 1, while the emitted grouped matrix reports QA 1 only. QA lts is unreported in this run. Branch required-status configuration query returns HTTP 404, so branch-required names cannot be verified. No unreported check is counted as passing. Full logs were fetched for nine runs with gh run view --log and --log-failed. The integration aggregate command exceeded gh request limits; the public actions logs archive API succeeded, yielding all 47 aggregate job logs plus per-step files. Each of the 47 aggregate logs was read/parsed for failures. All run metadata report the supplied head SHA.
🤖 Posted by an AI agent · harness: Codex Desktop (CLI 0.159.2) · model: gpt-6-astra |
SymbolicIndexingInterface 0.3.56 adds `with_concrete_parameters(f, p, args...)` so whole-timeseries observed getters can cross a despecialization barrier once instead of per element. Forward it to the existing non-inlined barrier with the wrapped parameter object. Add a downstream sentinel test on a default (AutoDespecialize) MTK problem that checks the solution's parameters are wrapped, the whole-timeseries, index-vector, mask and scalar getter calls agree and return concretely typed vectors, and that a whole-timeseries call allocates on the order of its result rather than per saved point. Co-Authored-By: Claude Fable 5.1 <[email protected]>
0cc306a to
aaca45e
Compare
Companion to SciML/SymbolicIndexingInterface.jl#197, which adds
with_concrete_parameters(f, p, args...): a hook that lets whole-timeseries observed getters cross a despecialization barrier once instead of once per element.This PR overloads it for
DespecializedParameters, forwarding to the existing_invoke_with_despecialized_parametersbarrier with the wrapped object, and bumps the SII compat to 0.3.57 (master had already taken 0.3.56). Nothing above the barrier changes type, so compilation reuse across parameter-container layouts is preserved; the only code specialized on the concreteMTKParametersis the broadcast body, which was already specialized per element.Why
MTK builds problems with
AutoDespecialize, so the solution'spis aDespecializedParameters. The generated observed function crossed the barrier per element, so the broadcast in SII'sTimeDependentObservedFunctioninferredAnyand took Base's widening path. On a 10001-point solution a getter call cost ~60k allocations and 6 ms; with both PRs it is 9 allocations and 0.2 ms. The wideningsetindex!was also an illegal type for Enzyme, so reverse-mode gradients through a prebuilt observed getter on a default MTK problem failed withIllegalTypeAnalysisExceptionatstate_indexing.jl:91.Test
test/downstream/despecialized_observed.jlis a cheap sentinel that needs no AD: it solves a default MTK problem, checksparameter_values(sol) isa DespecializedParameters, checks the whole-timeseries, index-range, mask and scalar getter calls agree and areVector{Float64}, and bounds the allocation of a whole-timeseries call by a multiple of the result size. Unpatched, that call allocated once per saved point.Depends on an SII release with the hook; CI will fail on the compat bound until then.
🤖 Generated with Claude Code