Skip to content

Use public APIs for AutoDePSpecialize wrappers - #1129

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/fix-nlsbase-wrapfun-public-api
Jul 30, 2026
Merged

Use public APIs for AutoDePSpecialize wrappers#1129
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/fix-nlsbase-wrapfun-public-api

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Jul 30, 2026

Copy link
Copy Markdown
Member

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

Summary

  • remove the private wrapfun_iip_opaque extension hook and construct the opaque-parameter callable through the existing generic wrapper plus public RespecializeParams.OpaqueVoid
  • construct the inference-preserving wrapper through the documented typed FunctionWrappersWrapper constructor, deriving its cache storage type through the public cache-mode API
  • use the public SciMLBase.problem_type trait and preserve the symbolic-system guard without depending on SciMLBase.has_sys
  • cover ForwardDiff dual calls and symbolic systems with both populated and empty SymbolCaches
  • bump NonlinearSolveBase to 2.38.2 and require FunctionWrappersWrappers 1.9.3, where the typed public constructor is available

No ExplicitImports ignore or allowlist was added.

Regression boundary

With Julia 1.12.6 and SciMLBase 3.40.0:

Thus #1107 is the exact introducing commit. The branch is now rebased onto 451a02348 (#1131).

Validation scratchpad

All checks below were rerun after the rebase onto current master:

  • NONLINEARSOLVE_TEST_GROUP=NonlinearSolveBase_Core julia +1.12 --project=. -e "using Pkg; Pkg.test()" — 162/162 pass; resolver selected SciMLBase 3.40.0
  • NONLINEARSOLVE_TEST_GROUP=NonlinearSolveBase_QA julia +1.12 --project=. -e "using Pkg; Pkg.test()" — 20/20 pass; resolver selected SciMLBase 3.40.0
  • targeted AutoDePSpecialize test with FunctionWrappersWrappers 1.9.3, NonlinearSolveBase 2.38.2, and SciMLBase 3.40.0 — 30/30 pass
  • whole-repository Runic --check --diff . — exit 0, no diff
  • hosted CI for 885c02c1b8a2ae8df3a2d229f2330842056601bb

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

CI status update — 2026-07-30 08:30 EDT

The NonlinearSolveBase target lanes are all successful:

Current aggregate: 95 checks = 81 successful, 3 skipped, 7 failed, and 4 still running. The remaining jobs are ModelingToolkit InterfaceI, InterfaceII, Initialization, and OrdinaryDiffEq Regression.

The seven failures are two independent clean-master/dependency classes, not failures of this patch:

  1. Six root Core OS/version lanes fail the existing NLLS Hessian Implementing ForwardDiff.hessian through NonlinearLeastSquaresProblem #445 test with UndefVarError: issquare not defined in LinearSolveForwardDiffExt under registered LinearSolve 5.3.0. I reproduced this locally from clean NonlinearSolve master cb25573a1 with the official Core group, Julia 1.12.6, and SciMLBase 3.40.0. The LinearSolve source fix is already merged in LinearSolve #1125 but is not yet released.
  2. SCCNonlinearSolve_QA reports stale dependency Reexport (19/20). I reproduced that exact result locally from clean master with the official SCC QA group. It is being investigated separately so it is not folded into this PR.

Local target verification remains 162/162 NonlinearSolveBase_Core, 20/20 NonlinearSolveBase_QA, 30/30 at the FunctionWrappersWrappers 1.9.3 floor, and a clean whole-repository Runic check. No ignore, allowlist, skip, or test weakening was added.

I will update this after the remaining jobs settle and perform the promised 09:32 EDT audit.

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Terminal CI update — 2026-07-30 08:48 EDT

The matrix has settled at 95 checks: 83 successful, 3 skipped, 9 failed, 0 pending. All five NonlinearSolveBase target lanes listed above remain successful.

The nine failures reduce to three independent baseline/dependency classes:

  1. Six root Core lanes: registered LinearSolve 5.3.0 raises UndefVarError: issquare not defined in LinearSolveForwardDiffExt in the existing NLLS Hessian Implementing ForwardDiff.hessian through NonlinearLeastSquaresProblem #445 test. Clean NonlinearSolve master reproduces this with the official Core group. The source fix is merged in LinearSolve #1125 and awaits release.
  2. One SCC QA lane: stale direct dependency Reexport (19/20). Clean NonlinearSolve master reproduces this with the official SCC QA group; a separate bisect/fix investigation is active.
  3. Two ModelingToolkit downstream lanes: Initialization and InterfaceII fail DDE tests because DelayDiffEq calls an obsolete OrdinaryDiffEqCore.DEOptions constructor. Initialization reports 765 pass/9 errors/12 broken; InterfaceII reports 972 pass/1 error/7 broken. Both have the same constructor-arity stack and no failure in the changed AutoDePSpecialize wrapper path. This is also under a separate clean-master/bisect repair investigation.

Relevant downstream coverage that passed includes ModelingToolkit InterfaceI and OrdinaryDiffEq Regression. No CI suppression or unrelated fix is being added to this PR.

I will still perform the promised timestamped 09:32 EDT audit, including branch freshness and final status readback.

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Scheduled 09:32 EDT audit and post-rebase update:

Upstream master advanced to 061cac4fdfff568d45f25981ef5b1036d5f0d54c via #1130 (the NonlinearSolveBase 2.38.1 release) after the first CI run. I audited the remote feature branch, rebased cleanly, advanced the package version to 2.38.2, reran the checks, and pushed 6d1b9a398a579c663b082426978ad7777450aad0 using an exact force-with-lease after confirming there were no contributor commits on the remote branch.

Post-rebase local validation on Julia 1.12.6:

  • official NonlinearSolveBase_Core, SciMLBase 3.40.0: 162/162 pass
  • official NonlinearSolveBase_QA, SciMLBase 3.40.0: 20/20 pass
  • targeted AutoDePSpecialize floor environment, FunctionWrappersWrappers 1.9.3 + NonlinearSolveBase 2.38.2 + SciMLBase 3.40.0: 30/30 pass
  • whole-repository Runic --check --diff .: exit 0 with no output

The first hosted run (for superseded SHA 3fcda874) ended at 83 success, 9 failure, and 3 skipped; all five NonlinearSolveBase target lanes were green. Its failures were independently reproduced on clean master: six root Core lanes expose the registered LinearSolve 5.3 issquare regression, SCC QA is addressed separately by draft #1131, and the two ModelingToolkit failures bisect to OrdinaryDiffEq commit c017e6c452 and are tracked by open General registry PRs #162780/#162781 pending a DelayDiffEq release. Hosted CI has restarted for 6d1b9a398 and the prior totals do not apply to the new SHA.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude
ChrisRackauckas-Claude force-pushed the agent/fix-nlsbase-wrapfun-public-api branch from 6d1b9a3 to 885c02c Compare July 30, 2026 15:31
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Second hosted-run terminal audit and second rebase:

Hosted CI for superseded SHA 6d1b9a398 completed 95/95 checks: 83 success, 3 skipped, and 9 failures. All five NonlinearSolveBase target lanes passed, as did both CUDA lanes. The failures were the independently reproduced clean-master issues: six root Core copies of LinearSolve 5.3 UndefVarError: issquare not defined, two ModelingToolkit copies of the registered DelayDiffEq/OrdinaryDiffEqCore DEOptions constructor mismatch, and SCC QA.

The final fetch then found #1131 had merged as upstream commit 451a02348, fixing the SCC QA issue and leaving this branch one commit behind. I audited the unchanged remote feature tip, rebased cleanly, reran all local validation, and lease-pushed new SHA 885c02c1b8a2ae8df3a2d229f2330842056601bb:

  • official NonlinearSolveBase_Core, SciMLBase 3.40.0: 162/162 pass
  • official NonlinearSolveBase_QA, SciMLBase 3.40.0: 20/20 pass
  • exact floor environment, FunctionWrappersWrappers 1.9.3 + NonlinearSolveBase 2.38.2 + SciMLBase 3.40.0: 30/30 pass
  • whole-repository Runic --check --diff .: exit 0, no diff

Hosted CI has restarted for 885c02c1b; the 83/9/3 totals belong only to the superseded SHA.

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review July 30, 2026 15:38
@ChrisRackauckas
ChrisRackauckas merged commit 2715773 into SciML:master Jul 30, 2026
23 of 25 checks passed
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Scheduled 11:43 EDT ancestry audit:

#1129 was merged by @ChrisRackauckas at 2026-07-30 15:38:20 UTC as master commit 2715773bfac6df2deee34b7e86d38d9ea2568ccf. The merge commit and the locally validated PR head 885c02c1b8a2ae8df3a2d229f2330842056601bb have the identical tree 80679de4709e0d5d21d1ced1d9ca09aff66315fd; git diff --exit-code HEAD upstream/master is clean. Thus the merged source is exactly the source for which the post-#1131 local Core 162/162, QA 20/20, floor 30/30, and Runic checks passed.

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