Skip to content

Preserve overridable SBML parameter defaults - #239

Merged
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:codex/preserve-overridable-sbml-parameters
Sep 7, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:codex/preserve-overridable-sbml-parameters

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Ignore this PR until it has been reviewed by @ChrisRackauckas.

What changed

Catalyst 16 distinguishes overridable initial/default values from immutable symbolic parameter bindings. SBMLToolkit's Catalyst 16 compatibility path classified every literal SBML parameter value as a binding, so standard SBML parameter defaults could not be overridden when constructing or remaking a problem.

This classifies values with no symbolic dependencies as initial_conditions, while retaining parameter-only symbolic expressions as bindings. Expressions that reference a state remain initial conditions, preserving the existing handling required by Catalyst's binding validation.

The regression begins at d2dcf2c405db1bfbccfa4f52ed44348dc2bd4205, introduced in PR 201. Its parent works with the prior supported Catalyst 15 stack (Catalyst=15.0.11 ModelingToolkit=9.84.0 retcode=Success).

Failing before

On clean main at 3222444, the Carcione model reaches the following failure after switching its removed reaction-system conversion to the public ODESystem(mdl) constructor:

┌ Warning: gamma is not a non-dependent parameter in the system.
ERROR: AssertionError: Expected an Initial parameter to exist for variable gamma. If it is a bound parameter, it cannot be given initial conditions.

Applying only the new initial-condition expectation to the unfixed source also fails in test/systems.jl:

Error During Test at test/systems.jl:137
  Test threw exception
  Expression: all(isequal(Symbolics.wrap(initial_conditions[Symbolics.unwrap(k)]), v) for (k, v) in testdef)
  KeyError: key k1 not found

Passing after

$ GROUP=Core julia +1.11 --project=. --startup-file=no -e 'using Pkg; Pkg.test()'
Test Summary: | Pass  Total   Time
Core/systems.jl |   47     47  12.3s
Test Summary:   | Pass  Total     Time
Core/wuschel.jl |    2      2  2m15.0s
Testing SBMLToolkit tests passed

$ GROUP=QA julia +1.11 --project=. --startup-file=no -e 'using Pkg; Pkg.test()'
Test Summary: | Pass  Total     Time
QA/qa.jl      |   28     28  1m59.3s
Testing SBMLToolkit tests passed

$ julia +1.12 --project=@runic -e 'using Runic; exit(Runic.main(["--check", "src/systems.jl", "test/systems.jl"]))'
# exit 0

$ typos src/systems.jl test/systems.jl
# exit 0

$ git diff --check
# exit 0

The regression test additionally constructs an ODEProblem with k1 => 2.0 and observes override_prob.ps[k1] == 2.0. It also verifies that the literal k1 = 1.0 is an initial condition while the genuinely symbolic initial assignment k2 = k1 remains a binding.

No dependencies or compatibility bounds change. SBMLToolkit and Catalyst are MIT-licensed.

🤖 Generated with Codex CLI 0.151.0 (model: gpt-5.6-sol; session: local session ID 01a0598f-11b9-72d1-91d9-b2fbb186557d)

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

All 10 GitHub checks completed successfully for commit 70a60f4d42ee59919bb3711767b4dadef360f2a6: Core on LTS/current/prerelease Julia, QA, documentation, minimum-dependency tests, formatting, spelling, and workflow detection. The PR remains a draft and is merge-clean. Please continue to ignore it until reviewed by @ChrisRackauckas.

This verifies the SBML parameter-default fix. The separate full EasyModelAnalysis Carcione example has not completed successfully: its long-running validation was terminated, and an additional ensemble/remake failure is under investigation. I am not claiming the downstream example is fixed by this PR alone.

🤖 Generated with Codex CLI 0.153.4 (model: gpt-6-astra; session: local transcript /home/crackauc/.codex/sessions/2026/09/05/rollout-2026-09-05T05-08-31-01a070d3-9e50-71c2-98f5-129385e50fb7.jsonl).

Store literal SBML parameter values as initial conditions under Catalyst 16 so callers can override them when constructing or remaking problems. Keep parameter-only symbolic expressions as immutable bindings.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Agent-Harness: Codex CLI 0.151.0
Agent-Model: gpt-5.6-sol
Agent-Session: local session ID 01a0598f-11b9-72d1-91d9-b2fbb186557d
@ChrisRackauckas-Claude
ChrisRackauckas-Claude force-pushed the codex/preserve-overridable-sbml-parameters branch from 70a60f4 to 0a861d4 Compare September 5, 2026 12:37
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Rebased onto the merged assignment-rule fix at #240 . The parameter-default change is unchanged; current head is 0a861d4 . Fetched and verified the remote branch had no intervening contributor commits before the lease-protected update.

Local Julia 1.11.9 verification on this head:

GROUP=Core julia --project=SBMLToolkit-root -e 'using Pkg; Pkg.test()'
GROUP=QA julia --project=SBMLToolkit-root -e 'using Pkg; Pkg.test()'
Core/events.jl | 4/4
Core/precompile_workload.jl | 1/1
Core/reactions.jl | 28/28
Core/rules.jl | 11/11
Core/simresults.jl | 9/9
Core/systems.jl | 49/49
Core/utils.jl | 11/11
Core/wuschel.jl | 2/2
Testing SBMLToolkit tests passed

QA/qa.jl | 28/28
Testing SBMLToolkit tests passed

Both commands exited 0. Runic, diff spelling, and git diff --check passed. No new assertions were skipped or weakened. New-head CI is pending; the previous head had 10/10 successful checks. Full downstream EMA documentation and the 2,000-sample example are still running with the separate MTK copied-binding fix, so neither is claimed complete.

Please continue to ignore this draft until reviewed by @ChrisRackauckas.

🤖 Rebase and validation by Codex CLI 0.153.4 (model: gpt-6-astra; session: local transcript /home/crackauc/.codex/sessions/2026/09/05/rollout-2026-09-05T05-08-31-01a070d3-9e50-71c2-98f5-129385e50fb7.jsonl).

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Terminal validation audit for commit 0a861d4, rebased onto the merged assignment-rule fix #240:

  • Read all 10 current CI checks: all completed successfully, including Core on LTS/current/prerelease Julia, QA, downgrade, documentation, Runic, and spelling.
  • Local native Core: 115/115 passed. Local native QA: 28/28 passed. Runic, spelling over the diff, and git diff --check passed before this rebased push.
  • The separate full EasyModelAnalysis 2000-sample example and documentation build remain running; this audit does not claim those downstream runs passed.

This remains a draft and should be ignored until reviewed by @ChrisRackauckas.

🤖 Generated with Codex CLI 0.153.4 (model: gpt-6-astra; session: local transcript /home/crackauc/.codex/sessions/2026/09/05/rollout-2026-09-05T05-08-31-01a070d3-9e50-71c2-98f5-129385e50fb7.jsonl).

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review September 7, 2026 06:09
@ChrisRackauckas
ChrisRackauckas merged commit 98d3968 into SciML:main Sep 7, 2026
10 checks passed
ChrisRackauckas added a commit that referenced this pull request Sep 7, 2026
- Preserve overridable SBML parameter defaults (#239)



Agent-Harness: Claude Code
Agent-Model: claude-opus-5[1m]
Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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