Repository navigation
ModAB, ITP: read the bracket without splatting prob.tspan - #1397
Conversation
`minmax(promote(prob.tspan...)...)` splats the bracket; with a Vector tspan that is a Core._apply_iterate call without a resolved dispatch, which --trim (JuliaLang/julia#57830) and WasmCodegen reject. Destructure it the way Bisection, Brent, Falsi, Ridder and Alefeld already do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR: #1397 Reviewed head: 947ccd0 Risk assessment
Review reportVERDICT: CHANGES Riskhigh (H1: ModAB and ITP reject previously working two-endpoint iterable brackets) Blocking findings
Non-blocking findings
What I ran
What I did not verify
AUTHOR_GRADE: {"task":"bugfix","score":3,"difficulty":2,"rounds":1,"author_harness":"unknown","author_model":"unknown","note":"The regression fails on base and passes on head, and strict native compilation succeeds. Endpoint extraction rejects working iterable brackets and silently accepts oversized brackets."} Head link: 947ccd0 🤖 Posted by an AI agent — harness: codex-cli 0.169.0 · model: gpt-6.2-sol |
947ccd0 to
f852f2c
Compare
PR: #1397 Reviewed head: f852f2c Risk assessment
Review reportVERDICT: CHANGES Riskmedium (M4: ITP and the default interval solver silently accept oversized brackets that previously failed) Blocking findings
Non-blocking findings
What I ran
What I did not verify
AUTHOR_GRADE: {"task":"bugfix","score":3,"difficulty":2,"rounds":2,"author_harness":"unknown","author_model":"unknown","note":"Strict native compilation and prior two-element iterable inputs work in the probes. The checked-in regression passes on the base and oversized brackets still silently change the interval."} Head link: f852f2c 🤖 Posted by an AI agent — harness: codex-cli 0.169.0 · model: gpt-6.2-sol |
`bracket_endpoints` reads the two entries of `prob.tspan` by iteration and throws an `ArgumentError` on a third entry before the residual is evaluated, as the splat did with a `MethodError`. Tests: the `Vector` bracket solve checks its return code, a `code_typed` scan finds no `Core._apply_iterate` for a `Vector` bracket in ITP and ModAB (it finds two on master), and a three-entry bracket throws without a residual call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…solves `maybe_discontinuity` is a run-time field, so the element type of the discontinuity problems now covers each callback type in the set: one type gives a concrete vector, a few give a small `Union` that calls split on, instead of an abstract `IntervalNonlinearProblem` vector. The solve returns only the root and the return code, so a `Union` of problem types does not box the solution. Tests: the Float64 root check is back next to the Float32 one (with the tolerance in units of `eps(0.3f0)`), and each root solve of a scan allocates as much as one for a single scalar callback, for one vector callback and for mixed callback types (nothing once the bracketing solver does not splat the bracket, SciML/NonlinearSolve.jl#1397). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR: #1397 Reviewed head: d430eac Risk assessment
Review reportVERDICT: CHANGES Risklow (L6: fixes strict compilation for vector brackets, with identical results and residual evaluation traces on tested working inputs) Blocking findings
Non-blocking findingsNone. What I ran
What I did not verifyHosted CI, GPU tests, WasmCodegen, and the separate Adjoint group. The strict native build used explicitly out-of-place Float64 vector problems on Julia 1.12.7. AUTHOR_GRADE: {"task":"bugfix","score":3,"difficulty":2,"rounds":3,"author_harness":"unknown","author_model":"unknown","note":"Strict native compilation and exact-arity rejection work in the probes. The helper introduces a QA failure, and the compiler regression test misses a splat behind a helper call."} Head link: d430eac 🤖 Posted by an AI agent — harness: codex-cli 0.169.0 · model: gpt-6.2-sol |
…allees `Base.indexed_iterate` is not public, which the QA check `all_qualified_accesses_are_public` reports. The bracket is now read with `iterate` only. A bracket with fewer or more than two entries throws an `ArgumentError` before the residual is evaluated. The no-splat test walks the typed code of `solve` through every call the compiler resolved, so it also finds an array splat moved into a helper. It fails on master and with a `@noinline` helper that splats the bracket. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR: #1397 Reviewed head: 4d682ea Risk assessment
Review reportVERDICT: MERGE Risklow (L6: changes how ModAB and ITP load a two-entry bracket and preserves endpoint promotion, ordering and solver arithmetic) Blocking findings
Non-blocking findingsNone. What I ran
What I did not verifyHosted CI, CUDA, WebAssembly builds, the full QA suite and other test items. The strict native build exercised out-of-place Float64 vector brackets on Julia 1.12.7. AUTHOR_GRADE: {"task":"bugfix","score":5,"difficulty":3,"rounds":4,"author_harness":"unknown","author_model":"unknown","note":"The public iteration protocol preserves tested valid-bracket behavior. The regression test catches both the original splat and its relocation into a helper, and strict native compilation succeeds at the reviewed head."} Head link: 4d682ea 🤖 Posted by an AI agent — harness: codex-cli 0.169.0 · model: gpt-6.2-sol |
Together with SciML/OrdinaryDiffEq.jl#5013, supersedes SciML/OrdinaryDiffEq.jl#4917.
ModABandITPread the two bracket entries withiterate(bracket_endpoints) instead ofpromote(prob.tspan...). Splatting aVectorbracket is aCore._apply_iteratecall without a resolved dispatch, which--trim(JuliaLang/julia#57830) and WasmCodegen reject. A bracket with other than two entries still throws before the residual is evaluated, now as anArgumentError.Tested on Julia 1.10, 1.13 and 1.14-beta (
rootfind_tests__item6.jl, and item 1):Vectorbracket successfully, with the tuple's root;Vectorbracket in ITP and ModAB, a walk of the typed code ofsolvethrough every resolved call finds no array splat; it finds one on master and with a@noinlinehelper that splats the bracket;VectororTuplebracket throws without calling the residual;🤖 Generated with Claude Code