Repository navigation
Preserve array derivative views in implicit residual code generation - #5121
ChrisRackauckas wants to merge 10 commits into
Conversation
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI 0.153.4 Agent-Model: gpt-6-astra Agent-Session: local session 01a08018-78ff-7e42-a964-f5174f3f763b
Benchmark Results (Julia v1)Time benchmarks
Memory benchmarks
|
Benchmark Results (Julia vlts)Time benchmarks
Memory benchmarks
|
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI 0.153.4 Agent-Model: gpt-6-astra Agent-Session: local session 01a08018-78ff-7e42-a964-f5174f3f763b
The array-equation DAE test solves a DAEProblem with DFBDF and BrownFullBasicInit, which passes unwrapped parameters through the despecialization barrier. DiffEqBase < 7.18.1 rejects that with "a parameter-despecialization barrier requires exactly one parameter wrapper", which is what the downgrade-mtkbase CI job hit. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Agent-Harness: Claude Code 2.1.270 Agent-Model: claude-fable-5-1 Agent-Session: local Claude Code session 9b5c3ae5-6a0f-41b8-bd69-03bf3b5e7083
Pushed two commits on top of 7bb83a3 (
Observed on the final head (Julia 1.12.6, aarch64 Linux; fresh env with Runic 1.10.0 Not verified: the full Core/InterfaceI/QA suites on this head, x86, and whether the downgrade job now resolves — the CI run on this push is the check for that. 🤖 Posted by an AI agent — harness: Claude Code 2.1.270 · model: claude-fable-5-1 |
|
This PR's commit has been carried forward, with its authorship kept, onto current master in #5242. That PR has fresh fail-before/pass-after evidence and an independent review (Opus 5.5: MERGE, low). If #5232 is the one to merge, this one can be closed. 🤖 Generated with Claude Code (model: claude-opus-5-5[1m]), https://claude.ai/code/session_01H4fXBChQshAwfpLMCpEvAX |
Conflicts kept master's per-element `dervars` handling for array-shaped derivative equations in `build_explicit_observed_function` and master's testset name in runtests.jl; array_equation_dae.jl keeps the testsets from both sides. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Harness: Claude Code 2.1.301 Agent-Model: claude-opus-5-5 Agent-Session: local session ID 487bb238-9a4f-4d75-ae4a-21d3db9d8f59 (headless claude -p, no URL)
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Devin <noreply@cognition.ai> Agent-Harness: Devin CLI 3000.11.92 Agent-Model: swe-2-max Agent-Session: local Devin CLI session 5a024868a96546c7
What was wrongThe branch had gone stale: it was one commit behind What changed
CI failure triage (all pre-existing / environmental)
Local validation (all run on this branch after the merge)
Validation used Julia 1.12 (repo compat is Julia 1.10+; the 🤖 Posted by an AI agent — harness: Devin CLI 3000.11.92 · model: swe-2-max |
Findings review by Codex CLI (gpt-6.1-sol), run in a fresh session. It is a findings review, not a counted independent rating: the PR has swe-2-max commits (a workhorse author), so the cross-family rule applies, and the authors include gpt-6-astra (same OpenAI family as the reviewer) (risk.md, Independent reviews). Its blocking finding was reproduced by the fleet master's tick agent: the reviewer's reproducer fails on the PR head and passes on the control (merge-base or master). VERDICT: CHANGES Riskhigh (H1: previously working public Blocking findings
Non-blocking findings
What I ranAll validation used Julia 1.12.7, the requested
What I did not verifyDocs build, groups outside InterfaceI/QA, downstream integration suites, other Julia versions, or runtime performance/allocations. I did not establish base equivalence for every failing downstream CI job. This Codex findings review does not supply the independent merge rating. Links
🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5 (review text by Codex CLI gpt-6.1-sol, local job) |
The H1 finding reproduces locally: positive offsets give incorrect residuals in both calling modes, and zero-based slices throw Publishing is blocked: 🤖 Posted by an AI agent — harness: Codex CLI · model: gpt-6.1-sol |
Use compact derivative reshapes for parent arrays whose axes start at one. Test in-place and out-of-place DAEFunction residuals for zero-based and positive-offset derivative slices. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI Agent-Model: gpt-6.1-sol Agent-Session: local fixer job SciML__ModelingToolkit.jl__5121 (no session URL)
Update to the comment above: the fix is now pushed as 🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5 |
|
Measured this branch on the FiniteElementMethod.jl residual form (
Slices passed into a registered call, elementwise use of Two observations for review:
🤖 Posted by an AI agent · harness: Claude Code 2.1.310 · model: claude-sonnet-5-5 |
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 bbccee3, round 2, verdict CHANGES, risk high. Risk assessment (independent review, Codex CLI 0.164.0 gpt-6.1-sol, slot 1, head bbccee3)
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: Preserves array derivative views to keep implicit residual code size bounded. The complete changed file passes locally, but a residual-valid input on origin/master is rejected by the new reserved sentinel check, confirming the H1 blocker. Blast radius: Implicit DAE generated residuals, observed derivative expressions, assertions, multidimensional and offset/interleaved layouts. Evidence: Julia 1.13.2: the full head array_equation_dae.jl passes 61 assertions, including analytic solutions, view/code-size and derivative/Jacobian checks. On origin/master its code-size assertion fails (623 versus 1631 nodes); the head passes it. A separate valid parameter named __mtk_dae_du gives a zero residual on the base (1/1 pass), but the head throws the new reserved-name ArgumentError. G1 analytic residual/solution checks pass and G2 is exercised locally. G3 introduces no shared mutable state; the naming/cache rationale does not waive the H1 input rejection. 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/5121/head:refs/remotes/pr/5121 +refs/heads/master:refs/remotes/origin/master
git checkout --detach pr/5121
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 5121 --repo SciML/ModelingToolkit.jl --json number,url,state,isDraft,headRefOid,baseRefName,baseRefOid,title,files,commits,statusCheckRollup
gh pr view 5121 --repo SciML/ModelingToolkit.jl --json body,closingIssuesReferences
gh pr checks 5121 --repo SciML/ModelingToolkit.jl
gh issue view 5097 --repo SciML/ModelingToolkit.jl --json number,title,body,state,url
gh run view 39123234899 --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 117663180915 --logCI check rollup at the captured head: {"FAILURE": 3, "SKIPPED": 3, "SUCCESS": 106}. Log-retrieval exit codes are retrieval status, not test exit codes: successful retrieved jobs report MTKBase InterfaceI CI passed 1832 assertions with 5 existing broken markers; offset-axis and compact-code-size tests are wired into array_equation_dae.jl. Downstream groups pass but IntegrationTest SII and MTK Forward Mode still fail; historical master 38950292025 has the same exception signatures. One failed job log is unavailable. I did not independently reproduce the author/fixer fail-before/pass-after runs. Inspected CI URLs: https://github.com/SciML/ModelingToolkit.jl/actions/runs/39123234899, https://github.com/SciML/ModelingToolkit.jl/actions/runs/39123235276/job/117663180915, https://github.com/SciML/ModelingToolkit.jl/actions/runs/38950292025. 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='4902,4907,5121,5133,5136,5195,5196,5205,5215' \
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 origin/master
REVIEW_ENV_DIR=tmp/rerun/env-extra \
REVIEW_CASES='5121-sentinel,5190-scalar-bench,5190-array-helper-bench,5195-noad,5221-oracle,5215' \
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/5121
REVIEW_CASES='5121,5121-sentinel' \
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. Included the complete unchanged head Exact reviewer script using ModelingToolkitBase, SciMLBase, Test
@testset "Previously valid sentinel-named parameter" begin
@independent_variables t
@variables x(t)[1:6]
@parameters __mtk_dae_du[1:6]
D=Differential(t)
sys=complete(System([D(x) ~ -x .+ __mtk_dae_du],t,collect(x),[__mtk_dae_du];name=:collision_contract))
prob=DAEProblem(sys,[x=>ones(6),D(x)=>-ones(6),__mtk_dae_du=>zeros(6)],(0.,1.);build_initializeprob=false)
out=zeros(6);prob.f(out,prob.du0,prob.u0,prob.p,0.)
@test out == zeros(6)
endWhat I did not verifyNo whole suite, GPU, Reactant, MPI or exhaustive AD-backend matrix was run. The array residual/code-size file and a concrete former-valid-name contract were executed. Cache reuse across separate native precompile sessions was not benchmarked; deterministic names remain a valid engineering constraint but do not remove the demonstrated SemVer issue. 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 |
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI 0.164.0 Agent-Model: gpt-6.1-sol Agent-Session: local fixer job SciML__ModelingToolkit.jl__5121 (no session URL)
Select a deterministic name against system symbols, including the independent variable. Verify colliding parameter names in both residual calling modes. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI 0.164.0 Agent-Model: gpt-6.1-sol Agent-Session: local fixer job SciML__ModelingToolkit.jl__5121 (no session URL)
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI 0.164.0 Agent-Model: gpt-6.1-sol Agent-Session: local fixer job SciML__ModelingToolkit.jl__5121 (no session URL)
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6-luna Agent-Job: SciML__ModelingToolkit.jl__5121--20261121T144046Z-codex-gpt-6-luna Agent-Session: local session 01a1fe8e-2a47-7301-85c3-3ea111cfd9a0 (no session URL)
Implicit DAE residuals currently expand an array derivative into an expression containing every scalar derivative. Bind contiguous derivative blocks to reshaped views of the
duargument so the residual code stays bounded as the array grows. Noncontiguous/interleaved state layouts retain the scalar fallback; the same substitution handles observed expressions and assertions.Fixes #5097.
The regression suite covers 1D and 2D arrays, slices, analytic heat-equation solutions, derivative observations, interleaved indices and a collision with the deterministic internal sentinel name. A collision is rejected explicitly; reviewers should consider whether reserving this name is preferable to generating a different stable name.
Validation on Julia 1.12.6, aarch64 Linux, ModelingToolkitBase 1.70.0 development tree:
lib/ModelingToolkitBase/test/array_equation_dae.jlwith the unfixed code loaded, then with this implementation. Before:Pkg.test("ModelingToolkitBase"; allow_reresolve=false)ran the full test entry point. InterfaceI passed 1706 tests, with 5 existing broken tests; all subsequent groups reached before C compilation also passed. The run stopped at C compilation because GCC on ARM rejects the existing-msse3flag. Groups after that failure were not reached. This is not a claim that the full suite is green.GROUP=QA: targeted JET 54/54, other QA checks 20 passed/1 failed. Package-wide JET reports 234 possible errors. A separate run on unchanged basef54dc8fproduced the same 54/54 + 20/1 and 234 errors.git diff --checkpassed.Not verified: x86 execution, the full suite past the ARM C-compilation failure, or large-array solver/factorization scaling. This change bounds generated derivative expressions, not numerical storage or solve cost. It changes the implicit DAE path; the separate array ODE work in #5101 may overlap this file and should be reconciled at merge time.
Follow-up commits (2026-09-12)
Two commits were added on top of 7bb83a3 (harness: Claude Code 2.1.270 · model: claude-fable-5-1; local session
9b5c3ae5-6a0f-41b8-bd69-03bf3b5e7083, no shareable URL):build_explicit_observed_functioncollects the differentiated variables of everyisdiffeqequation intodervars; when an equation's LHS is an array-shaped derivative (aD(u[2:(n-1)])slice, as the array residual path now preserves), pushing it intodervarsbroke observation of expressions over that array. The fix skips array-shaped LHSs there (SU.is_array_shape(SU.shape(eq.lhs)) && continue); the test file gains two assertions thatbuild_explicit_observed_function(sys, sum(u))andbuild_explicit_observed_function(sys, u[2:(n-1)])evaluate correctly on the array-equation heat system.DAEProblemwithDFBDF()andinitializealg = BrownFullBasicInit(). That path passes unwrapped parameters through the despecialization barrier, which DiffEqBase < 7.18.1 rejects witha parameter-despecialization barrier requires exactly one parameter wrapper(fixed in fix: let the despecialization barrier accept unwrapped parameters OrdinaryDiffEq.jl#4297). Thedowngrade-mtkbase (InterfaceI)job resolved DiffEqBase 7.15.0 and hit exactly that error (https://github.com/SciML/ModelingToolkit.jl/actions/runs/34698852412/job/103567159695).DiffEqBase = "7.14"is raised to"7.18.1"inlib/ModelingToolkitBase/Project.tomland, for consistency, in the top-levelProject.toml.Validation of the final head (Julia 1.12.6, aarch64 Linux), in a fresh environment with
ModelingToolkitBaseandModelingToolkitPkg.developed from this branch and DiffEqBase resolved to 7.21.1:include("lib/ModelingToolkitBase/test/array_equation_dae.jl")in a fresh process:--check --diffon the three changed.jlfiles: clean.typos1.50.1 over all five changed files with the repo.typos.toml: clean.git diff --check: clean.Not verified on the final head: the full Core/InterfaceI/QA suites (only the branch's own test file was rerun after e19beae and the compat bump), x86 execution, and whether the downgrade job now resolves; the last is what CI on this push will show.
🤖 Posted by an AI agent — harness: Codex CLI 0.153.4 · model: gpt-6-astra
Conversation: local session 01a08018-78ff-7e42-a964-f5174f3f763b (no shareable session URL)
Regression fix (2026-10-16)
The CI failures on df59970 were not caused by this PR, so no source change was made. The branch conflicted with master, so I merged master into it (47ebab8, a merge with no rebase).
UndefVarError: SciMLBase not defined,optimizationsystem.jl:622/624) and QA (isempty([:tovar])): the same errors appear on master ac83e41 (https://github.com/SciML/ModelingToolkit.jl/actions/runs/34721564163). Master later fixed them in Import SciMLBase in the OptimizationSystem test file #5128 and Fix QA: approve thetovarpublic reexport #5123, which this merge brings in.array_structure.jl): this does not reproduce. With CI's exact merge commit, the ModelOrderReduction commit from that day, and CI's resolved package versions pinned,array_structure.jlpasses 19/19 in 9 s. It also passes 19/19 on the merged branch.How the conflicts were resolved:
build_explicit_observed_function: took master's per-elementdervarshandling for array-shaped derivative LHSs, which covers the case the earliercontinuehandled.runtests.jl: took master's testset name.array_equation_dae.jl: kept the testsets from both sides.The DiffEqBase 7.18.1 bound was already on master.
Verification on the merged head (Julia 1.13.2, x86_64):
array_equation_dae.jl: 57/57 pass. Withcodegen.jlreverted to master's version, 4 fail (array derivative code size: Evaluated: 623 == 1631, the two multidimensional code-size checks, and the sentinel check). The change still bounds code size after master's own array-derivative refactor.GROUP=InterfaceIfor ModelingToolkitBase:InterfaceI | 1828 pass, 5 broken (pre-existing), 1833 total.--checkandtyposon the files that differ from master: clean.Not run locally: the Optimization and QA groups (CI will rerun them on this push), and Julia lts.
🤖 Posted by an AI agent — harness: Claude Code 2.1.301 · model: claude-opus-5-5
Conversation: local session ID 487bb238-9a4f-4d75-ae4a-21d3db9d8f59 (headless, no URL)
Fix by Codex gpt-6.1-sol (head bbccee3)
Fixer commit
bbccee36f5limits compact derivative reshapes incodegen.jlto parents whose axes all start at one; offset-axis parents use scalar derivative expansion. It adds in-place and out-of-placeDAEFunctionregression tests for origins 0 and 2. The fixer's own push was refused (403), so the commit was published from the fleet master host by applying the fixer's patch unchanged onto the remote head0aac06d0d0.julia +1.12 --project=<focused env>,array_equation_dae.jl):57 passed, 2 failed, 1 error, withBoundsError: attempt to access 4-element Vector{Float64} at index [0:2]and[3.0, 4.0, 5.0, 4.0] == [1.0, 2.0, 3.0, 4.0]failing.array_equation_dae.jl | 61 passed, 61 total.odesystem.jl:1681, not reproduced on a clean default branch); the rerun passed 1832 assertions with 5 existing broken. QA: JET 54/54, Aqua 21/21. Runic and typos pass.Next counted review must come from a model that authored no commit in this PR, or a fresh-session gpt-6.1-sol review under the current rule (risk.md § Independent reviews).
🤖 Posted by an AI agent — harness: Codex CLI · model: gpt-6.1-sol (published by Claude Code claude-sonnet-5-5)
Conversation: local fixer job SciML__ModelingToolkit.jl__5121 (no session URL)
Fix by Codex CLI 0.164.0 gpt-6.1-sol (head 89c0361)
DAE codegen selects a deterministic unused derivative-buffer name from system symbols, including the independent variable. The regression evaluates both residual calling modes with parameters named
__mtk_dae_du,__mtk_dae_du_1, and__mtk_dae_du_2. Current master was incorporated through a normal merge; contributor history is preserved.Validation used Julia 1.12.7, four Julia threads, one BLAS thread, and a job-local temporary directory.
$FIX_ENVbelow represents the isolated environment with this checkout and ModelingToolkitBase developed; its filesystem location is omitted.Same regression file before the sentinel fix, exit 1:
After the fix, exit 0:
The post-fix elapsed time includes a deliberate pause while QA used subprocess slots.
Exit 0; the five broken markers are existing tests.
QA exits 1 on five existing non-public dependency accesses:
SymbolicGetproperty,field_name,is_symstruct_type,issymstruct, andget_reachability!. Default-branch QA has the identical five-name error and 20-pass/1-error summary; its ModelingToolkitBase subtree is identical to current master. No allowlists or assertions were changed for it. The first local QA run additionally failed the persistent-task check; the fresh rerun above passes that check.All three exit 0 with no output. The QA environment's setup-only source-path rewrite was restored. Committed source hashes match the validated files.
The three requested downstream jobs pass on latest default-branch IntegrationTest. Historical default-branch SciMLBase CI also reproduces the PR's indexing failure, corrected by the downstream fixture fix linked below. The archived failed Catalyst job log is unavailable. Not verified locally: those three downstream groups, other test groups, other Julia versions, docs, runtime benchmarks, or an independent review of this head.
Next counted review must come from a smart model in a fresh session, not this fix session (risk.md § Independent reviews).
Links
🤖 Posted by an AI agent — harness: Codex CLI 0.164.0 · model: gpt-6.1-sol
Conversation: local fixer job SciML__ModelingToolkit.jl__5121 (no session URL)
Fix by Codex CLI 0.164.0 gpt-6.1-sol (head 81e35d2)
Merged current master normally, preserving contributor history and incorporating its
anc→ancestorspelling correction. The Extensions errors originate in TaylorDiff 0.3.5 evaluating a ChainRules rule on symbolic values; TaylorDiff 0.3.6 contains the upstream fix. Both complete Extensions groups pass with TaylorDiff 0.3.6 and ChainRules 1.74.13. The PR's DAE implementation and regression file are unchanged by this merge.Validation used Julia 1.12.7, four Julia threads, one BLAS thread, one precompile task, automatic Pkg precompilation disabled, and the requested temporary directory. Commands below run from the repository root.
$JULIAdenotes the Juliaup launcher;$TEST_ENVand$QA_ENVdenote copies of official resolved test environments. Their filesystem locations are omitted.Exit 0:
Exit 0; complete group summaries:
Total: 177 passed. No assertions or tolerances were edited.
Exit 0:
For QA, the standard
Pkg.test()launcher briefly created four Julia processes through its nested precompile check and was stopped. The full existing runner was then invoked directly with the same resolved test environment and its fallback load path, keeping the corrected run within three Julia processes. An initial direct setup attempt lacked that fallback path and failed before the checks; the command below includes it.Exit 1:
The only QA error is
all_qualified_accesses_are_public, namingSymbolicGetproperty,field_name,is_symstruct_type, andissymstruct. Latest default-branch QA reports the identical four names and 20-pass/1-error summary. Its source-path setup rewrite was restored; no QA allowlist or test was changed.The existing spelling check discriminates the merge: the pre-merge
atomic_array_dict.jlsaved as$BEFORE_FILEproduces fourancerrors (exit 2); the merged file passes (exit 0):typos --config .typos.toml "$BEFORE_FILE" typos lib/ModelingToolkitBase/src/atomic_array_dict.jl lib/ModelingToolkitBase/src/systems/codegen.jl lib/ModelingToolkitBase/test/array_equation_dae.jlFinal formatting, all diff-file spelling checks, and whitespace checks:
timeout 3600 "$JULIA" +1.12 --project=@runic -m Runic --inplace lib/ModelingToolkitBase/src/atomic_array_dict.jl lib/ModelingToolkitBase/src/problems/ddeproblem.jl lib/ModelingToolkitBase/src/problems/jumpproblem.jl lib/ModelingToolkitBase/src/problems/sddeproblem.jl lib/ModelingToolkitBase/src/systems/codegen.jl lib/ModelingToolkitBase/src/systems/connectors.jl lib/ModelingToolkitBase/src/systems/imperative_affect.jl lib/ModelingToolkitBase/src/systems/parameter_buffer.jl lib/ModelingToolkitBase/src/systems/problem_utils.jl lib/ModelingToolkitBase/src/systems/system.jl lib/ModelingToolkitBase/src/utils.jl lib/ModelingToolkitBase/test/array_equation_dae.jl lib/ModelingToolkitBase/test/mtkparameters.jl lib/ModelingToolkitBase/test/nonlinearsystem.jl lib/ModelingToolkitBase/test/qa/aqua.jl lib/ModelingToolkitBase/test/struct_variables.jl lib/ModelingToolkitBase/test/symbolic_events.jl src/systems/systems.jl test/scc_nonlinear_problem.jl typos docs/src/examples/remake.md lib/ModelingToolkitBase/src/atomic_array_dict.jl lib/ModelingToolkitBase/src/problems/ddeproblem.jl lib/ModelingToolkitBase/src/problems/jumpproblem.jl lib/ModelingToolkitBase/src/problems/sddeproblem.jl lib/ModelingToolkitBase/src/systems/codegen.jl lib/ModelingToolkitBase/src/systems/connectors.jl lib/ModelingToolkitBase/src/systems/imperative_affect.jl lib/ModelingToolkitBase/src/systems/parameter_buffer.jl lib/ModelingToolkitBase/src/systems/problem_utils.jl lib/ModelingToolkitBase/src/systems/system.jl lib/ModelingToolkitBase/src/utils.jl lib/ModelingToolkitBase/test/array_equation_dae.jl lib/ModelingToolkitBase/test/mtkparameters.jl lib/ModelingToolkitBase/test/nonlinearsystem.jl lib/ModelingToolkitBase/test/qa/aqua.jl lib/ModelingToolkitBase/test/struct_variables.jl lib/ModelingToolkitBase/test/symbolic_events.jl src/systems/systems.jl test/scc_nonlinear_problem.jl git diff --cached --check git diff --check upstream/masterAll exit 0 without output. Runic covered 19 Julia files and changed none; typos covered 20 files. Committed source hashes match the validated files.
A standalone TaylorDiff import with the failing CI's TaylorDiff 0.3.5 / ChainRules 1.74.12 / Symbolics 7.48.0 versions printed
TypeError: non-boolean (Symbolics.Num) used in boolean context, without importing ModelingToolkit. That probe hit its one-hour timeout (exit 124); it is not a completed test run. A duplicate compiler-variant probe was cancelled and is not counted as verification. The full passing Extensions runs above use the fixed dependency release.ModelOrderReduction's
Core/deim.jldimension mismatch also reproduces in latest default CI and in CI for this PR's merge-base default commit, both with 2 passed/1 error. It remains unchanged. The baseline investigation established pre-existence but did not identify introducing commits.Not verified locally: the full InterfaceI group, other groups, downstream ModelOrderReduction, documentation, GPU paths, other Julia versions, runtime benchmarks, or a counted independent review of this head. Latest default Extensions checks pass on both lts and Julia 1; the latest default downgrade Extensions check also passes. New-head CI has not completed and is not being awaited.
Next counted review must come from a smart model in a fresh session, not this fix session (risk.md § Independent reviews).
Links
🤖 Posted by an AI agent — harness: Codex CLI 0.164.0 · model: gpt-6.1-sol
Conversation: local fixer job SciML__ModelingToolkit.jl__5121 (no session URL)
Fix by Codex CLI 0.170.0 gpt-6-luna (head f40d3f6)
Merged current
masterinto the existing branch with a normal merge. Resolved thecodegen.jlconflict by preserving the PR's unused deterministic derivative sentinel selection and offset-axis fallback, while retaining the merged caller's independent-variable reservation. The upstream test expected sentinel collisions to throw; it now checks that a system using the formerly valid__mtk_dae_duparameter evaluates to a zero residual.The full ModelingToolkitBase
InterfaceIgroup passed:GROUP=InterfaceI timeout 3600 julia --project=lib/ModelingToolkitBase -e 'using Pkg; Pkg.test()'Runic and spelling checks passed. The changed Julia files were formatted with:
typoson the staged changed files,git diff --check, andgit diff --cached --checkexited 0 with no output.QA was run with:
GROUP=QA timeout 3600 julia --project=lib/ModelingToolkitBase -e 'using Pkg; Pkg.test()'The QA failure matches current default-branch CI: default downgrade QA run. ModelOrderReduction Core also fails on default CI with the same
DimensionMismatchseen in the prior PR run: default IntegrationTest run. Current default CI passes the previously failing Catalyst Simulation, ModelingToolkitBase InterfaceII, and main QA checks.Not verified locally: docs build, other test groups, or downstream integrations. Current default-branch docs CI passed. CI was started for the pushed head: new IntegrationTest run, new ModelingToolkitBase CI run.
Next counted review must come from a smart model in a fresh session, not this fix session.
🤖 Posted by an AI agent — harness: Codex CLI 0.170.0 · model: gpt-6-luna
Conversation: local fixer job SciML__ModelingToolkit.jl__5121--20261121T144046Z-codex-gpt-6-luna (no session URL)