Skip to content

Store FIRK stages for dense output with extrapolant = :constant - #4924

Open
singhharsh1708 wants to merge 4 commits into
SciML:masterfrom
singhharsh1708:firk-constant-extrapolant-dense
Open

singhharsh1708 wants to merge 4 commits into
SciML:masterfrom
singhharsh1708:firk-constant-extrapolant-dense

Conversation

@singhharsh1708

@singhharsh1708 singhharsh1708 commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

With extrapolant = :constant, the dense output of RadauIIA3, RadauIIA5, RadauIIA9 and AdaptiveRadau is the collocation polynomial again instead of the step's starting value, so saveat and sol(t) inside a step are right. GaussLegendre now stores its stages the same way, but its dense output is the generic Hermite interpolant, which does not read them, so its results are unchanged.

The stages in integrator.k were stored after an accepted step only when extrapolant != :constant. That guard dates from when they served only as the next step's predictor; the interpolants now read them too. They are now stored after every accepted step, and :constant still only sets the next step's Newton guess to zero, as it already zeroes z and k at the start of each step, so the steps and their values are unchanged.

On u' = cos(t) u over (0, 4) at reltol 1e-8 with saveat = 0.01, the :constant error of the four Radau methods goes from 2.0e-2 to 1.2 on master to 2.8e-8 to 1.8e-6, in place and out of place, with the same step counts; for RadauIIA3, RadauIIA5 and RadauIIA9 that is about what the default extrapolant gives. With #4935 merged, AdaptiveRadau stores its stages resampled to the max-stage nodes its interpolant expects, under :constant too: 4.5e-7 against 7.2e-7 for the default extrapolant on this problem. The new testset fails on master for the four Radau methods (GaussLegendre was not affected), and FIRK Core and QA pass on Julia 1.12 on the head merged with current master.

This is the extrapolant half of #4912; smooth_est = false needs its own change. Merging master after #4935 conflicted in AdaptiveRadau's storage; the merge keeps #4935's resampling and drops its extrapolant guard. FIRK goes to 2.8.11, the same version as #4920, #4934 and #4942, so whichever merges later needs the next patch.

Risk assessment

  • Risk: medium-low (ML2: dense output under the non-default extrapolant = :constant option of the FIRK solvers; steps and step counts are unchanged).
  • Blast radius: saveat and sol(t) inside a step for RadauIIA3, RadauIIA5, RadauIIA9 and AdaptiveRadau with extrapolant = :constant; default-extrapolant results are bit-identical to master. No public signature changes.
  • Evidence: the new testset fails on master for the four Radau methods (0.020 to 1.15) and passes on the merged head (2.8e-8 to 1.8e-6); storing raw stages instead of the resampled ones gives 0.25 to 4.7 for AdaptiveRadau, so the merge resolution is what makes it right. FIRK QA passes.
  • Independent review: Antigravity CLI 1.5.10 (model gemini-4-carbon-high) rated it medium-low (ML2), unknown confidence: MERGE with no blocking findings (Store FIRK stages for dense output with extrapolant = :constant #4924 (comment))

AI Disclosure: Claude assisted with this change.

@singhharsh1708

Copy link
Copy Markdown
Member Author

🤖 Automated comment from an AI agent running as @singhharsh1708, not written or reviewed by the account holder.

Independent review (Codex CLI 0.163.0, model gpt-6.1-sol, reasoning effort high): MERGE, risk medium-high (MH1). Reviewed head: fe0328d3004c34016a3ac529a2e8203b6a6138e7.

Full review

VERDICT: MERGE
PR: #4924
Round: 1
Head: fe0328d
Base: 45ff46a
Slot: 1
Reviewer: Codex CLI 0.163.0 / gpt-6.1-sol
Session: 01a1975d-fc30-7f50-962f-95d66a8e660a
Reviewed: 2026-11-01T14:00:50Z
Summary: The PR retains accepted FIRK stages so Radau interpolation works with extrapolant = :constant. The analytic regression fails on base and passes on head, with unchanged step endpoints in supplementary comparisons.

Risk

medium-high (MH1: changes interpolation results, an OrdinaryDiffEq main lane, for the constant FIRK predictor.)

Risk assessment

  • Risk: medium-high (MH1: restores dense interpolation across four Radau algorithms and both cache forms.)
  • Blast radius: FIRK stage storage for RadauIIA3, RadauIIA5, RadauIIA9, AdaptiveRadau and GaussLegendre. Default predictor logic and step control remain unchanged.
  • Evidence: Changed test file passes on head; its new regression fails eight cases on base. Supplementary probes exercise scalar, in-place and out-of-place problems; recorded endpoint histories match exactly across 60 configurations. FIRK Core and QA CI pass.
  • Verdict: MERGE
  • Round: 1
  • Blocking priorities: none
  • Merge: merge

Blocking findings

None.

Non-blocking findings

None.

What I ran

Commands below abbreviate the supplied Julia runner as $JRUN, the merge-base worktree as $BASE, and the permitted probe directory as $PROBES.

Read pr.json first, inspected the diff and surrounding initialization, predictor, interpolation and saving code, then recorded MH1 before reading the description and comments. No root AGENTS.md or CLAUDE.md was present.

Read-only verification commands, all exit 0:

git rev-parse HEAD
git rev-parse origin/master
git merge-base origin/master HEAD
git diff origin/master...HEAD
git diff --check origin/master...HEAD
git log -1 --no-merges --format=%B
gh pr view 4924 --repo SciML/OrdinaryDiffEq.jl --json number,url,state,isDraft,headRefOid,baseRefName,baseRefOid
gh issue view 4912 --repo SciML/OrdinaryDiffEq.jl --json number,title,body,state,url

HEAD matched the supplied SHA; live PR state was OPEN, non-draft, at that head. The merge-base matched the supplied Base SHA. Local origin/master was d03562190d2beb2c94da8d565b222263c418ce4a. Commit trailers contained neither author harness nor model.

Copied the complete changed test file into base, without modifying source files:

TEST=lib/OrdinaryDiffEqFIRK/test/ode_firk_tests.jl
cp "$TEST" "$BASE/$TEST"
cmp "$TEST" "$BASE/$TEST"

Both commands exited 0.

Ran this identical command once from head and once from base, through the supplied runner using Julia 1.13.1, four Julia threads and one OpenBLAS thread:

"$JRUN" --project=lib/OrdinaryDiffEqFIRK -e 'using TestEnv; TestEnv.activate(); using Test, SafeTestsets; println("Julia ", VERSION); include("lib/OrdinaryDiffEqFIRK/test/ode_firk_tests.jl")'

Head exit 0, output tail:

Dense output with extrapolant = :constant | 10  10  11.3s

Base exit 1, output tail:

Dense output with extrapolant = :constant | 2  8  10  12.2s
ERROR: LoadError: Some tests did not pass: 2 passed, 8 failed, 0 errored, 0 broken.

The eight Radau failures at lib/OrdinaryDiffEqFIRK/test/ode_firk_tests.jl:351 had errors between 0.0200578 and 1.15192, against < 1e-5. Both GaussLegendre cases passed. Earlier tests in the file completed successfully on both trees.

Supplementary commands:

# From head:
"$JRUN" --project=lib/OrdinaryDiffEqFIRK "$PROBES/probe.jl" "$PROBES/head-endpoints.txt"

# From base:
"$JRUN" --project=lib/OrdinaryDiffEqFIRK "$PROBES/probe-base.jl" "$PROBES/base-endpoints.txt"

cmp "$PROBES/head-endpoints.txt" "$PROBES/base-endpoints.txt"

The probes cover all five algorithms, three state/function forms, both predictors and fixed/adaptive stepping, checking retained sol(t) against exp(sin(t)). AdaptiveRadau uses fixed order five.

  • Head probe exit 1: 120 passed, 0 failed, 60 errored. All 60 accuracy and 60 end-time assertions passed; my unqualified successful_retcode call caused the 60 errors.
  • Base probe imports that helper explicitly; exit 1: 156 passed, 24 failed, 0 errored. The 24 failures are constant-predictor Radau interpolation cases.
  • Snapshot comparison exit 0, no output: step times, endpoint values and accepted/rejected counts match exactly across all 60 configurations.

Final head working tree was clean. Base contained only the copied test-file change.

Inspected supplied CI excerpts and check URLs:

What I did not verify

No package-wide or heavy downstream suites were rerun. GPU hardware and outer AD/sensitivity paths were not exercised locally; no GPU kernels or AD rules changed. Variable-order AdaptiveRadau retained history, callbacks and reinit! were not separately probed.

The supplementary head probe’s return-code assertions were not successfully executed because of my missing qualification; its accuracy and end-time assertions passed. The unmatched ModelingToolkit CI failure was not reproduced locally.

AUTHOR_GRADE: {"task":"bugfix","score":5,"difficulty":2,"rounds":1,"author_harness":"unknown","author_model":"unknown","note":"Focused stage-storage fix with an independent analytic regression: eight cases fail on base and all ten pass on head. Endpoint histories and step counts match across 60 supplementary configurations; the task is a small local solver-cache correction."}


🤖 Posted by an AI agent · harness: Claude Code · model: claude-opus-5-5 (coordinating gpt-6.1-sol reviewers)
Review: unreviewed
Session: 01a1975d-fc30-7f50-962f-95d66a8e660a

@ChrisRackauckas

Copy link
Copy Markdown
Member

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

PR: #4924

Reviewed head: fe0328d
Raw SHA-256: 74bde34285b1e7f275f520508cf508a4adc100fd2e614ab49d4ef185ba39fb84
Source SHA-256: cada1649d8da72527b47332544368cbd1a39031455d578be1bba00bb23a1d008
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1d256-5d73-72e0-b7ea-ac44c46825ed
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes

Risk assessment

  • Risk: medium-low (ML2)
  • Verdict: CHANGES
  • Reviewed head: fe0328d

Review report

VERDICT: CHANGES
Round: 1
Head: fe0328d
Slot: 1
CI: CI is not green (regress:SciMLSensitivity.jl/Core4/1 / Downstream Tests - Core4; ModelingToolkit.jl/InterfaceI/1 / Downstream Tests - InterfaceI)
Session: 01a1d256-5d73-72e0-b7ea-ac44c46825ed

Risk

medium-low (ML2: numerical fix confined to non-default FIRK extrapolation; independent analytic regression fails before and passes after; ten tested default-path fingerprints are unchanged)

Blocking findings

  • [P1] Downstream regression status needs verification. .github/workflows/Downstream.yml:23 and .github/workflows/Downstream.yml:25 select the two jobs reported as regressions in the review input. I did not inspect their logs or reproduce those failures. Passing the FIRK suite does not establish the policy's no-downstream-regressions gate. The owning head must resolve these failures or provide head/default-branch reproductions establishing that this diff does not cause them. This is a verification blocker, not a confirmed code defect introduced by this PR.

  • Verdict: CHANGES

  • Round: 1

  • Blocking priorities: P1

  • Deferred P2 issues: None supplied.

Non-blocking findings

No introduced code defect was confirmed. The probes exposed these pre-existing problems; they should be handled separately:

  • lib/OrdinaryDiffEqFIRK/src/firk_interpolants.jl:107: AdaptiveRadau historical dense output uses the current cache's stage count/tableau. For u' = u, u0 = [1, 2], (0, 4), reltol=1e-8, abstol=1e-10, stages change from 3 to 5. Against exp(t) .* u0 on 803 points, head errors are 0.475903 OOP / 0.449380 IIP, with either extrapolant. The merge-base default extrapolant gives the same errors. Suggested fix: retain the stage count/tableau for each saved interval and test interpolation across order changes. The connection to the mutable cache is inferred from reading; the numerical counterexample is confirmed by running.

  • lib/OrdinaryDiffEqFIRK/src/firk_perform_step.jl:2433: GaussLegendre OOP with the same RHS and matrix u0=[1.0 2.0; 3.0 4.0] throws DimensionMismatch: array could not be broadcast to match destination, on both head and merge-base implementation. Suggested fix: flatten or reshape the stage residual consistently with the flat Newton vector, with a matrix-state regression test.

What I ran

AI reviewer: codex-cli 0.164.0, model gpt-6.1-sol; actual local session ID above, no session URL available.

All Julia tests preserved the supplied layered JULIA_DEPOT_PATH, used the requested job TMPDIR, two Julia threads, one precompile task, and an 8 GiB systemd scope. Execution and all temporary source changes were confined to scratch/; the checkout remains clean.

  • git diff origin/master...HEAD, relevant implementations/tests and risk criteria; git diff --check origin/master...HEAD: clean. No root AGENTS.md/CLAUDE.md files were present. Newest commit has no Agent-Harness/Agent-Model trailers.
  • julia --version: 1.13.2. No committed Julia manifest or .julia-version was present. Created one scratch environment from FIRK's declared dependencies/test extras, compat and local source dependencies; resolved SciMLBase 3.58.0 and reused that manifest for every comparison.
  • uv run --locked python --version: Python 3.15.0, with --locked has no effect when used outside of a project. No Python project/uv.lock exists here, so this does not establish a project-locked Python environment.
  • GROUP=Core julia --startup-file=no --project=../scratch/env ../scratch/run_core.jl, invoking Pkg.test("OrdinaryDiffEqFIRK"; allow_reresolve=false): 337/337 pass — FIRK 201, time reversal 16, Krylov 98, LHL 22.
  • julia --startup-file=no --project=../scratch/env ../scratch/probes.jl: adaptive dense accuracy, forced rejected steps, backward solves and repeated interpolation 80/80 pass, worst absolute error 1.80118e-6. Refinement 47 pass / 3 fail under fixed nonlinear tolerances. Constant OOP RadauIIA9 endpoint errors for dt=1/8,1/16,1/32 are 5.55991e-10, 1.92214e-9, 1.67502e-8, exactly identical before/after; the IIP fine-grid dense error reaches 3.39018e-12. These failures do not establish a regression or an asymptotic-order defect; this was not a clean probe run.
  • ../scratch/followups.jl: event/reinitialization 40/40 pass; scalar/matrix probes 18 pass / 1 error, the GaussLegendre counterexample above. That error stopped this script; remaining checks were run separately.
  • ../scratch/final_checks.jl: Float32 20/20 pass. With only the scratch production step file restored from merge base 45ff46afe9919acf32e9af8058705073e0995503, the added regression gives 2 pass / 8 fail (errors 0.0201–1.1519, threshold 1e-5). Restoring the head gives 10/10 pass. Baseline diagnostics reproduce the counterexamples above and the unchanged refinement results. Control checks 6/6 pass.
  • Compared serialized default-extrapolant (t,u,naccept,nreject,njacs) fingerprints for all five algorithms, IIP/OOP: 10/10 identical between merge-base and head step implementations. Six constant-RadauIIA9 endpoint-error records also match exactly. Scratch production source was restored byte-for-byte; git status --porcelain is empty.

What I did not verify

The supplied downstream regressions and their CI logs; QA/formatter/docs checks; other Julia versions or platforms. No PR body, comments, reviews, earlier same-head opinions or author risk rating were consulted. No GitHub writes were made.

AUTHOR_GRADE: {"task":"bugfix","score":4,"difficulty":2,"rounds":1,"author_harness":"unknown","author_model":"unknown","note":"Independent analytic regression fails 8/10 before and passes 10/10 after; all 337 FIRK Core assertions pass and ten default-path fingerprints match. Additional counterexamples predate the diff; supplied downstream regressions remain unverified."}

Head link: fe0328d


🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol
Conversation: local session 01a1d256-5d73-72e0-b7ea-ac44c46825ed (no session URL)

@singhharsh1708

Copy link
Copy Markdown
Member Author

Both downstream failures are green on master and these runs predate that, so I merged master to re-run. The GaussLegendre matrix-state DimensionMismatch is on master too and gets its own issue; the AdaptiveRadau dense-output part is #4935.

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

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

PR: #4924

Reviewed head: ead0e59
Raw SHA-256: eab51395da22b62857b6e29a0840b9b9e811f81e930b4c58890161eb6c8c6f77
Source SHA-256: 3e9f029fba438af3ab4520a00e8ede970e4c377704304c45b942862cd0bca5a9
Source: standard-review-v1 (harness-log)
Reviewer session: devin-list:mango-string
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes

Risk assessment

  • Risk: medium-low (ML2)
  • Verdict: CHANGES
  • Reviewed head: ead0e59

Review report

VERDICT: CHANGES
Round: 2
Head: ead0e59
Slot: 1
CI: CI is not green (regress:SciMLSensitivity.jl/Core3/1 / Downstream Tests - Core3; SciMLSensitivity.jl/Core4/1 / Downstream Tests - Core4; tests / AD (julia 1, ubuntu-latest) / Tests - AD (Julia 1); tests / ODEInterfaceRegression (julia lts, ubuntu-latest) / Tests - ODEInterfaceRegression (Julia lts))
Session: devin-list:mango-string
Reviewer: Devin 3000.12.57; model: fusion-gpt-6-1-sol-high-sidekick-swe-2-medium

Risk

medium-low (ML2: numerical correction confined to the non-default extrapolant=:constant option of FIRK solvers; independent analytic tests fail before and pass after, and ten default-option solutions match bit-for-bit).

Blocking findings

  • [P1] Needs verification: the supplied final-head CI status reports four regressions. The affected FIRK Core suite passes locally, but that does not establish that AD, ODEInterfaceRegression, or SciMLSensitivity Core3/Core4 have no regressions. Under the review instructions' code-only boundary I did not retrieve CI logs or PR discussion, so I cannot attribute these failures to this change or dismiss them as pre-existing. Resolve those checks, or provide observed same-environment head/default-branch reproductions establishing no regression, before merge. This is a verification blocker, not a confirmed source-code defect.
  • Blocking priorities: P1

Non-blocking findings

  • lib/OrdinaryDiffEqFIRK/test/ode_firk_tests.jl:350-351: the new assertion checks accuracy only over returned samples, without checking successful completion or the full requested time grid. My augmented reproduction confirms all ten current cases succeed and return all 401 points, so this is not an observed false pass at this head. Add return-code and final-time assertions to preserve that guarantee.
  • lib/OrdinaryDiffEqFIRK/src/firk_interpolants.jl:103-117: inherited variable-order interpolation limitation, confirmed by running. For the exact quadratic solution [1+t+t^2, 2-t-t^2], AdaptiveRadau(extrapolant=:constant), dt=dtmax=1/32, and dense midpoint queries, the final cache has seven stages and historical interpolation errors reach 0.0182493 in-place and 0.0186622 out-of-place, despite endpoint errors below 1.3e-14. The interpolant reads the cache's current stage/tableau metadata for every interval. Loading the unmodified default-branch step implementation also fails this probe, and the default :dense results are unchanged by the PR. This is not an introduced regression; retain per-interval interpolation metadata and add an order-transition accuracy regression in a separate fix.
  • lib/OrdinaryDiffEqFIRK/src/firk_perform_step.jl:1873: inherited mass-matrix defects, confirmed on a clean archive of origin/master, not attributed to this PR. With M=Diagonal([2,3]), the same quadratic solution and indexed saveat output, nine cases return inaccurate results and out-of-place AdaptiveRadau raises DimensionMismatch at z = mass_matrix * w (a 2-by-2 matrix versus an outer vector of three stage states). The PR and default-branch step implementations give identical failures; Radau indexed interpolation errors reach 0.0732421875, and GaussLegendre endpoint error is 4.0. Follow up separately on stage-wise mass multiplication, mass-aware endpoint derivatives for interpolation, and GaussLegendre mass-matrix handling. No issue was filed under this read-only review grant.

What I ran

All scratch paths below are under <local path>. I set TMPDIR to that directory's tmp before commands and preserved the inherited JULIA_DEPOT_PATH unchanged.

  • git diff origin/master...HEAD, git diff --check origin/master...HEAD, source/test inspection, and newest-commit trailer extraction. Three changed files; whitespace check passes; newest commit has no Agent-Harness or Agent-Model trailers. No repository-root or tracked nested AGENTS.md/CLAUDE.md is present. The checkout remains clean.
  • uv run --locked python --version prints Python 3.13.13 and warns that --locked has no effect outside a project. This Julia checkout declares no Python project or uv.lock; no locked Python environment is available to validate.
  • julia --version reports Julia 1.12.4. The checkout has no tracked Julia manifest or interpreter pin. Tests use a clean git archive HEAD in scratch/suite, with a resolved manifest retained there and local monorepo [sources]. The tested step implementation's SHA-256 matches the original checkout.

Affected suite:

R=<local path>
P="$R/scratch/suite/lib/OrdinaryDiffEqFIRK"
GROUP=Core julia --project="$P" -e 'using Pkg; Pkg.test(; julia_args=["--check-bounds=yes"], force_latest_compatible_version=false)'

Exit 0. Observed summaries: FIRK Tests 201/201; Time Reversal 16/16; Krylov 98/98; LHL Factorization 22/22. Final output: Testing OrdinaryDiffEqFIRK tests passed. Full output: scratch/firk_core_test.log.

Reviewer-authored analytic probes use this command form, with each mode executed separately:

julia --startup-file=no --check-bounds=yes --project="$P" "$R/scratch/review_probes.jl" regression
  • Mode regression: 40/40 pass, including the committed numerical assertion plus return-code, final-time, and 401-sample checks. Maximum head error is 1.8115e-6. Repeating with BASE_PERFORM="$R/scratch/base_firk_perform_step.jl" loads the exact origin/master step file into the module in a fresh process: exit 1, 32 pass and eight fail, with Radau accuracy errors 0.0201 to 1.1519. GaussLegendre passes both versions. Logs: scratch/head_regression.log, scratch/base_regression.log.
  • Mode defaults: captured complete step grids, endpoint arrays, return codes, and dense samples for all five algorithms and both in-place/out-of-place RHS forms. The base-implementation comparison passes 10/10 isequal assertions. Logs: scratch/head_defaults.log, scratch/base_defaults.log; frozen head data: scratch/head_defaults.bin.
  • Mode polynomial: exact-quadratic forward/backward, fixed/adaptive, stored/in-place dense interpolation, conservation, and repeated-query checks pass 240/240; continuous-root/live-integrator checks pass 30/30. Polynomial errors are at most 1.2e-14 and root-time errors at most 2.3e-16. The final mass-matrix/indexed-output testset fails with 16 pass, eight fail, one error; these failures were investigated rather than suppressed. Full output: scratch/probes_polynomial.log.
  • Mode order: head and base runs each exit 1 with four pass/four fail, exposing the inherited order-transition limitation described above. Logs: scratch/head_order.log, scratch/base_order.log.
  • julia --startup-file=no --check-bounds=yes --project="$P" "$R/scratch/mass_probes.jl" constant: head and base step implementations each produce nine pass, nine fail, one error. The base implementation with dense instead of constant also fails. A clean archive of default-branch SHA 535e41fa0db0f651d5792962f0599d08d3e5d158, using its own unchanged source tree and the retained dependency manifest, reproduces nine pass, nine fail, one error. Logs: scratch/head_mass.log, scratch/base_mass.log, scratch/base_mass_dense.log, scratch/inherited-investigation/base-master-mass-probes.log.
  • The required inherited-failure investigation traces the earliest textual candidate for AdaptiveRadau's outer-vector multiplication to c887941d65992304a85dbd8e75e3cdf302ae30d6. Both that historical commit and its parent were attempted with the unchanged probe, but fail before executing cases because the modern manifest references OrdinaryDiffEqDifferentiation, absent from those historical trees. This is not a completed runtime bisect or a confirmed introduction SHA. Artifacts: scratch/inherited-investigation/REPORT.md and accompanying historical logs.
  • julia -m Runic --check passes for the changed test file. It exits 1 for the step file, with exactly two formatting hunks in unchanged code; the default-branch file has the same two hunks. git diff origin/master...HEAD | typos - exits 0 with no findings. No source was reformatted.

What I did not verify

  • The four supplied failing CI jobs, their logs, or head-versus-base failure causes; this is the blocking verification gap.
  • Full root AD/ODEInterfaceRegression/Downstream suites, SciMLSensitivity, QA, docs, GPU, or reverse-mode AD. No new dependency, export, public signature, tolerance relaxation, disabled assertion, or skipped test appears in this diff.
  • A fully locked project toolchain: none is supplied by this checkout. Julia 1.12.4 and the retained resolved scratch manifests are the actual tested environment.
  • An executable historical bisect for the inherited mass-matrix defect. No fixes, commits, pushes, issues, GitHub comments, or checkout edits were made. All launched processes finished. No PR body, comments, earlier reviews, or author rating was inspected.

AUTHOR_GRADE: {"task":"bugfix","score":4,"difficulty":3,"rounds":2,"author_harness":"unknown","author_model":"unknown","note":"The narrow stage-storage correction passes the affected FIRK Core suite and an independently reproduced analytic regression that fails on the default-branch step implementation; ten default-option solutions are bit-for-bit unchanged. Supplied CI regressions remain unverified, and broader probes reveal inherited numerical limitations rather than new regressions."}

Head link: ead0e59


🤖 Posted by an AI agent — harness: Devin 3000.12.57 · model: fusion-gpt-6-1-sol-high-sidekick-swe-2-medium
Conversation: local session devin-list:mango-string (no session URL)

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

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

PR: #4924

Reviewed head: 2a83711
Raw SHA-256: 9201799eef62fa633085af36cf2d92df71e3f700a1b8b587f977c45859554cf4
Source SHA-256: df3b07b05c417e78640a16c3614b0054a06c52df1bf391165163a11302db4c66
Source: standard-review-v1 (harness-log)
Reviewer session: 8ae0f36c-f013-48dd-9074-633cb40d49fc
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes
Redaction: ran (substitutions=0)

Risk assessment

  • Risk: medium-low (ML2)
  • Verdict: MERGE
  • Reviewed head: 2a83711

Review report

VERDICT: MERGE
Round: 3
Head: 2a83711
Slot: 1
CI: CI unreadable; review only; merge gates unchanged
Session: 8ae0f36c-f013-48dd-9074-633cb40d49fc
Reviewer: Antigravity CLI 1.5.10; model: gemini-4-carbon-high

Risk

medium-low (ML2: fixes stage storage for dense interpolation under the non-default extrapolant = :constant option of peripheral OrdinaryDiffEqFIRK solvers; independent analytic test fails before and passes after, and default extrapolant = :dense results are bit-for-bit unchanged)

Blocking findings

None.

Non-blocking findings

  • lib/OrdinaryDiffEqFIRK/test/ode_firk_tests.jl:365-366: confirmed by reading and running, the new testset checks maximum(maximum(abs.(u .- exact(t))) for (t, u) in zip(sol.t, sol.u)) < 1.0e-5 without asserting SciMLBase.successful_retcode(sol) or sol.t[end] == 4.0 (an early abort returning only t = 0.0 would evaluate 0.0 < 1.0e-5). Confirmed by running on this head that all 10 cases return ReturnCode.Success with all 401 saveat points (0.0:0.01:4.0), and all 8 Radau cases fail on origin/master (0.0201 to 1.1519). Add @test SciMLBase.successful_retcode(sol) and @test sol.t[end] == 4.0 in a follow-up.

What I ran

All commands ran on the build host with TMPDIR set to the review workspace tmp directory, scratch work isolated in scratch/, JULIA_DEPOT_PATH preserved unchanged, and zero modifications to the repository checkout.

  • Diff, delta, and repository rules inspection (confirmed by running):
    • git diff origin/master...HEAD and git diff --check origin/master...HEAD: 3 changed files (lib/OrdinaryDiffEqFIRK/Project.toml, lib/OrdinaryDiffEqFIRK/src/firk_perform_step.jl, lib/OrdinaryDiffEqFIRK/test/ode_firk_tests.jl, +52/-60 lines), exit 0 on whitespace check. No AGENTS.md or CLAUDE.md exists in the checkout; newest merge commit has no Agent-Harness or Agent-Model trailers.
    • Re-reviewed delta.diff since Round 2 (ead0e597b3c93ea762cb1fa6a334599050775a35): the author merged upstream/master (02aee933b8059c590585ac80ac9e59961abb3ec9), resolving the merge conflict with #4935 (fdd8abcec, Store AdaptiveRadau dense output at the max-stage nodes) by removing the if alg.extrapolant != :constant guard around the tabs[end].c (_stage_weight) projection loops in AdaptiveRadauConstantCache (lib/OrdinaryDiffEqFIRK/src/firk_perform_step.jl:1995-2004) and AdaptiveRadauCache (lib/OrdinaryDiffEqFIRK/src/firk_perform_step.jl:2349-2357), and bumping lib/OrdinaryDiffEqFIRK/Project.toml from 2.8.10 to 2.8.11. All non-FIRK hunks in delta.diff (DelayDiffEq, DiffEqBaseEnzymeExt) match origin/master identically (git diff origin/master..HEAD --stat shows only the 3 FIRK files).
  • Interpreters, formatting, and spelling (confirmed by running):
    • uv run --locked python --version: prints Python 3.13.13 with warning: '--locked' has no effect when used outside of a project (no uv.lock or pyproject.toml exists in the repository).
    • julia --version: julia version 1.12.4.
    • git diff origin/master...HEAD | typos -: exit 0, no findings.
    • julia --startup-file=no -m Runic --check on archived copies of the changed files: lib/OrdinaryDiffEqFIRK/test/ode_firk_tests.jl exits 0; lib/OrdinaryDiffEqFIRK/src/firk_perform_step.jl has zero formatting diffs in any PR-touched hunk (the only 2 Runic hunks are at untouched lines 2471 and 2664, identical on origin/master).
  • Affected test suite (OrdinaryDiffEqFIRK Core and QA on clean git archive HEAD in scratch/suite_head, confirmed by running):
    • GROUP=Core julia --startup-file=no --project=scratch/suite_head/lib/OrdinaryDiffEqFIRK -e 'using Pkg; Pkg.test(; julia_args=["--check-bounds=yes"], force_latest_compatible_version=false)': exit 0 (FIRK Tests 206/206, FIRK Time Reversal Tests 16/16, FIRK Krylov Tests 98/98, FIRK LHL Factorization Tests 22/22).
    • GROUP=QA julia --startup-file=no --project=scratch/suite_head/lib/OrdinaryDiffEqFIRK -e 'using Pkg; Pkg.test(; julia_args=["--check-bounds=yes"], force_latest_compatible_version=false)': exit 0 (Allocation Tests 5/5 pre-existing broken, JET Tests 1/1 pass, Aqua + ExplicitImports 21/21 pass).
  • Adversarial numerical probes comparing HEAD vs origin/master (scratch/probes.jl, scratch/defaults_compare.jl, scratch/ad_probe.jl, scratch/check_cb.jl, confirmed by running with --check-bounds=yes and identical resolved dependency manifests):
    • Analytic regression & dense interpolation (Probe 1): tested all 5 FIRK solvers (RadauIIA3, RadauIIA5, RadauIIA9, AdaptiveRadau, GaussLegendre) × (IIP, OOP) with extrapolant = :constant on du = cos(t) * u (exact(t) = exp(sin(t)) .* [1.0, 2.0]), checking ReturnCode.Success, full 401-point saveat = 0.01 grid, out-of-place sol(t) and in-place sol(out, t) dense queries. HEAD passes 70/70 (max errors 7.62e-12 to 1.81e-6). origin/master fails 24/70 (all 8 Radau solver configurations fail across saveat, OOP dense, and IIP dense with max errors 0.0201 to 1.1519; GaussLegendre uses Hermite fallback k[1:2] and matches 7.21e-11 IIP / 7.62e-12 OOP on both).
    • Round 3 merge delta — AdaptiveRadau(extrapolant = :constant) across stage-count transitions (Probe 2): tested stage-count transition 3 -> 7 on an exact cubic polynomial ([1 + t + t^2 - 0.5t^3, 2 - t - t^2 + 0.25t^3]), scalar AdaptiveRadau with default and custom (min_order, max_order) pairs, and fixed-step adaptive = false. HEAD passes 18/18, with cubic order-transition dense errors 1.64e-14 (IIP) and 1.60e-14 (OOP) — resolving Round 2's variable-order interpolation limitation (0.0182 on Round 2's head; origin/master fails 8/18 with cubic order-transition errors 0.0698 IIP / 0.0701 OOP and fixed-step error 0.2223).
    • Default extrapolant = :dense bitwise identity (defaults_compare.jl): serialized retcode, sol.t, sol.u, and 401 dense sol(t) evaluations across all 5 solvers × (IIP, OOP) on origin/master and compared against HEAD: 41/41 isequal assertions pass bit-for-bit.
    • ForwardDiff AD through dense output (ad_probe.jl): ForwardDiff.gradient of an objective summing abs2.(sol(t)) at interior non-step times across all 5 solvers × (IIP, OOP) × (:dense, :constant) against the analytic gradient: 20/20 pass (rtol = 1e-5).
    • Step rejections and ContinuousCallback (Probe 3 & check_cb.jl): forced step rejections (nreject 4 to 20509) preserve dense accuracy on HEAD (8/8 pass, max errors 1.30e-9 to 3.58e-7), and ContinuousCallback zero-crossing root errors with extrapolant = :constant drop from 0.0097–0.858 on origin/master to 1.19e-10–2.74e-9 on RadauIIA5/RadauIIA9/AdaptiveRadau (and 0.858 -> 0.00298 on RadauIIA3, whose coarse step count on autonomous linear systems is pre-existing on origin/master).

What I did not verify

  • GitHub CI on the Round 3 head: CI was supplied as CI unreadable; review only; merge gates unchanged at launch, so live CI check statuses on this merge commit were not inspected (live final-head CI remains enforced by clean-merge.sh). Regarding Round 2's prior-head CI regressions (AD, ODEInterfaceRegression, SciMLSensitivity Core3/Core4), git grep extrapolant confirms no test in the repository outside the new FIRK testset passes extrapolant = :constant to a FIRK solver, and removing if alg.extrapolant != :constant is a semantic no-op whenever alg.extrapolant != :constant (confirmed bit-for-bit isequal across all 10 default solver runs locally, plus 20/20 ForwardDiff dense-output gradient checks); full root AD, ODEInterfaceRegression, and external SciMLSensitivity suites were not run locally.
  • Locked project toolchain: the checkout contains no uv.lock (Python is unused) and no tracked Julia Manifest.toml or interpreter version pin; local verification used Julia 1.12.4 on the build host.

AUTHOR_GRADE: {"task": "bugfix", "score": 4, "difficulty": 2, "rounds": 3, "author_harness": "unknown", "author_model": "unknown", "note": "Clean removal of the erroneous extrapolant != :constant guard on accepted-step stage storage across all 10 FIRK perform_step! methods, and clean Round 3 conflict resolution with #4935 that brings variable-order AdaptiveRadau(extrapolant = :constant) dense output to machine precision across stage-count changes while keeping default extrapolant = :dense outputs bit-for-bit identical; minor omission of explicit retcode/final-time assertions in the added test."}

Head link: 2a83711


🤖 Posted by an AI agent — harness: Antigravity CLI 1.5.10 · model: gemini-4-carbon-high
Conversation: local session 8ae0f36c-f013-48dd-9074-633cb40d49fc (no session URL)

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.

3 participants