Skip to content

Declare RobustTrustRegionLinsolve public in NonlinearSolveBase - #1357

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/public-robust-tr-linsolve
Oct 5, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/public-robust-tr-linsolve

Conversation

@ChrisRackauckas-Claude

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

Copy link
Copy Markdown
Member

Summary

NonlinearSolveFirstOrder explicitly imports RobustTrustRegionLinsolve from NonlinearSolveBase for TrustRegionRobust, but the sentinel was never declared public. That makes FirstOrder QA ExplicitImports fail whenever FirstOrder is exercised (including as a transitive SublibraryCI target). Mark it public with Compat.@compat, keep the existing docstring, and add a docs @docs entry beside MoreTrustRegionDescent.

Ignore until reviewed by @ChrisRackauckas

Evidence

Local Julia 1.10.12:

NonlinearSolveBase QA: tests passed, exit=0
NonlinearSolveFirstOrder QA: tests passed, exit=0

(logs under cig-nls-firstorder-downgrade/logs/nsb_qa_r2.log and fo_qa_r2.log)

What was not verified

  • Full Documentation build beyond the @docs entry
  • Downstream packages outside this monorepo

Risk assessment

🤖 Generated with Cursor Agent CLI (model: auto) — session: local transcript ~/sandbox/goals/ci-green/work/cig-nls-firstorder-downgrade/log.txt on amdci2

Made with Cursor

Risk assessment (independent review, head b27a4e0)

  • Risk: low
  • Blast radius: Adds NonlinearSolveBase.RobustTrustRegionLinsolve to the public set (@compat public plus a @docs entry). No runtime change.
  • Evidence: On Julia 1.12, FirstOrder QA on master gives 1 error (all_explicit_imports_are_public: RobustTrustRegionLinsolve); on this PR it passes 20/20. The 1.10 logs in the body don't exercise the check, because SciMLTesting skips the public-API checks below 1.11. Other red checks are pre-existing or are fixed by Convert Krylov Vector seeds to SVector for Enzyme VJP in SciMLJacobianOperators #1356.
  • Independent review: Devin CLI (Mac) / fusion-claude-opus-5-5-high-sidekick-swe-2-medium rated it low, high confidence: it is a 3-line public declaration of a name that TrustRegionRobust's docstring and error message already direct users to.
  • Merge: needs human review (new public API, which is @ChrisRackauckas's call; the next NonlinearSolveBase release should be minor, 2.55.0). Merge back-to-back with Convert Krylov Vector seeds to SVector for Enzyme VJP in SciMLJacobianOperators #1356.

🤖 Risk assessment posted by an AI agent (fleet master) — harness: Devin CLI 3000.11.3 (Mac) / fusion-claude-opus-5-5-high-sidekick-swe-2-medium (adversarial review.sh run); dispatched by Devin CLI 3000.11.3 (Mac) fleet-master caretaker
Conversation: local transcript ~/.local/share/devin/cli/transcripts/speckle-whale.json (Chris's Mac)

Risk assessment

  • Risk: low
  • Blast radius: Only adds NonlinearSolveBase.RobustTrustRegionLinsolve to the public API, via @compat(public, ...) and a @docs entry in docs/src/native/descent.md. Runtime behaviour does not change. The type and its docstring already exist in lib/NonlinearSolveBase/src/descent/more_trust_region.jl. Making it public is additive (a minor-level SemVer change), but the PR doesn't bump NonlinearSolveBase's version, so the next release needs to be a minor bump. No code reaches into dependencies' private internals, and no tests are weakened.
  • Evidence: The head commit b27a4e0 is 1 ahead and 0 behind master; its merge base is the master tip, 61f721b. Checks: 92 pass, 5 fail, 1 skipped. Each failure matches master exactly, so all 5 are pre-existing and none is a regression:
    • tests / Core (julia lts, macos-latest) and tests / Core (julia lts, ubuntu-latest): same solve!() inference error at test/Core/core_tests__item3.jl:27 (8 pass / 1 error) as master run 37120597074.
    • sublibraries / lib/SCCNonlinearSolve / Julia 1 / Tests - Core: same Vector-form SCCNonlinearProblem with FunctionWrappers failure at core_tests__item4.jl:100 (12 pass / 1 fail) as master run 37120597132.
    • sublibraries / lib/NonlinearSolveFirstOrder / Julia 1 / Tests - Core: same 21 Enzyme ThunkCallError errors at rootfind_tests__item8.jl:30 (1113 pass / 21 error) as master run 37100130077. The commits between that run and the master tip only touch SCCNonlinearSolve. The open Convert Krylov Vector seeds to SVector for Enzyme VJP in SciMLJacobianOperators #1356 targets this failure.
    • downgrade-sublibraries / test (lib/NonlinearSolveFirstOrder): same 28 Enzyme errors (1512 pass / 28 error) as master run 37120596986.
    • The fix itself shows in CI. sublibraries / lib/NonlinearSolveFirstOrder [QA] / Julia 1 fails on master (run 37100130077) and passes on this PR. NonlinearSolveBase [QA], the Documentation build (which covers the new @docs entry), and format-check all pass.
    • Gaps in the description: the 1.10 local logs it cites cannot exercise the public-API check, which only runs on Julia 1.11 and later. CI on Julia 1 covers that check. The new line also sits between the export blocks instead of with the other @compat public lines at about lines 117–159, which is only cosmetic.
  • Independent review: Devin CLI (Mac) / fusion-claude-opus-5-5-high-sidekick-swe-2-medium rated it low, high confidence: the change is a 2-line public declaration plus a docs entry for an existing, already-documented type, it fixes FirstOrder QA, and every red check fails identically on master.
  • Merge: needs human review (no test regressions, but the PR adds a new public name, which is @ChrisRackauckas's call, and the body explicitly says "Ignore until reviewed by @ChrisRackauckas"; NonlinearSolveBase's next release should be a minor bump)

🤖 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 Devin CLI 3000.11.3 (Mac) fleet-master caretaker, model Fusion (claude-opus-5-5 medium + swe-2 medium)
Conversation: local transcript ~/.local/share/devin/cli/transcripts/speckle-whale.json (Chris's Mac)

FirstOrder imports this sentinel for TrustRegionRobust; mark it public via
Compat.@compat and document it next to MoreTrustRegionDescent so ExplicitImports
QA no longer treats the access as non-public.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Cursor Agent <[email protected]>
Agent-Harness: Cursor Agent CLI
Agent-Model: auto
Agent-Session: ~/sandbox/goals/ci-green/work/cig-nls-firstorder-downgrade/log.txt (local transcript, amdci2)
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review October 5, 2026 01:03
@ChrisRackauckas
ChrisRackauckas merged commit 89f4c1b into SciML:master Oct 5, 2026
95 of 100 checks passed
ChrisRackauckas referenced this pull request Oct 13, 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>
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