Repository navigation
fix: pass bindings to time-independent initialization system (facet C of #5066) - #5254
Merged
ChrisRackauckas merged 5 commits intoOct 16, 2026
Conversation
`generate_initializesystem_timeindependent` collected bound-parameter bindings into `newbinds` but never forwarded them to the initialization `System`, so a parameter like `src.med => mC` survived as a value-less entry in `ps` and `MTKParameters` errored. The time-varying generator already does this; mirror it. Part of SciML#5066 (facet C). Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <[email protected]> Agent-Harness: Devin CLI 3000.11.3 Agent-Model: swe-2-high Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/orch-ibmtk/jobs/5066-devin/log.txt on amdci2.julia.csail.mit.edu
Covers issue SciML#5066 facet C: subsystem parameters bound to a parent-level nonnumeric parameter must remain bound after `NonlinearSystem` conversion so `NonlinearProblem` construction can evaluate them. Fails on master ("Could not evaluate value of parameter src.med") and passes with the `bindings = newbinds` fix in `generate_initializesystem_timeindependent`. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <[email protected]> Agent-Harness: Devin CLI 3000.11.3 Agent-Model: swe-2-high Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/orch-ibmtk/jobs/5066-devin/log.txt on amdci2.julia.csail.mit.edu
Bound parameters in the time-independent initialization system already get their values from bindings. Remove their guesses so they do not become conflicting initial conditions, and cover stored and problem-level guesses. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: codex-cli 0.160.0 Agent-Model: gpt-6-luna Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/orch-ibmtk/jobs/5066-luna/log.txt on amdci2.julia.csail.mit.edu
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Agent-Harness: Claude Code Agent-Model: claude-opus-5-5[1m] Agent-Session: https://claude.ai/code/session_01H4fXBChQshAwfpLMCpEvAX Claude-Session: https://claude.ai/code/session_01H4fXBChQshAwfpLMCpEvAX
ChrisRackauckas
marked this pull request as ready for review
October 16, 2026 11:19
ChrisRackauckas
referenced
this pull request
Oct 17, 2026
…5284) Bump versions: ModelingToolkitBase 1.77.5, ModelingToolkit 11.45.5 Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Agent-Harness: Claude Code 2.1.302 Agent-Model: claude-sonnet-5-5 Claude-Session: https://claude.ai/code/session_01VZjwf7Ux9YtTzwHGHMqnsq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please ignore this draft until reviewed by @ChrisRackauckas.
NonlinearSystemnow retains nonnumeric subsystem parameter bindings through time-independent initialization, fixing facet C’s missing parameter values. The follow-up also removes guesses for retained bound parameters from the generated initialization system, since those parameters get their values from their bindings; the regression test covers both stored guesses and guesses passed toNonlinearProblem.Fail-before / pass-after
The facet C regression fails on unmodified master when
bindings = newbindsis omitted:Could not evaluate value of parameter src₊med. Missing values for variables in expression src₊med.With the binding retained, the facet C solve succeeds; the regression is part of the passingNonlinearSystem Testbelow. The review’s integer-parameter probe also confirmed that a stored guess and a problem-keyword guess both work on master, failed withBoundInitialConditionsErroron the prior PR head, and now pass with this change.Verification
Commands used the job-local temporary directory and stacked private Julia depot.
GROUP=InterfaceII /home/crackauc/.juliaup/bin/julia +1.12 --project=. -e 'using Pkg; Pkg.test()'— passed. Relevant output:GROUP=Initialization /home/crackauc/.juliaup/bin/julia +1.12 --project=. -e 'using Pkg; Pkg.test()'— passed:@test_brokencases./home/crackauc/.juliaup/bin/julia +1.12 --project=@runic -e 'using Runic; exit(Runic.main(ARGS))' -- --check lib/ModelingToolkitBase/src/systems/nonlinear/initializesystem.jl lib/ModelingToolkitBase/test/nonlinearsystem.jl— exit 0 (after commit eafd0f8 formatted test line 676; the earlier claim did not hold for ebce32f).typos lib/ModelingToolkitBase/src/systems/nonlinear/initializesystem.jl lib/ModelingToolkitBase/test/nonlinearsystem.jl— exit 0;git diff --check— clean.Not verified
The top-level ModelingToolkit suite, QA, full CI, downstream packages, and combined execution with facet A were not run. The full Initialization and InterfaceII groups were run locally.
What a reviewer should push back on
The generated initialization system drops guesses only for non-floating-point parameters whose bindings it retains. Please check this precedence for indexed bound parameters and other initialization call paths.
Part of #5066
Risk assessment
🤖 Generated with Codex CLI (model: gpt-6-luna) — local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/orch-ibmtk/jobs/5066-luna/log.txt on amdci2.julia.csail.mit.edu
Review status (orchestrator)
bindingsconflicted with guesses on bound parameters (BoundInitialConditionsError). Fixed in ebce32f by Codex gpt-6-luna, which took over from the rate-limited Devin SWE-2 session.Head orchestration: Claude Code (model: claude-opus-5-5[1m]), https://claude.ai/code/session_01H4fXBChQshAwfpLMCpEvAX
Risk assessment (independent review, codex-cli gpt-6.1-sol, reviewed head 079c8b5)
079c8b5bd25c9cc6c2e6a256a5de6fe26fd1acbd(unchanged at completion), the full diff, trailers andNonlinearSystem(sys)produces systems that cannot be compiled or turned into a problem (three facets) #5066 (facet C). WithJULIA_NUM_THREADS=4,TMPDIR=$PWD/tmp,JULIA_DEPOT_PATH=$PWD/depot:/home/crackauc/.julia,/home/crackauc/.juliaup/bin/julia +release --startup-file=no --project=env-5254 tmp/test-5254-compare.jl beforerestores only the merge-base initialization method and errors:Could not evaluate value of parameter ld₊med. Missing values for variables in expression ld₊med.With the PR method,... --project=env-5254 tmp/test-5254-regression.jlpasses the extracted nonnumeric regression 4/4 (14.1 s) and bound-parameter guesses 8/8 (6.8 s). Supported whole-array bindings/guesses pass 6/6 checks with both methods:... --project=env-5254 tmp/probe-5254-array.jl beforeand... tmp/probe-5254-array.jl after. CI InterfaceII passes 1,440 tests with seven existing broken cases: https://github.com/SciML/ModelingToolkit.jl/actions/runs/38850857783/job/116815479819. Final checks: {'SUCCESS': 101, 'FAILURE': 7, 'SKIPPED': 1}.🤖 Posted by an AI agent — harness: codex-cli · model: gpt-6.1-sol (independent reviewer; appended by Claude Code 2.1.301 · claude-opus-5-5)
Conversation: https://claude.ai/code/session_01VZjwf7Ux9YtTzwHGHMqnsq