Skip to content

fix: pass bindings to time-independent initialization system (facet C of #5066) - #5254

Merged
ChrisRackauckas merged 5 commits into
SciML:masterfrom
ChrisRackauckas-Claude:agent/5066-bindings-graph-facet-c
Oct 16, 2026
Merged

ChrisRackauckas merged 5 commits into
SciML:masterfrom
ChrisRackauckas-Claude:agent/5066-bindings-graph-facet-c

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Please ignore this draft until reviewed by @ChrisRackauckas.

NonlinearSystem now 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 to NonlinearProblem.

Fail-before / pass-after

The facet C regression fails on unmodified master when bindings = newbinds is 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 passing NonlinearSystem Test below. The review’s integer-parameter probe also confirmed that a stored guess and a problem-keyword guess both work on master, failed with BoundInitialConditionsError on 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:
    NonlinearSystem Test |  140    140  2m24.8s
    ...
    Optimal Control + Constraints Tests |  31  2  33  32m06.7s
    5174.635697 seconds (4.00 G allocations: 406.831 GiB, 4.02% gc time, 74.46% compilation time: 7% of which was recompilation)
    Testing ModelingToolkitBase tests passed
    
    Two tests in this suite are reported as broken.
  • GROUP=Initialization /home/crackauc/.juliaup/bin/julia +1.12 --project=. -e 'using Pkg; Pkg.test()' — passed:
    Guess Propagation |   11     11  34.6s
    InitializationSystem Test |  758  12  770  27m24.3s
    Initial Values Test |   67     67  6m21.4s
    2060.322882 seconds (1.43 G allocations: 71.591 GiB, 5.29% gc time, 98.24% compilation time: 3% of which was recompilation)
    Testing ModelingToolkitBase tests passed
    
    The 12 broken checks are existing @test_broken cases.
  • /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

  • Risk: medium
  • Blast radius: time-independent initialization of systems with non-floating-point bound parameters and guesses; no public API changes.
  • Evidence: facet C fail-before/pass-after; InterfaceII and Initialization package groups pass locally, including both guess sources.
  • Independent review: Codex gpt-6-astra rated the prior PR head medium and requested this compatibility fix; this revision has not received a follow-up review.
  • Merge: needs human review until the updated diff has an independent clean review.

🤖 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)

  • Round 1, Codex gpt-6-astra: CHANGES. Adding bindings conflicted 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.
  • Round 2, Devin SWE-2 first pass: CHANGES at low risk. The only blocker was Runic formatting of one test line, fixed in eafd0f8. No regression on any probe that works on master.
  • Top-reviewer pass, Claude Code + Opus 5.5 (claude-opus-5-5): MERGE, low. No behavioural divergence from master on any probe that works on master. The Optimization and SciMLBase-downstream CI failures also fail on master; the NeuralPDE failure is an Enzyme error on a path this diff does not touch.
  • Merge: auto-merge candidate (low/low).

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)

  • Risk: low
  • Blast radius: time-independent initialization of non-floating-point bound parameters, including nonnumeric subsystem parameters; guesses for those retained bindings. Floating-point solvable bindings retain their existing equation-based handling. No public API removal or dependency changes.
  • Evidence: reviewed head 079c8b5bd25c9cc6c2e6a256a5de6fe26fd1acbd (unchanged at completion), the full diff, trailers and NonlinearSystem(sys) produces systems that cannot be compiled or turned into a problem (three facets) #5066 (facet C). With JULIA_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 before restores 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.jl passes 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 before and ... 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}.
  • Independent review: codex-cli 0.163.0 gpt-6.1-sol rated it low, high confidence: the exact failure reproduces without the binding forwarding, the fix passes the regressions, and supported array guesses retain their working behavior.
  • Merge: auto-merge candidate — no introduced regression found; remaining red checks are inherited failures described below.

🤖 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

ChrisRackauckas and others added 5 commits October 2, 2026 17:34
`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
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review October 16, 2026 11:19
@ChrisRackauckas
ChrisRackauckas merged commit a4b6f95 into SciML:master Oct 16, 2026
104 of 111 checks passed
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants