Repository navigation
Choose the SCC block container from the specialization level, and precompile a multi-block SCC initialization - #5202
ChrisRackauckas wants to merge 5 commits into
Conversation
AutoDespecialize always stores the blocks of an SCCNonlinearProblem in a vector, FullSpecialize always in a tuple, and AutoSpecialize keeps the tuple-for-at-most-5-blocks heuristic. A tuple makes the problem type depend on the block count and on each block's kind, so initialization problems (AutoDespecialize by default) could not share compiled code across models. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Agent-Harness: Claude Code 2.1.280 Agent-Model: claude-opus-5-5[1m] Agent-Session: https://claude.ai/code/session_01Wt79fZeNaZxiwQ3LagMYXH Claude-Session: https://claude.ai/code/session_01Wt79fZeNaZxiwQ3LagMYXH
precompile_dae_problem has a single algebraic block, so its initialization is a plain NonlinearProblem and the SCC path was never precompiled (its docstring said SCC; fixed). precompile_scc_dae_problem builds a nonlinear block followed by a linear block and is solved in the FBDF, Rodas5P and default-algorithm workloads. Tests pin the container per specialization level and that initialization problems with 2, 3 and 7 blocks share the workload's type. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Agent-Harness: Claude Code 2.1.280 Agent-Model: claude-opus-5-5[1m] Agent-Session: https://claude.ai/code/session_01Wt79fZeNaZxiwQ3LagMYXH Claude-Session: https://claude.ai/code/session_01Wt79fZeNaZxiwQ3LagMYXH
Benchmark Results (Julia vlts)Time benchmarks
Memory benchmarks
|
Benchmark Results (Julia v1)Time benchmarks
Memory benchmarks
|
Address independent review of SciML#5221: leave the Homotopy SCC container policy to SciML#5202, return InitializeprobParameterMap only under AutoDespecialize, retarget type-equality to DAE sizes (6, 9), and cover non-tunable array-parameter indices in CopyParamsByTemplate. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/mtk-ttfx/jobs/initdata/log.txt on amdci2.julia.csail.mit.edu
…ecialization # Conflicts: # ext/MTKOrdinaryDiffEqBDFExt.jl
`SCCNonlinearSolve._scc_solve` only keeps its block aggregation inside
Enzyme's type-analysis limits when `sols` is a tuple: the AbstractVector
specialization of `iteratively_build_sols` splats a
`Vector{NonlinearSolution}` into `vcat`, which Enzyme cannot compile,
while the Tuple specialization unrolls instead. This regressed
SciMLSensitivity Core8 (`desauty_dae_mwe`: EnzymeInternalError inside
`map` over `Vector{NonlinearSolution}`) for the vector-stored problems
this branch introduces below `FullSpecialize`.
Vector-stored problems now wrap `explicitfuns!` in `SCCExplicitFuns`, a
local `AbstractVector` marker, and a dispatch on
`iteratively_build_sols(alg, probs::AbstractVector,
explicitfuns::SCCExplicitFuns)` converts both to tuples and delegates to
upstream's numerically identical tuple specialization. `prob.probs` and
the problem attached to the returned solution keep `Vector` storage, so
the container optimization is unchanged and no solver internals are
copied. The marker also keeps the method out of type piracy.
The container test now checks the solved nonlinear-chain residual and
that `sol.prob.probs` preserves the caller's container representation.
`iteratively_build_sols` has no public spelling, so it is added to the
curated ExplicitImports ignore list.
Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Devin <[email protected]>
Agent-Harness: Devin CLI 3000.11.92
Agent-Model: swe-2-max
Agent-Session: local Devin CLI session 9ad876fae94240bd
What was wrong
This PR makes What changed
Validation (all run on the post-merge tree at
|
Contractor review (ai-requests#58) of this PR, copied by the posting agent without change to its findings: reviewer Codex CLI 0.164.0 / gpt-6.1-sol, session 01a18da8-3a3a-7620-b234-342bf3d4309e, reviewed head e2cdc69, round 2, verdict CHANGES, risk medium-high. Risk assessment (independent review, Codex CLI 0.164.0 gpt-6.1-sol, slot 1, head e2cdc69)
Review round 2, written by the reviewer named above (Codex CLI 0.164.0 / gpt-6.1-sol) in a session other than the PR author's, and copied here by the posting agent without change to its findings. The posting agent did not re-run the reviewer's commands. Summary: Changes SCC block containers and routes despecialized solve aggregation through a tuple bridge. The changed tests pass locally, but direct base/head measurements confirm new-shape compilation regressions and the nonpublic upstream hook remains a blocker. Blast radius: SCCNonlinearProblem containers, initialization problem types, solve-time aggregation and OrdinaryDiffEq extension precompile workloads. Evidence: Julia 1.13.2: both added testsets pass on the head (30+9 assertions); the first reports 26 passes and 4 failures on origin/master. The real SCC solve probe passes six analytic residual/retcode assertions on each ref. After seven-block warmup, base 12/20-block solve compilation is 0/0 s, head is 0.257194/0.514061 s, confirming the tuple-bridge regression. G1 uses the explicit x^3+x-1 residual. G2 is exercised locally for ordinary solves and by the cited same-head passing Core8 Enzyme/Mooncake CI. G3 includes cross-model/type tests; their pass does not cover compile-latency regression or waive public-API standards. Blocking findings
Non-blocking findingsNone. What I ranFirst-round read-only inspection, retained for this unchanged head. Repository commands below ran in the isolated checkout and exited 0; rev-parse HEAD matched the live head metadata. Base is the fetched target-branch tip at review time, while the three-dot diff uses the merge base. Newest non-merge commit trailers, rather than body attribution, supply AUTHOR_GRADE provenance. git fetch origin +refs/pull/5202/head:refs/remotes/pr/5202 +refs/heads/master:refs/remotes/origin/master
git checkout --detach pr/5202
git rev-parse HEAD
git rev-parse origin/master
git diff --check origin/master...HEAD
git log -1 --no-merges --format=%B
git diff origin/master...HEADRead-only GitHub inspection (PR views exit 0; pr checks exits 1 because failures exist): gh pr view 5202 --repo SciML/ModelingToolkit.jl --json number,url,state,isDraft,headRefOid,baseRefName,baseRefOid,title,files,commits,statusCheckRollup
gh pr view 5202 --repo SciML/ModelingToolkit.jl --json body,closingIssuesReferences
gh pr checks 5202 --repo SciML/ModelingToolkit.jl
gh run view 39049155620 --repo SciML/ModelingToolkit.jl --log-failed
gh run view 39049155633 --repo SciML/ModelingToolkit.jl --log-failed
gh run list --repo SciML/ModelingToolkit.jl --branch master --event push --limit 5 --json databaseId,headSha,conclusion,url,name
gh run view 38950292025 --repo SciML/ModelingToolkit.jl --log-failed
gh run view --repo SciML/ModelingToolkit.jl --job 117444013781 --logCI check rollup at the captured head: {"FAILURE": 2, "SKIPPED": 4, "SUCCESS": 79}. Log-retrieval exit codes are retrieval status, not test exit codes: successful retrieved jobs report SciMLSensitivity Core8 CI log ends with tests passed, exercising Enzyme/Mooncake initialization integration; Downstream and InterfaceII checks also pass. SII failure matches historical master 38950292025. The body's older benchmark tables and Homotopy vector-path prerequisite predate this head's tuple bridge and were not revalidated locally. Inspected CI URLs: https://github.com/SciML/ModelingToolkit.jl/actions/runs/39049155620, https://github.com/SciML/ModelingToolkit.jl/actions/runs/39049155633, https://github.com/SciML/ModelingToolkit.jl/actions/runs/39049155620/job/117444013781, https://github.com/SciML/ModelingToolkit.jl/actions/runs/38950292025. After freezing the complete initial review, compared both same-head Codex reviews. The final review adds prior-reported latency evidence to the independently noted tuple-bridge concern; no local timing is claimed. Round 2 local execution: All 20 live PRs were checked OPEN with unchanged reviewed heads before Julia execution. Each run checked out the exact detached SHA shown below. Julia 1.13.2 ran directly inside the inherited resource scope, with one Julia invocation at a time, four Julia threads and one BLAS thread. The isolated environment was created with The driver activates that environment, resolves compatible registered dependencies without updating registries, and includes each selected script in a fresh module. It catches only at the test-file boundary to record every selected result, then exits nonzero if any selected case failed. Assertions and tolerances are unchanged.
git -C ModelingToolkit.jl checkout --detach origin/master
REVIEW_CASES='5182,5190,5190-bench,5202,5205-root,5205-contract,5205-ad,5213,5221,5202-bench,5221-bench' \
JULIA_DEPOT_PATH="$PWD/depot:" JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 \
TMPDIR="$PWD/tmp" JULIA_NUM_PRECOMPILE_TASKS=1 JULIA_PKG_PRECOMPILE_AUTO=0 \
timeout 3600 julia --startup-file=no --compiled-modules=existing --depwarn=yes tmp/rerun/driver.jlResolved versions: SymbolicUtils 4.54.0, Symbolics 7.47.0, SciMLBase 3.58.0, JumpProcesses 10.0.1, NonlinearSolve 4.32.0, ModelingToolkit 11.47.0, ModelingToolkitTearing 1.20.7, ModelingToolkitBase 1.79.0, OptimizationBase 5.10.0.
git -C ModelingToolkit.jl checkout --detach pr/5202
REVIEW_CASES='5202,5202-bench' \
JULIA_DEPOT_PATH="$PWD/depot:" JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 \
TMPDIR="$PWD/tmp" JULIA_NUM_PRECOMPILE_TASKS=1 JULIA_PKG_PRECOMPILE_AUTO=0 \
timeout 3600 julia --startup-file=no --compiled-modules=existing --depwarn=yes tmp/rerun/driver.jlResolved versions: SymbolicUtils 4.54.0, Symbolics 7.47.0, SciMLBase 3.58.0, JumpProcesses 9.33.1, NonlinearSolve 4.32.0, ModelingToolkit 11.45.4, ModelingToolkitTearing 1.20.7, ModelingToolkitBase 1.77.4, OptimizationBase 5.10.0. The two exact new testsets were extracted unchanged from These are reviewer measurements on the exact recorded refs, not the earlier review or author timings. The base batch exits 1 for its requested regressions; the head process exits 0. Exact reviewer script using ModelingToolkit, NonlinearSolve, SciMLBase, Test
function same_block_problem(n)
@variables x[1:n]
sys=mtkcompile(System([0 ~ x[i]^3+x[i]-1 for i in 1:n];name=:same_block))
return SCCNonlinearProblem{true,SciMLBase.AutoDespecialize}(sys,[x=>fill(.6,n)];combine_sccs=false)
end
@testset "New-shape SCC solve accuracy and compilation" begin
for n in [7,12,20]
prob=same_block_problem(n)
stat=@timed solve(prob,NewtonRaphson())
@test SciMLBase.successful_retcode(stat.value)
@test maximum(abs,stat.value.u.^3+stat.value.u.-1) < 1e-7
println("SCC_BENCH blocks=",n," seconds=",stat.time," compile=",stat.compile_time," recompile=",stat.recompile_time," bytes=",stat.bytes)
end
endWhat I did not verifyNo whole suite, HomotopyContinuation scenario, GPU, Reactant or MPI run was performed. Enzyme/Mooncake integration is supported by the cited passing same-head Core8 CI, not claimed as a local run. The measurements cover the new-shape real SCC path; they are not a comprehensive latency or solver-throughput benchmark. A clean native-precompile cycle was not verified: the initial batch dependency workload errored during NonlinearSolveFirstOrder AD-backend selection. The recorded test commands use existing caches and JIT-load uncached PR source; no assertion was disabled. 🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5 |
Keep CopyParamsByTemplate index containers as Vectors, erase ObservedWrapper to Any, and replace the split initprobpmap closure with a named callable so chain DAE OverrideInitData types match across model sizes. Also vectorize SCC blocks under AutoDespecialize (HomotopyProblem exception), overlapping SciML#5202. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/mtk-ttfx/jobs/initdata/log.txt on amdci2.julia.csail.mit.edu
Address independent review of SciML#5221: leave the Homotopy SCC container policy to SciML#5202, return InitializeprobParameterMap only under AutoDespecialize, retarget type-equality to DAE sizes (6, 9), and cover non-tunable array-parameter indices in CopyParamsByTemplate. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/mtk-ttfx/jobs/initdata/log.txt on amdci2.julia.csail.mit.edu
* Make AutoDespecialize initialization data model-independent Keep CopyParamsByTemplate index containers as Vectors, erase ObservedWrapper to Any, and replace the split initprobpmap closure with a named callable so chain DAE OverrideInitData types match across model sizes. Also vectorize SCC blocks under AutoDespecialize (HomotopyProblem exception), overlapping #5202. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/mtk-ttfx/jobs/initdata/log.txt on amdci2.julia.csail.mit.edu * Drop SCC hunk; keep AutoSpecialize initprobpmap closure Address independent review of #5221: leave the Homotopy SCC container policy to #5202, return InitializeprobParameterMap only under AutoDespecialize, retarget type-equality to DAE sizes (6, 9), and cover non-tunable array-parameter indices in CopyParamsByTemplate. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/mtk-ttfx/jobs/initdata/log.txt on amdci2.julia.csail.mit.edu --------- Co-authored-by: ChrisRackauckas-Claude <[email protected]> Co-authored-by: Cursor Agent <[email protected]>
Please ignore until reviewed by @ChrisRackauckas.
Depends on an SCCNonlinearSolve release. At
AutoDespecialize, small homotopy initialization problems now take SCCNonlinearSolve's vector path, which threwMethodError: no method matching probvec(::HomotopyProblem). Fixed in SciML/NonlinearSolve.jl#1321 and released by SciML/NonlinearSolve.jl#1323. Until 1.15.4 is registered,test/homotopy_initialization_scc.jlwill error on CI here. TheSCCNonlinearSolvefloor (currently"1.13") must be raised to"1.15.4"before merging. I left it unchanged so CI can resolve now.What changed and why
SCCNonlinearProblemnow picks its block container from the specialization level:AutoDespecializealways stores the blocks in a vector,FullSpecializealways in a tuple, andAutoSpecializekeeps the existing heuristic (tuple for ≤ 5 blocks). Previously every level used the heuristic, so an initialization problem with 2–5 blocks had a type specific to its block count and the kind of each block, and no precompile workload could cover a user's model. Initialization problems built byODEProblemareAutoDespecializeby default, so they now share one type across models.The DAE precompile workload also never reached this path:
precompile_dae_problemhas a single algebraic block, which builds a plainNonlinearProbleminitialization (its docstring said SCC; corrected). This addsprecompile_scc_dae_problem— a nonlinear block followed by a linear block — built in the package workload and solved in the FBDF, Rodas5P and default-algorithm extension workloads.Verification
Julia 1.12.6, aarch64-linux (Jetson AGX Orin),
--startup-file=no.New tests fail without the container change and pass with it.
test/scc_nonlinear_problem.jl, the two added testsets, run withsrc/problems/sccnonlinearproblem.jlreverted to master:With the change:
18/18and9/9pass.First
solveof a user model in a fresh session, this checkout at master versus master + this PR, everything else identical, pkgimages built before each timed run. Chain DAE with array parameters, FBDF:abstol/reltolThe 6-block case improves too although it was already a vector on master, because nothing precompiled the SCC path before. The row with tolerances barely moves: the workloads solve without keyword arguments, and passing
abstol/reltolre-specializes__init's keyword body — a separate, finite axis for a follow-up.Runtime cost of the vector container, the same blocks stored as a tuple versus a vector, warm
solve(prob, NewtonRaphson()), 10th percentile of 2000 (medians were noisier; a test suite was running alongside):About 10–20 µs per initialization solve, once per
solve.FullSpecializekeeps the tuple for anyone for whom that matters.Suite (this branch, with SCCNonlinearSolve from SciML/NonlinearSolve.jl#1321 dev'd):
GROUP=InterfaceII:Pass 1367, Broken 7—Testing ModelingToolkit tests passed.GROUP=Initialization:Pass 922, Broken 12—Testing ModelingToolkit tests passed. Against registered SCCNonlinearSolve 1.15.3 the same group has one error, theprobvec(::HomotopyProblem)above.GROUP=QA:Pass 39, Fail 1. The failure isNo unapproved public reexportsfor[:ap_var, :canonical_constraints, :constraint_residual], none of which this PR touches. Master's own CI fails identically at e167d97: https://github.com/SciML/ModelingToolkit.jl/actions/runs/35838708180/job/107109419276docs/make.jl): builds through doctests,@docsexpansion and cross-references. The only error islinkcheckonhttps://docs.sciml.ai/PDEBase/stable/interface/indocs/src/API/PDESystem.md(not touched here), which returns HTTP 403 from this machine withcurltoo.Runic: no changes on the touched files.
typos: clean on added lines.Not verified
InterfaceIIandInitialization; no downstream packages.NoSpecializeandFunctionWrapperSpecializetake the vector path here (anything that is notFullSpecializeor theAutoSpecializeheuristic). That was not specified; push back if either should keep the heuristic.🤖 Posted by an AI agent — harness: Claude Code 2.1.280 · model: claude-opus-5-5[1m]
Conversation: https://claude.ai/code/session_01Wt79fZeNaZxiwQ3LagMYXH
🤖 Generated with Claude Code
https://claude.ai/code/session_01Wt79fZeNaZxiwQ3LagMYXH
Independent review (Codex CLI 0.162.1 gpt-6.1-sol, head e2cdc69)
VERDICT: CHANGES
The container tests detect the intended change, and the targeted solves pass, but the new dispatch hook depends on a private upstream function. The failed CI checks also lack an independently verified comparison against master.
Base.ispublic(ModelingToolkit.SCCNonlinearSolve, :iteratively_build_sols)returnsfalse. This method both extends that private function and calls its private four-argument specialization. test/qa/qa.jl:344 explicitly exempts the access from verification. This violates the required public-API boundary and couples default initialization solves to an implementation detail that upstream can change without an API break. Put the Enzyme-safe aggregation in SCCNonlinearSolve, or establish a documented public extension point there and require the release providing it; remove the new private-access exemption.Verification: Julia 1.12.7, four threads and four precompile tasks, startup files disabled, 3600-second shell timeouts. Ran the two added testsets extracted unchanged from test/scc_nonlinear_problem.jl in an isolated environment using the head checkout: specialization/container checks 30/30 passed; initialization-type checks 9/9 passed. Ran the same script against a scratch copy of merge-base 9082f85 with the same resolved dependency versions: the first testset reported 26 passed, 4 failed, 0 errored. Failures were the problem and solution container assertions for two-block AutoDespecialize and seven-block FullSpecialize. Execution stopped at that failed testset, so the second testset was not run on the base. The original checkout's tracked files were not modified. No linked issues were supplied or listed in the PR metadata.
Gates: G1 has independent equation-residual assertions for the nonlinear chains; no numerical formula or tolerance changes appear in the diff. G2 has a passing SciMLSensitivity/Core8 entry in the supplied CI snapshot, which the supplied thread identifies as exercising Enzyme initialization; I did not independently rerun AD. G3 is not applicable: this changes container representation and precompile workloads, without adding shared mutable cache state.
CI comparison: the snapshot reports failures for SciMLBase.jl/SymbolicIndexingInterface and documentation build. The thread attributes these to a pre-existing bounds error and an external-link timeout, respectively, but supplies no independently inspected matching master logs here. GitHub log retrieval failed in this environment. Neither failure is established as a regression or cleared as pre-existing by this review. Two optimization checks were also pending in the snapshot.
Risk criteria matched: L1 documentation, L2 added assertions, ML7 new documented public workload helper, M1 a new method on another package's function, and MH1 changed initialization solve dispatch on a widely used problem-construction path. The change reaches default multi-block DAE initialization, including differentiation through initialization. The performance-only ML11 exception is not established while the downstream failure comparison remains unverified; MH1 sets the rating.
Not verified: full InterfaceII/Initialization/QA groups, local Enzyme or other AD execution, FBDF/default-solver precompile workloads, documentation build, independent performance measurements, complete supported dependency/version matrix, and failed/pending CI jobs against master. The second new testset was not reached on the base.
🤖 Posted by an AI agent — harness: Codex CLI 0.162.1 · model: gpt-6.1-sol
Conversation: Codex exec session 01a14b58-ce17-79e3-b048-d42084bc9366 (no public URL)
Codex CLI gpt-6.1-sol rated it medium-high (MH1) at head e2cdc69
Risk assessment (independent review, Codex gpt-6.1-sol, head e2cdc69)
@docsentry. Container fields remain documented as collections, so I found no established public storage guarantee requiring a major release; the additive public name needs minor-release handling under repository policy.pr.txt, the completegit diff origin/HEAD...HEAD, repository instructions, and the entire risk rubric. Read the linked prerequisite PRs and the current author follow-up; the PR has no closing issue reference. Used scratch archives of head e2cdc69 and default 808a4f1 with identical resolved dependencies (Julia 1.12.4, SCCNonlinearSolve 1.16.0, four threads).python3 RUN/scratch/validate.pyran the extracted added testsets withtimeout 3600 julia --startup-file=no --project=RUN/scratch/{head,base}-env RUN/scratch/added-tests.jl, serialized, with the requested depot. Head: 39/39 pass. Base: container test 26 pass / 4 fail; initialization test 5 pass / 1 fail / 1 error, the error being the absent new workload helper. The container assertions and block-count type-equality assertion genuinely fail before the change. An initial reduced-environment run omitted OrdinaryDiffEqNonlinearSolve; loading that extension, supplied by the original test's OrdinaryDiffEq import, resolved those harness errors without changing assertions.timeout 3600 julia --startup-file=no --project=RUN/scratch/{head,base}-env RUN/scratch/probe.jldemonstrated equal outer problem types across head block counts but compiled tuple specializations for 2, 7 and 12 blocks; base retained vector solving above five blocks. It also printedBase.ispublic(SCCNonlinearSolve, :iteratively_build_sols) == false.python3 RUN/scratch/probe-serial.pyransame-block-probe.jlin separate head/base processes, using identical repeated nonlinear blocks and checking the independent polynomial residual. After warming seven blocks, head compilation was 0.165786 s (12 blocks), 0.359705 s (20 blocks); base compilation was 0.0 s for both. First-solve wall times were 0.166685/0.360444 s on head versus 0.000480/0.000542 s on base. All accuracy checks passed. These are single-run latency measurements, supported by the observed generated specializations.desauty_dae_mwe.jl/ “Enzyme through init.” No GPU, Reactant, or MPI path is changed. G3 not applicable: no shared mutable cache, threading implementation, or global-default mutation is introduced; this changes storage, dispatch and static precompile workloads.comprehensive_indexing.jl:127,164), and the head docs job'sopenmodelica.orgcurl timeout also occurs on default commit 9082f85. The later default docs run succeeded, consistent with an intermittent external-link failure. The requested separate read-only investigation could not establish a trustworthy introducing commit because older indexing runs abort earlier.git diff --check origin/HEAD...HEADpassed and the reviewed checkout remained clean.Findings
src/problems/sccnonlinearproblem.jl:834-835— confirmed by running.Tuple(probs)andVal(length(probs))dispatch every vector-backed SCC into SCCNonlinearSolve's generated tuple implementation. Equaltypeof(initializeprob)therefore does not make the solve independent of block count or block kinds. This also affectsAutoSpecializeabove five blocks, which already used a vector solver on the base. The identical-block probe isolates the resulting regression: after warming seven blocks, moving to twelve/twenty compiles nothing on base but adds 0.166/0.360 seconds on head, while numerical results agree. The two-block workload cannot cover these generated specializations, and the added outer-type assertions cannot detect this failure. Fix the Enzyme-unsafe vector aggregation upstream while preserving vector iteration, then repeat fresh-shape latency validation on the final implementation.src/problems/sccnonlinearproblem.jl:831-835;test/qa/qa.jl:344— confirmed by running and source inspection.iteratively_build_solsis not public (Base.ispublicreturned false), yet ModelingToolkit extends it and calls its private four-argument tuple overload. The QA change exempts this access rather than providing a public contract. An upstream patch can change either signature without a public API break, affecting ordinary SCC initialization downstream. This contradicts the explicit public-API-only instruction; “has no public spelling” does not establish an irreducible exception. Put the aggregation fix in SCCNonlinearSolve, or first publish and document an appropriate extension hook there, then depend on that release and remove this exemption.What I did not verify
I did not rerun complete test groups, the complete docs build, broad downstream suites, package-image startup benchmarks, or local AD/GPU/Reactant/MPI tests. Relevant head CI and the failing default-branch logs were inspected directly; the two isolated probe sessions do not establish performance across platforms or all models. I did not verify the eventual release version or claim an exact bisected cause for the pre-existing CI failures. No GitHub writes, pushes, commits, or edits to the reviewed checkout were made; all started commands completed.
RUNabove denotes <review directory, kept by the fleet master> scripts, full outputs and the base-failure investigation are under itsscratch/directory.Links:
🤖 Posted by an AI agent — harness: Codex CLI 0.162.1 · model: gpt-6.1-sol (independent reviewer; appended by Claude Code 2.1.302 · claude-opus-5-5)
Conversation: https://claude.ai/code/session_0133iSjsLBByPU93BDEQkNDF (fleet master); the review ran as a local headless Codex session with no public URL.