Repository navigation
Test causal connector direction against input/output metadata - #5298
Draft
ChrisRackauckas-Claude wants to merge 4 commits into
Draft
ChrisRackauckas-Claude wants to merge 4 commits into
ChrisRackauckas-Claude wants to merge 4 commits into
Conversation
Check the equation direction against input/output connector metadata. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI 0.163.0 Agent-Model: gpt-6.1-sol Agent-Session: local session 01a15cac-cfc9-7a93-b5cd-c60ba1c32c71 (no session URL)
This was referenced Oct 21, 2026
Retain input/output metadata assertions across the expanded causal connection cases while incorporating the default branch fixes for the reported CI errors. 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__5298 (no session URL)
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Muse <noreply@meta.com> Agent-Harness: Muse CLI Code Agent-Model: muse-wonder-full-1.0 Agent-Session: local fixer job SciML__ModelingToolkit.jl__5298 (no session URL)
Bring in the default branch's ancestor identifier spelling correction. Keep the causal connector metadata assertions. 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.2-sol Agent-Job: SciML__ModelingToolkit.jl__5298--20261122T044215Z-codex-gpt-6.2-sol Agent-Session: local session 01a20191-dd5f-7883-ba37-c32b2b3dff0f (no session URL)
This branch has not been deployed
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.
InterfaceI fails its causal-connector assertion because it expects
output ~ input, while connection expansion producesinput ~ output. The assertion now checks that direction and independently verifies that its left side has input metadata and its right side has output metadata. Production code is unchanged. The same assertion fails in the current MTK downstream check on JuliaSymbolics/SymbolicUtils.jl#1169 .The original causal-connector feature tested this direction; a later test-only edit reversed the expectation while retaining the opposite comment. Correcting sentinel comparisons in #5295 made the stale assertion observable. The added metadata predicates check the contract independently of the observed printed equation. Both predicates are public owner APIs.
Verification
Julia 1.13.2, four threads and precompile tasks, one BLAS/OMP thread. Both runs used the same isolated environment developing this repository and its local sublibraries:
Unmodified base
207f39e2d3c63d87e9ecde21279ec6967e4e8b21, exit 1:With this exact three-line test change, exit 0:
Official QA:
The first QA attempt passed JET 54/54 and reached Aqua 20 pass/1 error, failing with
FolderMonitor(start): too many open files (EMFILE). The identical command passed on retry with the child file-descriptor limit above. This does not establish the limit as the cause of the transient failure. No test was disabled or weakened. Runic, spelling over the diff, and whitespace checks passed. Docs, GPU, Everything, and unrelated downstream suites were not run for this test-only change.CI completed with 99 successful checks, seven failures and three skipped checks. Recorded same-head comparisons match all seven failures to default
207f39e2d3: five Optimization jobs shareUnsupportedNonlinearOperator(:literal_pow), downstream indexing shares the one-element-vector state-coordinateBoundsError, and SciMLSensitivity Core8 sharesmtk.jl:216's 3600-element interval-vector access at3601. Core8 counts differ (PR208pass/1error versus default205pass/2errors); the classification concerns the shared failure, not identical full-suite results. PR Core8 job, matching default job. Existing investigations and fixes are linked below; their full downstream suites were not rerun with those fixes. No all-green CI claim is made.Independent review
Fresh Codex CLI 0.163.0 / gpt-6.1-sol reviewer: APPROVE, low risk, high confidence; no blocking findings for exact commit
2c870917f06268e9ac844015e0385657d0588492. The reviewer recorded provisional risk before reading author reports, independently inspected the original feature/source/test history and connector metadata, and reran the exact testset from clean archives with all six local path dependencies relocated.Full InterfaceI/QA were inspected in raw author logs, not independently repeated. The reviewer independently passed diff spelling and whitespace checks; Runic success is author evidence. An existing scalar connect docstring direction discrepancy is outside this test patch and does not change the source/history contract. No runtime bug-fix claim is made.
Reviewer thread: local thread
01a15d51-24f8-7ca2-9cb5-0a6533099a35; outer local session01a15ca3-5696-7ea3-bbac-ba551b6975af(no session URL exposed).Links
Original causal contract: ff36edb
Historical assertion edit: d7d6f1b
Sentinel fix: Change comparison to 0 instead of to nothing #5295
Literal-power baseline and merged repair: OptimizationMOI Core rejects literal_pow expressions with SymbolicUtils 4.52.0 Optimization.jl#1435 ; Handle integer-power codegen in OptimizationMOI expressions Optimization.jl#1436
Indexing baseline and fix stack: solve(::SteadyStateProblem) returns the lowered problem's solution: sol.u reordered/empty, sol.prob.f.sys time-independent SteadyStateDiffEq.jl#171 ; Solve SCCSteadyStateProblem; stop routing SteadyStateProblem through a lowering SteadyStateDiffEq.jl#178 ; Construct SCCSteadyStateProblem from a System; drop the deferred SCC lowering #5276
Checkpoint baseline and partial fix: InterpolatingAdjoint/GaussAdjoint checkpoint re-solve fails for low-storage RK with save_everystep = false (fixed dt not forwarded; BoundsError when stage times leave the interval) SciMLSensitivity.jl#1705 ; Fix checkpoint re-solves for fixed-step and out-of-range RK stages SciMLSensitivity.jl#1707
Compared Core8 PR/default jobs: https://github.com/SciML/ModelingToolkit.jl/actions/runs/39562854146/job/119097968630 ; https://github.com/SciML/ModelingToolkit.jl/actions/runs/39509026516/job/118925097105
Risk assessment
🤖 Generated by an AI agent — harness: Codex CLI 0.163.0 · model: gpt-6.1-sol
Author conversation: local session 01a15cac-cfc9-7a93-b5cd-c60ba1c32c71 (no session URL).
Conversation: local session 01a15ca3-5696-7ea3-bbac-ba551b6975af (no session URL exposed).
Fix by Codex CLI 0.164.0 gpt-6.1-sol (head cbfaec6)
Merged the default branch normally, retaining both parents. Upstream includes the Optimization literal-power repair and the causal-direction correction with expanded connection cases. Resolved the test conflict by preserving those cases and checking input/output metadata in all four port/scalar connection cases. The net diff against incorporated default d6e93c5bbe is two added assertion lines; there are no additional production changes.
All seven reported failures also occur on the original default-branch push at 207f39e2d3. Matching raw signatures are the one-element state-vector bounds error, the 3600-element checkpoint-vector bounds error, and
UnsupportedNonlinearOperator(:literal_pow). Their latest default executions succeed. The latest Sublibrary CI matrix was skipped, so that comparison uses the most recent actual Optimization executions.Validation used Julia 1.13.3, four threads, one precompile task, and one BLAS thread. Full groups use their existing repository entrypoints and resolved scratch environments containing the declared dependencies. Commands below normalize scratch locations to environment variables.
The earlier source-loading attempts did not pass: InterfaceI reported 1730 passes, one subprocess-startup timeout assertion, one Symbolics binding error, and three existing broken tests. Optimization passed its OptimizationSystem and InfiniteOpt testsets, then reported CasADi conversion errors and was stopped after corrupt Conda solver files were identified. Clean-default focused CasADi probes passed, so that conversion error was not established as a default regression. No test was disabled or weakened.
A fresh job-local Python environment was installed from the identical frozen lockfile using a job-local Pixi cache and no hard links. Its Ipopt executable runs successfully; the original zero-byte shared files were untouched. Final full runs below use normal compiled modules and this fresh interpreter:
Regression control: original and PR testsets were extracted unchanged from their commits and run against the same merged production source and dependencies. This isolates the test correction; it is not an archived runtime-baseline or new runtime bug-fix claim.
Original assertion, exit 1:
PR assertions and merged testset, exit 0:
Full root InterfaceI, exit 0:
GROUP=InterfaceI julia +1.13.3 --startup-file=no --check-bounds=yes --project="$VALIDATION_ENV" test/runtests.jlFull root Optimization, exit 0:
QA (unchanged repository QA body), exit 0:
GROUP=QA julia +1.13.3 --startup-file=no --check-bounds=yes --project="$QA_ENV" test/qa/qa.jlRunic, spelling over the net diff, and whitespace checks passed:
Separate sublibrary and LTS/prerelease matrix runs, downstream suites, Everything, GPU, and docs were not rerun locally. Downstream classification uses raw CI comparisons, not local downstream verification. Independent review of the merged head is pending.
Whole-repository CI spelling is currently red on four occurrences of the existing ancestor-index variable
ancinlib/ModelingToolkitBase/src/atomic_array_dict.jl(553:5, 554:5, 555:33, 555:41). The same four findings reproduce withtypos-cli 1.47.0on clean incorporated default; CI uses1.50.1. The affected file and spelling configuration are unchanged between the default and this head. No source or ignore rule was changed for this pre-existing finding. Diff-only spelling still exits 0.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__5298 (no session URL)
Fix by Muse CLI Code muse-wonder-full-1.0 (head 0462609)
Merged the default branch normally (no rebase, no force push), bringing the branch from the incorporated default at the previous head to current default
11a490d1a2. There are no new production or test edits from this session: the net diff against current default is still only the two assertion lines inlib/ModelingToolkitBase/test/components.jl(isinput(eq.lhs)/isoutput(eq.rhs)).rack ci compareclasses two checks base-green for the previous head:tests / Optimization (julia 1, ubuntu-24.04)and Spell Check with Typos. Every other failing check is classed pre-existing (Extensions, sublibrary QA/Extensions, downgrade Extensions, ModelOrderReduction downstream).Optimization: the previous-head job was cancelled at the 120-minute timeout, not failed on a test assertion. Its log shows the same Ipopt problem-size sequence as the successful default-branch job at the incorporated default (20 of 23 solves completed, then two silent intervals of 42.5 and 46.8 minutes). The default-branch Optimization (julia 1) job succeeds in 34 minutes at current default and 44 minutes at the incorporated default, and the previous head's Optimization (julia lts) job succeeded in 34 minutes. The net PR diff touches only an InterfaceI test file, so no PR code path can affect the Optimization group. No code change was made for this; the merge refreshes the branch and restarts CI, and the full group passes locally below.
Spell Check:
typosreports the same fourancfindings inlib/ModelingToolkitBase/src/atomic_array_dict.jl(553:5, 554:5, 555:33, 555:41) on a clean checkout of current default (exit 2, identical positions), and recently merged default-branch PRs show the same spell-check failure. That file and.typos.tomlare unchanged between default and this head. No code change was made for this pre-existing finding; diff-only spelling passes.QA note: root QA now errors on current default as well. Local QA (below) and the current default-branch QA (julia 1) CI job both fail
all_qualified_accesses_are_publicbecauseexpand_record_equationsis not public inModelingToolkitBasebut is used qualified fromModelingToolkit(src/systems/systems.jl:13). That name arrived with the default-branch commits merged here; it is not in this PR's net diff. No code change was made for it in this PR.Validation used Julia 1.13.2, four threads and four precompile tasks, one BLAS thread. Commands below normalize the scratch environment location to an environment variable.
Focused causal testset (same assertions as the merged
components.jltestset, including the two added lines), exit 0:julia --startup-file=no --project="$VALIDATION_ENV" causal_probe.jlFull root Optimization group, exit 0 (the one broken test is the pre-existing
@test_brokenalready in the group; no test was disabled or weakened):GROUP=Optimization julia --startup-file=no --project=. -e 'using Pkg; Pkg.test()'Root QA group, exit 1 with the pre-existing default-branch error described above (39 pass, 1 error):
GROUP=QA julia --startup-file=no --project=. -e 'using Pkg; Pkg.test()'Runic, diff spelling, and whitespace checks, all exit 0:
julia --project=@runic -m Runic --inplace lib/ModelingToolkitBase/test/components.jl git diff upstream/master > diff.patch typos diff.patch git diff --checkFull InterfaceI was not rerun in this session (the focused merged testset above covers this PR's two added lines; full InterfaceI failing-before/passing-after evidence is already in the PR body). Separate sublibrary matrix runs, downstream suites, Everything, GPU, and docs were not rerun locally. CI for the new head was checked once after pushing that it started; its result was not waited for.
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: Muse CLI Code · model: muse-wonder-full-1.0
Conversation: local fixer job SciML__ModelingToolkit.jl__5298 (no session URL)
Fix by Codex CLI 0.170.0 gpt-6.2-sol (head 2416ec1)
Merged upstream
masterat1feb1ec1dbto pick up itsanctoancestorspelling correction. The PR diff against this base is the two assertions for causal connector metadata.The GitHub job uses Typos 1.50.1. Running
typos --format brief .with that version on the old PR head and its incorporated default produced the same four findings and exit 2.The identical scan on clean current
masterand on this merge commit exited 0 with no diagnostics. Diff spelling and whitespace checks also exited 0.$SCRATCHdenotes the job scratch directory andtyposbelow denotes the CI version.Runic on the 32 Julia files in the merge exited 0 with no output or formatting edits. The staged tree matched the committed tree.
Tests used Julia 1.12.4, four threads, and one precompile task.
Full root InterfaceI exited 0.
Root QA exited 1 with the same six-symbol reexport assertion as the current default-branch job.
Downstream and sublibrary CI comparisons used existing job logs. Local runtime verification covered the two root groups above.
Next counted review must come from a smart model in a fresh session, not this fix session.
Links
🤖 Posted by an AI agent — harness: Codex CLI 0.170.0 · model: gpt-6.2-sol
Conversation: local session 01a20191-dd5f-7883-ba37-c32b2b3dff0f (no session URL)