Skip to content

Run SDIRK's QA files in its QA test group - #4674

Open
singhharsh1708 wants to merge 4 commits into
SciML:masterfrom
singhharsh1708:sdirk-qa-group
Open

singhharsh1708 wants to merge 4 commits into
SciML:masterfrom
singhharsh1708:sdirk-qa-group

Conversation

@singhharsh1708

@singhharsh1708 singhharsh1708 commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

OrdinaryDiffEqSDIRK's QA test group now runs its QA files (qa/allocation_tests.jl, qa/qa.jl, qa/jet.jl) and no longer reruns the Core tests.
test/runtests.jl activated the QA environment under GROUP=QA but never included those files, and it ran the Core files for every group, so the [QA] lane only repeated Core inside the QA environment; the layout now matches OrdinaryDiffEqSDC's.
Two checks fail on Julia 1 once they run. ExplicitImports flags SDIRK's import of stage_predictor, which #4539 added to NonlinearSolve's solver-author interface without declaring it public; it is now public there, with a docstring and a docs entry (NonlinearSolve 2.9.10). JET 0.12 reports the stage variables of the unrolled out-of-place IMEX step, assigned under s >= n guards, as possibly undefined (594 reports, all inside _perform_step_oop!), so from Julia 1.12 on the test filters out exactly those and fails on any other report; on 1.10 it runs unfiltered.
Locally on 1.13, the lane CI runs, SDIRK's qa.jl passes 20/20 and JET 1/1; on 1.12 NonlinearSolve's qa.jl passes 40/40; on 1.10 through Pkg.test the group gives JET 1/1, Aqua and ExplicitImports 18/18 and 30 allocation checks that were already @test_broken, with no Core testsets. Found in the review of #4582.

Risk assessment

  • Risk: low (L1: test-runner and QA changes, plus declaring an existing function public with a docstring).
  • Blast radius: OrdinaryDiffEqSDIRK/test/runtests.jl now runs the QA files under GROUP=QA and no longer reruns Core there; qa/jet.jl filters the JET reports inside _perform_step_oop! on Julia 1.12 and later. In OrdinaryDiffEqNonlinearSolve, stage_predictor is added to the @public list with a docstring and a docs entry, which makes it part of the declared solver-author interface. No solver code changes; default solvers and numerics are unaffected.
  • Evidence: SDIRK qa.jl passes 20/20 and JET 1/1 locally on 1.13; NonlinearSolve qa.jl 40/40 on 1.12; on 1.10 the group gives JET 1/1, Aqua and ExplicitImports 18/18 and 30 allocation checks that were already @test_broken. The JET filter covers 594 reports, all inside _perform_step_oop!, and fails on any other report. The red NonlinearSolve Core lanes stop at the same Newton Tests error (Newton BackTracking test fails on master since 498c765ccc (calc_dt_propose! dt rounding) #4681) as master; the other red checks (SciMLSensitivity Core2 and Core4, ProbNumDiffEq, AD lts, both GPU lanes) also fail on master.

AI Disclosure: Claude assisted with this change.

@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 low.

Full review

VERDICT: CHANGES
RISK: low

The runtests.jl restructure is correct, and so is making stage_predictor public. I ran both and they hold up. The one problem is how JET gets re-enabled: the PR marks the whole test as broken on the only CI lane that runs it, so JET still checks nothing in CI.

Blocking findings

  1. lib/OrdinaryDiffEqSDIRK/test/qa/jet.jl:8: broken = VERSION >= v"1.12" switches JET off on the one CI lane that runs QA. (confirmed by running)
    • The SublibraryCI matrix runs SDIRK's [QA] group only on "Julia 1", which is currently 1.13.1 with JET 0.12.3. You can see this in the PR's CI job https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/38071956371/job/114271203408, which reports JET | Broken 1. No lts QA lane exists.
    • So with this PR, JET still enforces nothing for SDIRK in CI. Any new real :typo-mode report (undefined global, misspelled name) anywhere in the package is absorbed into the same "broken" result. The "passes on 1.10" claim covers a lane that CI does not run.
    • I ran report_package(OrdinaryDiffEqSDIRK; target_modules=(OrdinaryDiffEqSDIRK,), mode=:typo) on Julia 1.12.7 (master src) and on 1.13.0 (PR src), both with JET 0.12.3.
      • Both give exactly 594 reports.
      • Every one is a JET.UndefVarErrorReport ("local variable zN/kN may be undefined") inside _perform_step_oop!(…, ::ESDIRKIMEXConstantCache, …) in generic_imex_perform_step.jl, between lines 1498 and 2457.
      • Those are the intentionally local-declared, if s >= i / is_imex-guarded stage variables at generic_imex_perform_step.jl:1438-1444. They are false positives, and the PR comment describes them accurately.
      • Logs: scratch/jet/jet_1.12.log, scratch/jet13/jet_1.13.log.
    • The fix can target just that known pattern. I ran this probe on 1.13 (scratch/jet13/probe.jl):
      r = report_package(OrdinaryDiffEqSDIRK; target_modules=(OrdinaryDiffEqSDIRK,), mode=:typo)
      isknown(rep) = rep isa JET.UndefVarErrorReport &&
          any(f -> f.linfo isa Core.MethodInstance && f.linfo.def.name === :_perform_step_oop!, rep.vst)
      @test isempty(filter(!isknown, JET.get_reports(r)))
      It printed total=594 known=594 other=0 and the @test passed.
    • Required change: replace the blanket broken = VERSION >= v"1.12" with a check that filters out only the known _perform_step_oop! may-be-undefined reports (as in the probe, or an equivalent JET report filter). JET then stays live for the rest of the package on Julia 1.12+. Keep test_package unfiltered on JET 0.9 (Julia < 1.12), where it passes as-is.
    • If the maintainers would rather keep broken, that decision belongs to them, and the PR body should say plainly that JET is not enforced on any CI lane.

Non-blocking findings

  1. lib/OrdinaryDiffEqNonlinearSolve/src/type.jl:459-464: the new docstring describes the return value wrongly. (confirmed by reading)
    • It says stage_predictor returns "the stage-value guess alg carries". It actually returns the predictor callable (or nothing).
    • apply_predictor! calls the result: pred(uprev, p, t + c*dt, dt) / pred(upred, uprev, p, …) at nlsolve.jl:299-312. The field docs at type.jl:58-60 also describe it as a callable.
    • Suggested wording: "Return the callable alg carries for seeding each stage solve of nlsolve! (see the predictor keyword), or nothing if it has none."
  2. The version bump is a patch for a public-API addition. Declaring a new public name is a SemVer-minor addition, but the PR bumps OrdinaryDiffEqNonlinearSolve 2.9.9 → 2.9.10. I have not checked which convention this repo follows for @public additions, so I am only flagging it.
  3. SDIRK's compat bound on OrdinaryDiffEqNonlinearSolve stays at 2.9.8. SDIRK's ExplicitImports check now passes only against ≥ 2.9.10. The monorepo path sources cover this in CI, so it is harmless there. A registry-resolved QA run with 2.9.8/2.9.9 would fail on stage_predictor.
  4. Scope. The PR touches two packages (NonlinearSolve's public API and SDIRK's test layout). The NonlinearSolve change is the minimum needed for the newly enabled qa.jl to pass, so the coupling is justified.
  5. CI reds not caused by this PR.
    • lib/OrdinaryDiffEqNonlinearSolve / Julia 1|lts / Core fails with Newton Tests: LineSearchException: Search direction is not a direction of descent. The same failure appears on master at b1d7885 (run 38118333996).
    • The PR's NonlinearSolve change is a @public line plus a docstring, so it cannot affect that test.
  6. runtests.jl restructure. It matches lib/OrdinaryDiffEqSDC/test/runtests.jl. GROUP=QA now runs only the Allocation, Quality Assurance and JET testsets (no Core testsets appeared in either log), and GROUP=Core runs only Core. One consequence: the Core lane now also runs on prerelease Julia. Previously the Core includes were outside any guard, so in practice nothing changes.

What I ran

  • gh pr view 4674, git diff origin/master...HEAD, gh pr checks 4674. I also read the CI logs for SDIRK [QA] Julia 1 (JET broken, QA 20/20, Alloc 30 broken) and NonlinearSolve Core lts, and the master run 38118333996 (same Newton failure).
  • Fail-before for the ExplicitImports claim. On a copy of origin/master, with a runtests that only activates the QA env and includes qa/qa.jl, on Julia 1.13.0:
    • Result: 19 passed, 0 failed, 1 errored.
    • The error: all_explicit_imports_are_public: stage_predictor is not public in OrdinaryDiffEqNonlinearSolve. This confirms the PR's stated reason for the @public change.
    • Log: scratch/qa_master_1.13.log.
  • GROUP=QA Pkg.test() on the PR copy, Julia 1.10.12 (JET 0.9.18): Allocation 30/30 broken, Quality Assurance 18/18 pass, JET 1/1 pass. Log: scratch/qa_1.10.log.
  • GROUP=QA Pkg.test() on the PR copy, Julia 1.13.0 (JET 0.12.3): Allocation 30/30 broken, Quality Assurance 20/20 pass, JET 1 broken. Log: scratch/qa_1.13.log.
    • These two runs reproduce the PR body's numbers, except that I used 1.13 rather than 1.12 for the full group.
  • JET report_package in :typo mode on 1.12.7 and 1.13.0: 594 reports each, all may-be-undefined in _perform_step_oop!.
  • Filter probe (scratch/jet13/probe.jl): with the known pattern removed, 0 reports remain.
  • Inspected generic_imex_perform_step.jl:1400-1500 (guarded local stage variables) and nlsolve.jl:285-320 (how stage_predictor is used).

What I did not verify

  • I did not run the full GROUP=QA group on 1.12 (I ran 1.10 and 1.13), and I did not run the Core group. Only test files changed for SDIRK, and the PR's CI Core lanes are green.
  • I did not build the docs or run Runic or typos locally. The PR's Documentation, Runic and Typos CI jobs pass.
  • I did not check Julia 1.11 with JET 0.9 (no CI lane runs it).
  • I did not check whether the repo convention is patch or minor bumps for @public additions.
  • The linked issue: the PR body links none (it cites the review of Read a scalar mass matrix instead of its missing diagonal #4582). No AGENTS.md/CLAUDE.md exists at the repo root.

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-Claude

Copy link
Copy Markdown
Member

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

Independent review (Codex CLI 0.166.0 / gpt-6.1-sol), session 01a1980b-0be5-7352-8001-790ad51b0e51, reviewed head 3803bf5

  • Verdict: CHANGES
  • Risk: high (H4: a function-wide undefined-variable suppression weakens verification without establishing that real errors remain detectable).
  • Round / slot: 1 / 1
  • Blocking priorities: P2

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: Wires the SDIRK QA group and documents the public stage_predictor accessor. The JET exception also hides real undefined-variable defects and needs narrowing.

Blast radius: SDIRK QA routing and static analysis of out-of-place IMEX steps; public solver-author metadata in OrdinaryDiffEqNonlinearSolve. Solver calculations are unchanged.

Evidence: Blind diff recorded and hashed before author context. SDIRK Core (current and LTS Julia), SDIRK QA, and NonlinearSolve QA CI passed; local head QA passed 20/20, while the same file on the merge-base libraries raised NonPublicExplicitImportsException for stage_predictor (18 pass, one docs-fixture failure, one error). An independent real-typo control confirmed that the exact filter suppresses a genuine UndefVarErrorReport (one raw report becomes zero).

Blocking findings

  1. [P2] lib/OrdinaryDiffEqSDIRK/test/qa/jet.jl:8 — confirmed by running: known accepts any JET.UndefVarErrorReport with any _perform_step_oop! stack frame. It never checks the undefined variable, failing location, method signature, or owning module. The exact predicate discarded the genuine missing-global report from a synthetic _perform_step_oop!(x) = x + reviewer_misspelled_stage, which throws UndefVarError at runtime: one raw JET report became zero after filtering. An otherwise identical control_step retained its report. Thus genuine undefined names under this function name are silently discarded, although the comment justifies only guarded stage-variable reports; no existing solver runtime defect is alleged. Keep the check for genuine undefined variables, constrain any upstream false-positive workaround to demonstrated reports, and add a negative control showing a real typo still fails.

Non-blocking findings

None.

What I ran

  • git rev-parse HEAD, git diff origin/master...HEAD, git diff --stat origin/master...HEAD, and git merge-base origin/master HEAD (exit 0); merge-base is the Base header. The live master tip is d72c550; the PR API base SHA is 45ff46a.

  • git fetch origin '+refs/pull/4674/head:refs/remotes/pr/4674' master (exit 0); PR API head equals the reviewed checkout. INITIAL.md was hashed before opening the PR body and the specified author commit body.

  • git log -1 --format=%B 06458f707cbdb236195e9c5660bfbd14790403d1 (exit 0): no Agent-Harness or Agent-Model trailers. Read PR description and linked PRs Accept a callable stage predictor on the nlsolve algorithms #4539 and Read a scalar mass matrix instead of its missing diagonal #4582 only after freezing the blind assessment.

  • gh pr checks 4674 --repo SciML/OrdinaryDiffEq.jl: eight failed jobs. SDIRK QA job passed: 30 pre-existing broken allocation checks, 20/20 QA checks, JET 1/1. Current and LTS SDIRK Core jobs and NonlinearSolve QA also passed.

  • gh run view 40419235977 --repo SciML/OrdinaryDiffEq.jl --log-failed, and the same command for 40419235752 and 40419236114 (exit 0 with a writable cache after the initial default-cache attempt was blocked). Inspected sublibrary, downstream, and root CI failures.

  • gh run list --repo SciML/OrdinaryDiffEq.jl --branch master --event push --limit 5, followed by completed-run queries for the three workflows and gh run view ... --log-failed for master sublibraries, master downstream, and master root CI. The same Newton LineSearchException, GPUCompiler deprecation-warning assertion, Zygote event tape error, SciMLSensitivity unexpected passes, and threaded ensemble assertion occur there. The ModelingToolkit causal-equation ordering failure was not matched on these master runs and remains unclassified.

  • Julia run 1: timeout 3600 julia +1.13.2 --startup-file=no run_head.jl (exit 0). Environment: JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 JULIA_PKG_PRECOMPILE_AUTO=0, isolated TMPDIR, and the supplied writable depot plus default depots. The script activated a separate environment, developed the checked-out DiffEqBase, OrdinaryDiffEqCore, OrdinaryDiffEqDifferentiation, OrdinaryDiffEqNonlinearSolve, and OrdinaryDiffEqSDIRK, and added SciMLTesting 2.8.0, Aqua 0.8.18, and JET 0.12.3. It included lib/OrdinaryDiffEqSDIRK/test/qa/qa.jl unchanged. Output: Quality Assurance | 20 20; REVIEW HEAD QA PASS.

  • Julia run 2: timeout 3600 julia +1.13.2 --startup-file=no run_base.jl (exit 1), using the same environment variables plus JULIA_NUM_PRECOMPILE_TASKS=1. git archive 45ff46afe9919acf32e9af8058705073e0995503 lib/OrdinaryDiffEqNonlinearSolve lib/OrdinaryDiffEqSDIRK (exit 0) supplied isolated merge-base libraries; unchanged sibling libraries were linked to the checkout. The script developed those two base libraries in the same environment and included the identical lib/OrdinaryDiffEqSDIRK/test/qa/qa.jl. Output: NonPublicExplicitImportsException; stage_predictor is not public in OrdinaryDiffEqNonlinearSolve, imported at lib/OrdinaryDiffEqSDIRK/src/OrdinaryDiffEqSDIRK.jl:42. Summary: Quality Assurance | 18 1 1 20. The additional rendered-docs failure is a reviewer-fixture artifact: the partial base archive omitted the repository docs tree. Thus the specific public-import regression fails before and passes after; the complete base QA result is not a clean isolated single failure.

  • Julia run 3 (final invocation): timeout 3600 julia +1.13.2 --startup-file=no --project=env probe_filter.jl (exit 0), using the run-2 environment variables. The probe evaluated the exact known(report) definition extracted from lib/OrdinaryDiffEqSDIRK/test/qa/jet.jl, then compared JET.report_call on _perform_step_oop!(x) = x + reviewer_misspelled_stage and control_step(x) = x + reviewer_misspelled_stage in an independent module. Both functions were verified to throw UndefVarError at runtime. Output: REVIEW JULIA 1.13.2 JET 0.12.3; REAL TYPO: raw reports=1; after PR filter=0; CONTROL: raw reports=1; after PR filter=1; Independent real-typo control | 7 7. This is a test of the suppression predicate, not a mutation of the solver checkout.

  • Final gh pr view 4674 --repo SciML/OrdinaryDiffEq.jl --json headRefOid,baseRefOid,state (exit 0): OPEN, reviewed head unchanged, baseRefOid equals the Base header.

What I did not verify

No numerical implementation changes were found. Full package, downstream, GPU, MPI, and AD suites were not run locally; only the focused QA file and a filter control were selected. The newly wired, pre-existing QA file was run directly on both revisions: the stage_predictor import check fails on base and passes on head. There is no newly authored regression assertion for the dispatch repair itself, and I did not execute the complete Core/QA runner locally or the base JET package test. The base archive omitted docs, producing the unrelated docs failure described above; I did not rerun it.

🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5
Conversation: https://claude.ai/code/session_01379heiiB35TtywhR7uSU74

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

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

PR: #4674

Reviewed head: e0d2751
Raw SHA-256: 1f190326cc4be5e1a0248f356302a583163a532d65f5ddd944e8c87343c14b40
Source SHA-256: 12b9273d85b4499c03d1d593dd768ba001f9a76a3fd7da41d8bc450af0b55bab
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1ffae-1bed-7a20-be40-edb2423b8da7
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes
Redaction: ran (substitutions=0)

Risk assessment

  • Risk: high (H4)
  • Verdict: CHANGES
  • Reviewed head: e0d2751

Review report

VERDICT: CHANGES
CI: CI is not green (regress:SciMLSensitivity.jl/Core4/1 / Downstream Tests - Core4)
Round: 1
Head: e0d2751
Slot: 1
Session: 01a1ffae-1bed-7a20-be40-edb2423b8da7
Reviewer: codex-cli 0.170.0; model: gpt-6.2-sol

Risk

high (H4: GROUP=All silently drops existing functional coverage, and the JET filter accepts a reproduced stage-initialization regression)

Blocking findings

  • Blocking priorities: P1, P2, P2
  • [P1] lib/OrdinaryDiffEqSDIRK/test/qa/jet.jl:8 — The filter accepts a real uninitialized stage variable. In a scratch copy I changed the out-of-place stage-2 guard from s >= 2 to s >= 3 at lib/OrdinaryDiffEqSDIRK/src/generic_imex_perform_step.jl:1495. One fixed step of SDIRK2() on the scalar problem u′ = -u, u(0) = 1, with dt = 0.1, threw UndefVarError(:z2, :local). JET still passed 2/2 after analyzing 477 definitions. Instrumenting the filter showed reports=594 filtered=594 filtered_z2=59. The control exercises a misspelled global, which the local-symbol check excludes by construction. Restructure the guarded assignments and reads so the unfiltered JET check can run, and use the stage-guard mutation to verify that the test detects a real missing assignment. This also removes reliance on JET's private UndefVarErrorReport type and fields.
  • [P2] lib/OrdinaryDiffEqSDIRK/test/runtests.jl:10 — GROUP=All exited successfully with Testing OrdinaryDiffEqSDIRK tests passed and zero testsets. The root group router also preserves All verbatim for OrdinaryDiffEqSDIRK_All. The base driver runs all four functional testsets for this input, while both new dispatch conditions exclude it. Accept the standard All spelling alongside ALL and reject unsupported group names before running tests.
  • [P2] lib/OrdinaryDiffEqNonlinearSolve/Project.toml:4 — The public API probe confirmed that stage_predictor is now declared public and documented. The repository's versioning rule requires a minor release for additive public API. Use 2.10.0 for this promotion.

Non-blocking findings

None.

What I ran

  • Julia 1.12.4. In a scratch copy, GROUP=ALL julia --project=lib/OrdinaryDiffEqSDIRK -e 'using Pkg; Pkg.test(; julia_args=["--check-bounds=auto", "-O0"])' exited 0. Tableau passed 103/103, predictors 124/124, convergence 139 passed and 2 expected-broken, DAE 78/78, Aqua and ExplicitImports 20/20, and JET 2/2. AllocCheck reported 30 expected-broken assertions. I stopped the initial default-optimization run after 62 minutes, with both compiler samples still in the first testset.
  • GROUP=QA with Pkg.test(; julia_args=["--check-bounds=auto"]) at default optimization exited 0 with 20/20 quality checks, 2/2 JET checks and 30 expected-broken allocation assertions. I used Revise polling for the QA reruns after the build host returned FolderMonitor ... EMFILE.
  • On JET 0.12.3, the unfiltered base JET test body run against the PR source failed with 594 possible errors found. The PR JET test passed 2/2 on both the unmodified and mutated source. The unchanged scalar SDIRK2() run passed the success and analytic endpoint assertions. The mutation probe passed its UndefVarError assertion.
  • The stage_predictor probe passed 11/11 assertions for public status, docstring, the SDIRK binding and return values. The existing nonlinear-solver developer API test file passed 21/21 API checks and 6/6 resize checks.
  • julia --project=docs docs/review-doc-build.jl ran the docs build from a scratch copy with the deployment stanza omitted. It exited 0 and rendered the OrdinaryDiffEqNonlinearSolve.stage_predictor anchor. git diff --check origin/master...HEAD exited 0 and the checkout remained clean.
  • uv run --locked python --version reported Python 3.13.13 and warned that --locked has no effect outside a project. The checkout has no uv.lock or locked Python interpreter.

What I did not verify

I did not reproduce the supplied SciMLSensitivity Core4 CI result or exercise the JET branches for Julia 1.10 and 1.11.

AUTHOR_GRADE: {"task":"test","score":2,"difficulty":3,"rounds":1,"author_harness":"unknown","author_model":"unknown","note":"QA runs and the accessor is documented, but the JET check accepts a reproduced stage failure, All silently runs zero tests, and the public API uses a patch bump."}

Head link: e0d2751


🤖 Posted by an AI agent — harness: codex-cli 0.170.0 · model: gpt-6.2-sol
Conversation: local session 01a1ffae-1bed-7a20-be40-edb2423b8da7 (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