Skip to content

Fix Initial parameters for unsplit array systems - #5302

Draft
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix/unsplit-array-initial-parameters
Draft

ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix/unsplit-array-initial-parameters

Conversation

@ChrisRackauckas-Claude

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

Copy link
Copy Markdown
Member

🚧 UNREVIEWED — Ignore this PR until reviewed by @ChrisRackauckas.
🤖 This PR was prepared by an AI agent; Chris has not reviewed it.

With complete(sys; split=false), mixed matrix/vector/scalar states produce array-valued Initial parameters inside a flat numeric parameter buffer, and DAEProblem construction throws a Matrix{Bool}/Float64 promotion error. Scalarize Initial parameter symbols for the unsplit layout and preserve supplied indexed values when completing its operating point. Split storage retains its current symbolic layout.

The regression checks numerical DAE residuals, state/derivative order, flat numeric parameter storage, ODE construction, and explicit Initial values for both split modes. Two production lines and one existing test file change; no dependency or public API changes.

Verification

Julia 1.13.1, four Julia/precompile threads, one BLAS/OMP thread, isolated local package environments. Actual sources use base 207f39e . Its ModelingToolkitBase Project declares 1.77.5; preserved Manifest metadata labels the developed entry 1.77.4. Loaded source paths/hashes were verified; this is not a fresh minimum-dependency resolution.

The identical complete final official array_equation_dae.jl was executed against clean base and candidate, with standard compilation/default optimization:

Before, exit 1: 43 passed, 1 error
mixed array initial parameters with split=false: Error During Test
AssertionError: `promote_to_concrete` can't make type Matrix{Bool} uniform with Float64

After: 55/55 passed

Official package groups, using the existing runners:

GROUP=InterfaceI julia --startup-file=no --project="$VALIDATION_ENV" -e 'using Pkg; Pkg.test("ModelingToolkitBase")'
GROUP=QA julia --startup-file=no --project="$VALIDATION_ENV" -e 'using Pkg; Pkg.test("ModelingToolkitBase"; julia_args=["--compiled-modules=no", "-O1"])'
InterfaceI: 1825 passed, 1 failed, 5 existing broken; exit 1
  array_equation_dae.jl: 55/55
  sole failure: existing causal connector expectation, components.jl:446
JET:54/54; Aqua:21/21; Testing ModelingToolkitBase tests passed; exit 0

The causal assertion independently fails on clean base and has a separate test-only repair linked below. An earlier InterfaceI run with --compiled-modules=no also failed an unchanged 180-second child-liveness assertion; that assertion fails on clean base under the same flag and passes unchanged with standard compilation. No timeout or assertion was modified.

Additional identical public-API controls compare absent, whole-array, fully indexed, and partial indexed Initial maps:

Mode Clean base Candidate
Default 80pass,4fail 80pass,4samefail
Explicit split=true 80pass,4fail 80pass,4samefail
Explicit split=false 4 constructor errors 84/84pass

Combined controls deliberately exit 1 in both conditions because the eight inherited partial-indexed split/default failures remain asserted. This PR does not fix those failures; the separate reduced report is linked below.

Fresh exact Runic check over the three final Julia files, spelling over the final diff, and whitespace checks completed exit0. The source/test hashes match the independently reviewed files; temporary docs Project paths and clone origin were restored. Final tracked diff contains the three intended files only.

Three full local docs attempts ran without changing source, link checking or warning policy: the original covered build, a standard build, and its identical retry. All exited1 solely on external GitHub HTTP429 link-check errors, stopping before rendering. The affected existing links varied across attempts (ColPrac README, ModelingToolkit NEWS, PDEBase interface); direct HEAD requests returned200 afterward. No local docs pass is claimed. The candidate CI build subsequently passed on this exact reviewed commit. Its downloaded raw log contains RenderDocument and HTMLWriter rendering; this is candidate CI evidence, not a local docs pass. A fresh separate final gate audit classified the earlier HTTP429 failures as disclosed external validation gaps suitable for a draft, not identified source blockers.

Final candidate CI completed with94 successful checks,14 failures and3 skipped checks, no pending jobs. Deterministic comparison classifies all14 failures as pre-existing against default207f39e2: seven root/Base/downgrade InterfaceI causal assertions, five Optimization/MOI failures, SymbolicIndexingInterface downstream and SciMLSensitivity Core8. Matching failing steps and error signatures were read; this is inherited-red qualification, not an all-green claim.

No complete local Everything, Initialization group, dependency-floor, downstream, or GPU run is claimed.

Independent review

Fresh Codex CLI 0.163.0 / gpt-6-astra: APPROVE SOURCE, low risk, high confidence, with docs/formatter/metadata completion required before publication. The reviewer independently ran clean archives: same official file43pass1error→55/55; full map controls160pass8fail4errors→244pass8samefail0errors, with all84 unsplit assertions passing. The final three candidate file hashes match those independently tested. Full official QA/InterfaceI author logs were inspected, not independently rerun. A separate fresh Codex CLI0.163.0/gpt-6-astra session01a15e62-2aa5-7050-884c-24515430bf2a verified the unchanged full diff and three hashes, formatter/spelling exits, clean metadata, and raw failures from all three docs attempts. It retained low source risk/high gate-classification confidence and accepted the disclosed external docs gap for a draft, without claiming rendering or merge approval.

Reviewer local session 01a15dc7-4a29-7591-bd4d-2160fa15e372 (no session URL).

Links

Risk assessment

  • Risk: low
  • Blast radius: unsplit array Initial parameter construction and supplied indexed-value preservation in operating-point completion; split/default controls are unchanged. No public API or dependency change.
  • Evidence: identical official43pass1error→55/55, independent84/84 unsplit controls, official QA75/75; inherited failures retained above. Formatter and metadata cleanup passed; three local docs attempts failed only external HTTP429, with an independent gate audit accepting that disclosed external gap for a draft.
  • Independent review: Codex CLI 0.163.0 / gpt-6-astra rated low risk/high confidence, no source blockers; fresh separate gate audit verified completed formatting/cleanup and accepted the external docs gap for a draft (review evidence).
  • Merge: qualified review-clean candidate under the parent inherited-red policy: current-head CI is complete and all14 failures match default. Parent assesses merge eligibility; root has no merge authority.

🤖 Posted by an AI agent — harness: Codex CLI 0.163.0 · model: gpt-6.1-sol.
Original writer conversation: local session 01a15d04-553f-7240-8d96-8de0c6f663b8 (no session URL).
Validation recovery: Codex CLI 0.163.0, model gpt-6-astra; local session 01a15dac-5d4e-7cb0-bd5a-7c9bed03d2f7 (no session URL).
Conversation: local session 01a15ca3-5696-7ea3-bbac-ba551b6975af (no session URL).

Scalarize array Initial parameters for flat unsplit storage and preserve
supplied indexed values when completing operating points. Add the official
mixed matrix/vector/scalar DAE and ODE regression for both split modes.

The identical official file errors on the base and passes55/55 after the
fix. Independent source and final publication-gate reviews are clean.
Three local docs attempts reached checks but stopped on external HTTP429;
no candidate rendering pass is claimed.

Initial implementation: Codex CLI0.163.0 / gpt-6.1-sol, local session
01a15d04-553f-7240-8d96-8de0c6f663b8 (no session URL).
Validation recovery: Codex CLI0.163.0 / gpt-6-astra, local session
01a15dac-5d4e-7cb0-bd5a-7c9bed03d2f7 (no session URL).

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 01a15ca3-5696-7ea3-bbac-ba551b6975af (no session URL)

This branch has not been deployed

No deployments
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