Skip to content

Make RobustNonMonotoneLineSearch traceable under Reactant.@jit - #112

Draft
ChrisRackauckas-Claude wants to merge 12 commits into
SciML:mainfrom
ChrisRackauckas-Claude:agent/ls109x-traceable-nonmonotone
Draft

ChrisRackauckas-Claude wants to merge 12 commits into
SciML:mainfrom
ChrisRackauckas-Claude:agent/ls109x-traceable-nonmonotone

Conversation

@ChrisRackauckas-Claude

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

Copy link
Copy Markdown
Member

Fixes #109

Please ignore this draft until reviewed by @ChrisRackauckas.

RobustNonMonotoneLineSearch supports a bounded Reactant-traced backtracking loop and carried history buffer, allowing a compiled DF-SANE-style caller to reuse the cache. The stacked return-code tests are merged, and both the root package and Reactant test environment require SciMLBase 3.58, whose Reactant extension supports successful_retcode inside compiled callers. Compiled interpolation explicitly propagates NaN ratios so invalid trial residuals produce the same failure as the host.

The host LineSearchSolution type and host search loop are unchanged. Compiled calls return an internal TracedLineSearchSolution exposing step_size and retcode, evaluate both trial directions each iteration, and do not increment function-evaluation statistics. ReactantCore is a hard dependency (MIT); Reactant remains a test-only dependency. Finite extreme merits use a scaled norm under compile.

Changes completing this draft

  • Merged the stacked tests from ChrisRackauckas-Claude@fb7c746 without rewriting history. They check successful and failed searches with SciMLBase.successful_retcode(sol.retcode) inside @jit and after return. The compiled DF-SANE loop stops when the line search fails.
  • Set SciMLBase = "3.58" in the root and Reactant [compat] tables. QA's "3.0" and Enzyme's "2.53.1, 3.17" already allow 3.58; the developed root package enforces the effective floor in those environments.
  • Guarded both compiled interpolation ratios against XLA clamp's NaN-to-bound behavior and added an exact NaN regression. Both initial trial residuals contain NaN; comparisons cannot accept them, and NaN interpolation ratios propagate through all three iterations, so the expected result is step 1.0 / Failure. The expectations follow that host algorithm rule, with no tolerance changes.
  • Merged the current main's CI cancellation update using a normal merge commit. No force push.

Local verification

All logs and scratch environments are under <job>/scratch. Writable depot and temporary/cache directories are job-local; ~/.julia is a read fallback. Julia defaults were not changed.

export TMPDIR=<job>/tmp
export JULIA_DEPOT_PATH=<job>/scratch/depot:~/.julia
export JULIA_PKG_PRECOMPILE_AUTO=0
export JULIA_NUM_PRECOMPILE_TASKS=8
export JULIA_NUM_THREADS=4
export XDG_CACHE_HOME=<job>/scratch/cache
export PYTHONPYCACHEPREFIX=<job>/scratch/pycache
J12=julia

Failing before / passing after

The scratch/before source snapshot has the merged stacked tests, the final NaN test, the unguarded interpolation from ChrisRackauckas-Claude@c6e88d4, and the former SciMLBase compat so that 3.57.0 can resolve. setup_reactant.jl develops that snapshot, adds Reactant 0.2.291 plus the requested exact SciMLBase version, and pins SciMLBase; run_reactant.jl includes the official Reactant test file inside one parent testset. Both environments resolved ReactantCore 0.1.26. The final and before test files have identical SHA-256 hashes.

Commands actually run from the job checkout:

"$J12" --project=../scratch/env357 ../scratch/setup_reactant.jl ../scratch/before 3.57.0
"$J12" --project=../scratch/env358 ../scratch/setup_reactant.jl ../scratch/before 3.58.0
"$J12" --project=../scratch/env357 ../scratch/run_reactant.jl ../scratch/before
"$J12" --project=../scratch/env358 ../scratch/run_reactant.jl ../scratch/before

SciMLBase 3.57.0, exit 1: all three return-code consumers throw the same error:

MethodError: Cannot `convert` an object of type Reactant.TracedEnum{SciMLBase.ReturnCode.T} to an object of type SciMLBase.ReturnCode.T
Test Summary:                                                   | Pass  Fail  Error  Total     Time
Reactant regressions                                            |   55     2      3     60  9m01.6s
  compiled line search matches the host                         |   20                  20  1m11.0s
  compiled line search with NaN trial merits                    |    2     2             4     8.6s
  compiled line search with finite extreme merits               |   18                  18    16.9s
  compiled line search on a scalar residual: unit step rejected |    5                   5     4.6s
  compiled line search on a scalar residual: maxiters reached   |    5                   5     0.3s
  successful_retcode of the compiled return code: success       |    1            1      2     2.3s
  successful_retcode of the compiled return code: failure       |    1            1      2     0.1s
  compiled DF-SANE on u.^3 .- 2                                 |    3            1      4     6.4s

SciMLBase 3.58.0 on the identical unguarded snapshot, exit 1: the return-code tests and DF-SANE pass; only the NaN regression fails:

Evaluated: 0.010000000000000002 == 1.0
Test Summary:                                                   | Pass  Fail  Total     Time
Reactant regressions                                            |   64     2     66  9m09.1s
  compiled line search matches the host                         |   20           20  1m10.9s
  compiled line search with NaN trial merits                    |    2     2      4     8.5s
  compiled line search with finite extreme merits               |   18           18    17.6s
  compiled line search on a scalar residual: unit step rejected |    5            5     4.4s
  compiled line search on a scalar residual: maxiters reached   |    5            5     0.3s
  successful_retcode of the compiled return code: success       |    3            3     2.5s
  successful_retcode of the compiled return code: failure       |    3            3     0.6s
  compiled DF-SANE on u.^3 .- 2                                 |    8            8    12.5s

After developing the fixed checkout into a separate environment with the same Reactant 0.2.291 / SciMLBase 3.58.0 pins:

"$J12" --project=../scratch/env358after -e 'using Pkg; Pkg.develop(path=pwd()); Pkg.status(["SciMLBase", "Reactant", "ReactantCore", "LineSearch"])'
"$J12" --project=../scratch/env358after ../scratch/run_reactant.jl "$PWD"

Exit 0:

Info Packages marked with ⌃ have new versions available and may be upgradable.
Test Summary:        | Pass  Total     Time
Reactant regressions |   66     66  6m35.1s

Required package groups

Root manifest pinned SciMLBase 3.58.0. The Reactant subenvironment was independently pinned to 3.58.0; it resolved Reactant 0.2.294 / ReactantCore 0.1.26. Manifests are not committed.

GROUP=Core "$J12" --project=. -e 'using Pkg; Pkg.test()'
GROUP=QA "$J12" --project=. -e 'using Pkg; Pkg.test()'
GROUP=Reactant "$J12" --project=. -e 'using Pkg; Pkg.test()'

All exited 0. Actual output tails:

Test Summary:        | Pass  Total     Time
Core/armijo_tests.jl |  191    191  3m21.6s
Test Summary:                  | Pass  Total     Time
Core/custom_optimizer_tests.jl |  168    168  4m09.8s
Test Summary:            | Pass  Total   Time
Core/gpu_arrays_tests.jl |  151    151  19.9s
Test Summary:                 | Pass  Total   Time
Core/objective_merit_tests.jl |  107    107  17.4s
Test Summary:              | Pass  Total  Time
Core/optimization_tests.jl |   29     29  2.5s
Test Summary:              | Pass  Total   Time
Core/root_finding_tests.jl |  107    107  30.9s
     Testing LineSearch tests passed

Test Summary:          | Pass  Total     Time
QA/allocation_tests.jl |   30     30  1m32.9s
Test Summary: | Pass  Total   Time
QA/qa.jl      |   21     21  59.5s
     Testing LineSearch tests passed

Test Summary:              | Pass  Total     Time
Reactant/reactant_tests.jl |   66     66  9m54.8s
     Testing LineSearch tests passed

Downgrade reproduction

bash ../scratch/downgrade_repro.sh

Exit 0. This copies the earlier report's downgrade.jl, runs it on Julia 1.10.12 with the stdlib skip list, mode=deps, version 1, and no_promote=Mooncake, then runs Pkg.build(verbose=true) and:

GROUP=All "$J10" --color=no --check-bounds=yes --project=. -e 'using Pkg; Pkg.test(; coverage=false, allow_reresolve=false, force_latest_compatible_version=false)'

Resolved floors: SciMLBase 3.58.0, ReactantCore 0.1.21, SciMLTesting 2.4.0. Actual tail:

Test Summary:        | Pass  Total     Time
Core/armijo_tests.jl |  191    191  2m52.6s
Test Summary:                  | Pass  Total     Time
Core/custom_optimizer_tests.jl |  168    168  2m59.7s
Test Summary:            | Pass  Total   Time
Core/gpu_arrays_tests.jl |  148    148  11.9s
Test Summary:                 | Pass  Total   Time
Core/objective_merit_tests.jl |  107    107  10.9s
Test Summary:              | Pass  Total  Time
Core/optimization_tests.jl |   29     29  1.7s
Test Summary:              | Pass  Total   Time
Core/root_finding_tests.jl |  107    107  20.0s
Test Summary:                            | Pass  Total   Time
LineSearchesJL/custom_optimizer_tests.jl |   96     96  25.0s
Test Summary:                        | Pass  Total   Time
LineSearchesJL/root_finding_tests.jl |   80     80  14.0s
     Testing LineSearch tests passed

Formatting, spelling, docs

"$J12" --project=~/.julia/environments/runic -m Runic --check src test docs
typos src test docs Project.toml
git diff --check origin/main...HEAD

All exited 0; Runic found no formatting differences, and typos emitted no diagnostics.

The docs were built from an identical source copy with Git metadata under scratch/docs-repo, after developing that copy in its docs environment:

cd ../scratch/docs-repo
"$J12" --project=docs docs/make.jl

Exit 0. The first complete build encountered HTTP 429 on the existing ColPrac link; the unchanged retry passed with link checking enabled:

[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
[ Info: Automatic `version="0.1.19"` for inventory from ../Project.toml
┌ Warning: Documenter could not auto-detect the building environment. Skipping deployment.
└ @ Documenter ~/.julia/packages/Documenter/13nbQ/src/deployconfig.jl:95

Remote CI verification blocked

As of 2026-10-17 17:45:32 UTC, the seven validation workflows for this head remain queued (61 minutes since creation), with all nine visible checks still QUEUED. There are no new-head test outputs to assess, so no remote CI success is claimed. Main's Tests workflow is also queued; main's format, docs, and downgrade workflows have completed successfully. The scheduling cause is not diagnosed.

The separate Dependabot Auto-merge workflow reports startup_failure on this head (https://github.com/SciML/LineSearch.jl/actions/runs/39050721816). The same conclusion is present on the prior head (https://github.com/SciML/LineSearch.jl/actions/runs/37780607189); its startup cause was not diagnosed here, and it exposes no check-run annotations through the queried endpoint.

CI monitoring is handed to @ChrisRackauckas: read the runs when scheduled and investigate any regression before review/merge. The job stops with a written CI-verification blocker after completing the code and requested local checks.

Not verified

  • Remote CI results for the new head: the validation workflows are still queued after an hour.

  • Enzyme's separate test environment locally; GPU/TPU execution; Julia versions other than 1.12.7 and the 1.10.12 downgrade run.

  • A real NonlinearSolve.DFSane invocation under compile. The test carries the cache through its DF-SANE-style loop and converges in 12 steps; this does not substantiate the original issue's 11-step claim.

  • The traced path with the minimum Reactant 0.2.289 / ReactantCore 0.1.21 pairing. The host downgrade group excludes Reactant as declared in test_groups.toml.

  • Fresh independent review of this head. This job was explicitly assigned to work alone.

Reviewer decisions

The hard ReactantCore dependency and the compiled result's distinct internal container remain design choices for @ChrisRackauckas. Dispatch on host LineSearchSolution does not describe the compiled container. Compiled floating-point arithmetic can differ near acceptance thresholds, and compiled evaluation statistics differ as documented.

Original implementation: Claude Code 2.1.292 (historical commits record the model alias opus; exact model ID unknown), transcript <job>/log.txt. This follow-up: Codex CLI 0.163.0, model gpt-6.1-sol, transcript <job>/log.txt.

Links

Risk assessment

  • Risk: medium
  • Blast radius: the compiled RobustNonMonotone path and every user's minimum SciMLBase resolution; the original draft adds a hard MIT ReactantCore dependency. The host search loop and public LineSearchSolution type are unchanged.
  • Evidence: three return-code errors with SciMLBase 3.57.0 become passing checks with 3.58.0 on identical source; two NaN assertions fail before the guard and pass after; the fixed pinned regression file and required Reactant group each pass 66/66. Core, QA, downgrade All, Runic, typos, and docs passed locally as shown above.
  • Independent review: Devin CLI 3000.11.3 / fusion-claude-opus-5-5-high-sidekick-swe-2-medium rated the earlier head medium, CHANGES, with reproduced NaN and return-code blockers (Make RobustNonMonotoneLineSearch traceable under Reactant.@jit #112 (comment)). The changes here address both with discriminating tests; the new head has not been independently re-reviewed.
  • Merge: needs human review — draft, CI verification blocked by queued workflows, no fresh independent review, hard dependency and compiled result interface decisions. Never merged by this job.

🤖 Generated with Codex CLI 0.163.0 (model: gpt-6.1-sol); local job 112-codex, transcript: /log.txt

ChrisRackauckas and others added 8 commits October 7, 2026 12:14
Under ReactantCore.within_compile(), solve! runs a bounded @trace while
backtracking loop and selects the step and return code with ifelse; the
non-monotone history is a fixed-size traced vector updated with a mask,
and nsteps is traced so a traced solver loop can carry the cache. The
host path is unchanged. LineSearchSolution.retcode becomes a type
parameter so it can hold a traced return code.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Agent-Harness: Claude Code 2.1.292
Agent-Model: opus
Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/LineSearch.jl/jobs/ls109x-claude/log.txt on amdci2.julia.csail.mit.edu
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Agent-Harness: Claude Code 2.1.292
Agent-Model: opus
Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/LineSearch.jl/jobs/ls109x-claude/log.txt on amdci2.julia.csail.mit.edu
Reactant lowers norm to sqrt(dot(x, x)), which underflows to 0 or
overflows to Inf for finite residuals and changed accepted steps and
return codes. The compiled path scales by maximum(abs, x) for the initial
merit, the history and the trial merits; the host path still calls norm.
Adds compiled regression tests for small Float64/Float32 and large finite
merits.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Agent-Harness: Claude Code 2.1.292
Agent-Model: opus
Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/LineSearch.jl/jobs/ls109x-claude/log.txt on amdci2.julia.csail.mit.edu
…en compiled

Making LineSearchSolution.retcode a type parameter broke dispatch on
LineSearchSolution{Float64, Nothing, Nothing}. The compiled solve! of
RobustNonMonotoneLineSearch returns an internal TracedLineSearchSolution
with the same step_size and retcode fields instead.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Agent-Harness: Claude Code 2.1.292
Agent-Model: opus
Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/LineSearch.jl/jobs/ls109x-claude/log.txt on amdci2.julia.csail.mit.edu
SciMLTesting runs the "All" groups in one process. In the Downgrade job
(GROUP=All, Julia lts) the root test environment loads LineSearch with the
downgraded ReactantCore 0.1.21 before test/reactant is activated, so the
latest Reactant there fails to precompile (`@annotate` not defined).
in_all = false is SciMLTesting's setting for environment-specific groups;
CI still runs GROUP=Reactant as its own job on Julia 1.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Agent-Harness: Claude Code 2.1.292
Agent-Model: opus
Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/LineSearch.jl/jobs/ls109x-claude/log.txt on amdci2.julia.csail.mit.edu
…test

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Agent-Harness: Claude Code 2.1.292
Agent-Model: opus
Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/LineSearch.jl/jobs/ls109x-claude/log.txt on amdci2.julia.csail.mit.edu
traced_merit called similar on the residual buffer, which has no method
for a traced scalar. Only in-place residuals need a fresh buffer.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Agent-Harness: Claude Code 2.1.292
Agent-Model: opus
Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/LineSearch.jl/jobs/ls109x-claude/log.txt on amdci2.julia.csail.mit.edu
Covers successful and failed searches checked inside @jit and after return,
and makes the DF-SANE test loop stop on a failed line search as
NonlinearSolve's DFSane does. Needs a SciMLBase release with
successful_retcode for traced return codes.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Agent-Harness: Claude Code 2.1.292
Agent-Model: opus
Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/LineSearch.jl/jobs/ls109x-claude/log.txt on amdci2.julia.csail.mit.edu
@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

Independent review (Devin CLI 3000.11.3, model fusion-claude-opus-5-5-high-sidekick-swe-2-medium): CHANGES, risk medium.

Full review

VERDICT: CHANGES
RISK: medium

Reviewed head 1eb89a7 (#112, issue #109). Reviewer: Devin CLI, model fusion-claude-opus-5-5-high-sidekick-swe-2-medium. Risk is medium because ReactantCore becomes a hard dependency loaded by every downstream user. The host code path itself is unchanged.

Blocking findings

  1. The compiled path's result differs from the host's when a trial residual is NaN: the host returns Failure, the compiled path returns Success with a different step. Neither the tests nor the docstring cover this. (confirmed by running)

    • Where: src/robust_non_monotone.jl:210-215 (the clamp step-length updates in solve_traced) and the docstring claim at src/robust_non_monotone.jl:36-41.
    • Probe (scratch/probe/probes2.jl): nanf(u,p) = ifelse.(u .< 0, NaN, u.^2 .- 1), u = [0.5, 0.2], du = [-10.0, 3.0], one history entry, default alg and maxiters = 3.
      • Host: (1.0, Failure).
      • @jit: (0.010000000000000002, Success).
    • Root cause (scratch/probe/probes3.jl):
      • The host gives clamp(NaN, 0.1, 0.5) = NaN. Once both trial merits at α = 1 are NaN, both step lengths stay NaN forever, and the host fails for every maxiters (1, 2, 3 and 10 checked).
      • The compiled clamp lowers to an XLA clamp, and @jit clamp(ConcreteRNumber(NaN), 0.1, 0.5) returns 0.1. So the compiled search backtracks by τ_min and accepts.
    • Why it matters:
      • Under compile, out-of-domain residuals (sqrt/log of negatives) produce NaN instead of throwing. This is exactly the regime where compiled DF-SANE will hit the difference.
      • The docstring says the compiled search "follows the same acceptance rule and step-length updates as the host one". It says results "can differ from the host's in the last bits" only at the acceptance threshold. Here the return code itself flips.
    • Required change: pick one.
      • (a) Make the traced update match the host, e.g. r = α₊ * f_norm_old / (...) then α₊ * ifelse(isnan(r), r, clamp(r, τ_min, τ_max)), and likewise for α₋.
      • (b) Keep the compiled behaviour and state the NaN divergence in the docstring.
    • Either way, add this case to test/reactant/reactant_tests.jl with the host value as the expectation (for (a)) or the documented divergence (for (b)). The current test file has no NaN case. The "round-1 probes, 78/78 including NaN/Inf" cited in the PR body did not catch this.
  2. By the PR's own status the PR is not mergeable, and one sentence in the body contradicts that status. (confirmed by running)

    • Inside @jit, SciMLBase.successful_retcode(sol.retcode) throws: MethodError: Cannot convert an object of type Reactant.TracedEnum{SciMLBase.ReturnCode.T} to an object of type SciMLBase.ReturnCode.T. This is with SciMLBase 3.57.0 and Reactant 0.2.291 (scratch/probe/probes2.jl).
    • After return, the value is a Reactant.ConcreteEnum and successful_retcode returns true.
    • Contradiction: the "Details" section says "SciMLBase.successful_retcode accepts the traced code", while the status banner says it throws. The banner is right.
    • The issue's acceptance criterion is "NonlinearSolve's DFSane can reuse the line-search cache under compile". DFSane calls successful_retcode, so the criterion cannot be met until Support successful_retcode on traced Reactant return codes SciMLBase.jl#1637 is released. The SciMLBase compat bump and the test-branch commits (https://github.com/ChrisRackauckas-Claude/LineSearch.jl/tree/agent/ls109x-traced-retcode) also have to land in this PR.
    • Required change: fold those in once SciMLBase #1637 is released, and delete the contradicting sentence from the PR body.

Non-blocking findings

  1. A returned type that is not a declared public name (suspected from reading).
    • TracedLineSearchSolution (src/robust_non_monotone.jl, end of file) is what callers receive from a public function under compile.
    • It has a docstring, but it is not declared public, not exported, and not in docs/.
    • The CLAUDE.md rule is "public and documented move together". Either declare it public with a docs entry, or say explicitly in the docstring that only the field names are the API.
  2. The compiled path evaluates f at -α₋ even when +α₊ was accepted, and skips add_nf! (from reading, as the docstring documents). This is acceptable. But note that a stats passed to init silently stays at zero under compile. A compiled DFSane will therefore report nf lower than the host's.
  3. The DF-SANE "12 steps" claim is partly unchecked (suspected from reading).
    • The test's outer loop (test/reactant/reactant_tests.jl:37-59) starts from σ = dot(u,u)/dot(u,fu). NonlinearSolve's DFSane starts from σ_1.
    • The comment says the 12 steps match solve(NonlinearProblem(cube,u0), DFSane()).stats.nsteps with NonlinearSolve 4.32, and the issue says 11. I did not run NonlinearSolve.
    • The test asserts only its own host loop's 12. That is internally consistent, but it is not evidence about NonlinearSolve's DFSane.
  4. Unverified compat floor. The ReactantCore = "0.1.21" floor is exercised only on the host path (Downgrade runs GROUP=All, which excludes Reactant). Whether the traced path works with a Reactant release paired with ReactantCore 0.1.21 is unverified.
  5. Dependency choice, already flagged in the PR body. A hard dependency rather than a weakdep extension is a design call for the maintainer. ReactantCore is MIT.

What I ran

  • Probe env: scratch/probe (Julia 1.12.7, Reactant 0.2.291, ReactantCore 0.1.25, SciMLBase 3.57.0, LineSearch dev'd from the checkout).
  • probes.jl, a host-vs-@jit fuzz: 3 residuals (cube, trig, quad) × 4 alg settings (M 1/3/10, maxiters 2/4/100, n_exp 1/2, σ₁ 0.5, γ 0.5) × 0/1/4 random history entries × 3 directions, including non-descent ones.
    • 108/108 match on step, retcode and history (rtol 1e-12).
    • Also matched: Float32 u with the default Float64 alg; two consecutive solves on one cache (step, retcode, history, nsteps) for M=10 and M=1; reinit! inside @jit.
  • probes2.jl: the NaN cases (blocking 1) and successful_retcode inside and after @jit (blocking 2).
  • probes3.jl: host vs XLA clamp(NaN, …), host step trace for maxiters 1/2/3/10, and on the host: @inferred solve! passes, the return type is LineSearchSolution{Float64,Nothing,Nothing}, nsteps::Int64, and the cache type is concrete.
  • Copy of the checkout at scratch/repo_copy:
    • GROUP=Reactant julia +1.12 --project -e 'using Pkg; Pkg.test()' → 56/56, tests passed (scratch/reactant_group.log).
    • GROUP=QA → allocation_tests 30/30, qa.jl 21/21, passed (scratch/qa_group.log).
  • Failing before the fix: scratch/repo_main (main's src/ and Project.toml with the PR's test/), GROUP=Reactant → 26 passed, 11 errored (scratch/reactant_group_main.log).
    • All line-search testsets fail with "Scalar indexing is disallowed … setindex!(::TracedRArray…)".
    • DF-SANE fails with "TypeError: non-boolean (TracedRNumber{Bool})".
    • This confirms the tests fail before the fix and pass after it.
  • gh pr checks 112: all green on 1eb89a7, including "tests / Reactant (julia 1)" and "Downgrade Tests - All".
  • Read the full diff. The host path differs from main only in merit_norm (which is norm on the host), maybe_traced(0) (which is 0 on the host) and within_compile() guards. within_compile is @inline … = false in ReactantCore.

What I did not verify

Links


🤖 Posted by an AI agent — harness: Devin CLI 3000.11.3 (review), Claude Code 2.1.285 (posting) · model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium
Conversation: local Claude session 3c311569-dda6-4687-bc9f-65febb212c33 (fleet master)

ChrisRackauckas and others added 4 commits October 17, 2026 12:27
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 job 112-codex (transcript kept on the agent host)
The Reactant extension in SciMLBase 3.58 supports successful_retcode on
traced return codes. Enforce that floor in the package and Reactant env.

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 job 112-codex (transcript kept on the agent host)
Select NaN ratios explicitly before XLA clamp so invalid trials propagate
as on the host. The regression fails twice before the guard and passes
with it; the complete pinned Reactant test file passes 66 assertions.

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 job 112-codex (transcript kept on the agent host)
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 job 112-codex (transcript kept on the agent host)

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.

Make RobustNonMonotoneLineSearch traceable under Reactant.@jit

2 participants