Repository navigation
SCCNonlinearSolve: solve HomotopyProblem blocks in vector-stored SCC problems - #1321
Merged
Merged
Conversation
…problems `iteratively_build_sols` for vector-stored blocks reads the first block's state through `probvec` to fix the solution type, and `probvec` had no `HomotopyProblem` method, so an `SCCNonlinearProblem` whose blocks are a vector and begin with a homotopy block threw a `MethodError`. Tuple-stored blocks never call `probvec`, which is why only the vector form failed. The homotopy test now runs both container forms. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Agent-Harness: Claude Code 2.1.280 Agent-Model: claude-opus-5-5[1m] Agent-Session: https://claude.ai/code/session_01Wt79fZeNaZxiwQ3LagMYXH Claude-Session: https://claude.ai/code/session_01Wt79fZeNaZxiwQ3LagMYXH
This was referenced Sep 23, 2026
Version bump only. Agent-Harness: Claude Code 2.1.280 Agent-Model: claude-opus-5-5[1m] Agent-Session: https://claude.ai/code/session_01Wt79fZeNaZxiwQ3LagMYXH Claude-Session: https://claude.ai/code/session_01Wt79fZeNaZxiwQ3LagMYXH Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
ChrisRackauckas
marked this pull request as ready for review
October 3, 2026 11:43
This was referenced Oct 7, 2026
ChrisRackauckas
referenced
this pull request
Oct 14, 2026
Agent-Harness: Devin CLI 3000.11.3 Agent-Model: Fusion (Claude Opus 5.5 Medium + SWE-2 Medium) Agent-Session: local transcript ~/.local/share/devin/cli/transcripts/flash-hour.json Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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 until reviewed by @ChrisRackauckas.
What changed and why
iteratively_build_solsfor vector-stored blocks callsprobvec(first(probs))to fix the stripped solution type, andprobvechad noHomotopyProblemmethod. So anSCCNonlinearProblemwhose blocks are stored in a vector and whose first block is aHomotopyProblemthrew aMethodErrorbefore solving anything. The tuple path never callsprobvec, andsolve_single_sccalready handles homotopy blocks, so this addsHomotopyProblemto theprobvecmethod that returnsu0. The existing homotopy test now runs both container forms.This is needed by SciML/ModelingToolkit.jl#5202, which stores initialization SCC blocks in a vector at
AutoDespecialize, which puts small homotopy initialization problems on this path (ModelingToolkit'stest/homotopy_initialization_scc.jlhits it). On current releases it is reachable only with 6 or more blocks.Verification
Julia 1.12.6, aarch64-linux,
test/core_tests__item5.jlrun directly against this sub-library.Before the fix (test change only):
After:
GROUP=CoreandGROUP=QAforlib/SCCNonlinearSolve: bothTesting SCCNonlinearSolve tests passed. Runic: no changes.typos: clean.Not verified
x86-64; other sub-libraries (none touched). A release of SCCNonlinearSolve is needed before ModelingToolkit can depend on this.
🤖 Posted by an AI agent — harness: Claude Code 2.1.280 · model: claude-opus-5-5[1m]
Conversation: https://claude.ai/code/session_01Wt79fZeNaZxiwQ3LagMYXH
🤖 Generated with Claude Code
https://claude.ai/code/session_01Wt79fZeNaZxiwQ3LagMYXH
Risk assessment
lib/SCCNonlinearSolve. The one-line source change widens the internalprobvec(::Union{NonlinearProblem, NonlinearLeastSquaresProblem})method to also acceptSciMLBase.HomotopyProblem. The only thing it affects isSCCNonlinearProblemwith vector-stored blocks whose first block is aHomotopyProblem, which currently throws aMethodError. It adds behaviour and changes nothing that already works, so a patch bump fits SemVer.probvecis internal to SCCNonlinearSolve, andHomotopyProblemis exported by SciMLBase, so no non-public dependency internals are used. The test is strengthened, not weakened: the existing homotopy testset now loops over both a tuple and anAny[...]vector of blocks with unchanged assertions. The main downstream consumer is ModelingToolkit initialization, andModelingToolkit.jl/Initializationdownstream CI passes.f954654af8has 2 failing checks. Neither is a regression.Downgrade / Downgrade Tests - Corefails on6: Watson function | alg #2attest/Core/setup_robustnesstesting.jl:25(92 passed, 1 failed, 22 broken). It is pre-existing: the latest master push06b122951afails the same test with the same counts (run 36634513105), and so do unrelated PR branches (add-complex-roots-option,reactant-jit-solve). It passes on some master commits, so it is flaky. It is also root-package code this PR doesn't touch.downgrade-sublibraries / test (lib/NonlinearSolveFirstOrder)fails with 28 errors,TypeError: in ccall argument 5, expected SVector{2, Float64}, got Vector{Float64}inrootfind_tests__item8.jl:30. It is pre-existing: the same failure appears on the PR's merge basec76316ac7aand on masterfafb92a9deandee114a2bf3. This PR doesn't touch that sub-library.Julia prelane passing tells you nothing, because it skips build and test when Julia 1.13.0 is not an RC.probveclines on master are unchanged apart from moving to line 86.1.15.4, taggedSCCNonlinearSolve-v1.15.4and registered in General. The PR's1.15.3 → 1.15.4edit is identical to master's line, so it merges cleanly, but the fix would ship under an already-registered version. The PR needs a rebase and a bump to1.15.5, or the release that ModelingToolkit.jl PR 5202 depends on can't happen. The description predates this and doesn't mention it.🤖 Risk assessment posted by an AI agent (fleet master) — harness: Devin CLI (Mac) / fusion-claude-opus-5-5-high-sidekick-swe-2-medium; dispatched by Claude Code 2.1.285 (Claude Code) (Mac) fleet-master head, model claude-opus-5-5[1m]
Conversation: local session 3c311569-dda6-4687-bc9f-65febb212c33 (~/.claude/projects/-Users-chrisrackauckas-sandbox-master/3c311569-dda6-4687-bc9f-65febb212c33.jsonl)