Repository navigation
Fix endpoint saving after reinit! with numeric saveat - #4884
Conversation
Independent review (Codex CLI 0.166.0 / gpt-6.1-sol), session 01a196ac-3249-7f03-bf32-22f9ef01c5f7, reviewed head 18ea56d
Review written by the reviewer named above in a session other than the PR author's, and copied here by the posting agent without change to its findings. The posting agent did not re-run the reviewer's commands. Summary: The PR restores endpoint saving after reinit! changes tf while numeric saveat and default save_end are retained. Its regression fails on the unfixed base and passes on the reviewed head; an independent probe exposes a separate pre-existing save_end=false inconsistency suitable for follow-up. Blast radius: solution_endpoint_match_cur_integrator!, postamble!, reinitialized ODE integrators, and callback termination with numeric saveat; the save_end guard remains intact. No integration formula, tolerance, public signature, dependency, or default solver selection changes. Evidence: Blind assessment was written and SHA-256 sealed before author context. The full reinit file passes 49/49 at head; the identical head file against merge-base 0139bdc produces 45 passes and four failures, all in the added test. The added test specifically passes 18/18 at head and fails 4/18 at base. Independent analytic probes produce 62 passes, two failed comparisons and two consequent dimension errors; the discrepancy is reproduced on the base. GitHub reports no checks on this PR head. Blocking findingsNone. Non-blocking findings
What I ranAll commands were read-only upstream. Source-directory prefixes and supplied depot/temp locations are represented by relative names or environment variables below to avoid recording machine paths. Julia ran sequentially, at most three processes, with JULIA_NUM_THREADS=4, OPENBLAS_NUM_THREADS=1, JULIA_PKG_PRECOMPILE_AUTO=0, an isolated TMPDIR and the supplied shared depot followed by a colon. No registry update, Pkg.test(), full package suite or upstream write was performed. Git and metadata commands, with source commands shown relative to the repository root: gh pr view 4884 --repo SciML/OrdinaryDiffEq.jl --json number,url,state,isDraft,headRefOid,baseRefName,baseRefOid,statusCheckRollup
git fetch origin '+refs/pull/4884/head:refs/remotes/pr/4884' master
git checkout --detach refs/remotes/pr/4884
git rev-parse HEAD origin/master
git diff --stat origin/master...HEAD
git diff origin/master...HEAD
git merge-base 0139bdc23709266d93ebadf377d63484886d1478 HEAD
gh pr view 4884 --repo SciML/OrdinaryDiffEq.jl --json title,body,commits
git log -1 --no-merges --format=%B
gh pr checks 4884 --repo SciML/OrdinaryDiffEq.jl
gh run list --repo SciML/OrdinaryDiffEq.jl --branch master --event push --limit 5 --json databaseId,headSha,conclusion,url,nameGit inspection/fetch/checkout and metadata-list commands exited 0; the individual gh pr checks exit code was not retained because it was followed by the run-list command, and its output reported no checks. The PR was open and not a draft. HEAD matched the target; the live PR metadata supplied Base above, which is also the merge-base. The fetched origin/master was d035621. The newest non-merge commit contains neither Agent-Harness nor Agent-Model trailers. Root/nested AGENTS.md and CLAUDE.md searches found no repository instructions. Read the complete diff, finalization callers, reinit!, saveat queue construction, saving documentation and test wiring. Julia version: 1.13.2. Exact Julia command arguments, using local review harness names: timeout 3600 julia +1.13.2 --startup-file=no --compiled-modules=existing -O1 run-head.jl
timeout 3600 julia +1.13.2 --startup-file=no --compiled-modules=existing -O1 --project=env-head run-head-verify.jl
timeout 3600 julia +1.13.2 --startup-file=no --compiled-modules=existing -O1 --project=env-base run-base-verify.jlThe first process activated a temporary environment, developed the checkout, added DiffEqCallbacks and ODEProblemLibrary, and instantiated without automatic precompilation. It exited 1 before executing tests because the harness attempted to import transitive dependency OrdinaryDiffEqCore directly. The remaining processes accessed it through OrdinaryDiffEq.OrdinaryDiffEqCore; printed source locations confirmed the intended head/base code. Dependencies were identical between environments (including SciMLBase 3.58.0, DiffEqCallbacks 4.19.5 and ODEProblemLibrary 1.5.5); the base environment redirected local package paths to a git archive of the merge-base. Head process: included the entire test/Integrators_I/reinit_test.jl, including the added test unchanged. Output: Base process: first printed saving-schedule transitions and reproduced the positive-direction save_end=false discrepancy, then included the identical head reinit file against unfixed base packages. Output: CI metadata inspected: no PR checks, hence no failed PR job logs to inspect. Recent master metadata shows failures for CI, Sublibrary CI and IntegrationTest, and success for Downgrade and Documentation. These are metadata observations only; I did not inspect their failed logs or claim that any CI failure is inherited by the PR. G1: the added regression uses the independent analytic solution u(t)=t, and the probe checks exp(t). G2: the changed numeric-saveat endpoint branch executed locally; this diff introduces no GPU, AD, tracing or MPI implementation. G3: the regression explicitly solves, reinitializes with a new tf and solves again, exercising cache reuse. What I did not verifyI did not run GPU, AD, Reactant, MPI, stochastic/delay integrators, alternative Julia versions/platforms, heavy downstream suites, the separate saving/tstops test files, or a full package suite. I did not independently reproduce the author's claimed Julia 1.12.7 runs. No PR CI execution is available. The head saving-schedule type-transition reports were not reached after the independent probe failed; only base transition outputs are available. Reverse-direction reproduction of the pre-existing save_end=false discrepancy was observed at head; the base reproduction checked the positive direction only. The new regression and all existing tests in its file were executed unchanged on both versions. No further Julia runs were made after the third process. 🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5 |
With numeric
saveatand defaultsave_end, changingtfthroughreinit!can finish at2.0while the saved solution stops at1.875. The documented default includes the final condition for numericsaveat.We now recognize numeric
saveatwhen deciding whether to save the endpoint, so saving doesn't depend on the original problem's end time. The regression checks both integration directions and explicitsave_endsettings, and the existing reinitialization, saving, andtstopstests pass.Tested on upstream commit
59ba40e4b5bbae713d8df7b792f6ea62f033ff78(Julia 1.12.7).— ChipLab