Skip to content

Fix master QA failures: restore Differentiation public API, add missing docstrings#3940

Merged
ChrisRackauckas merged 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:fix-qa-public-docstrings
Jul 22, 2026
Merged

Fix master QA failures: restore Differentiation public API, add missing docstrings#3940
ChrisRackauckas merged 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:fix-qa-public-docstrings

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Please ignore this PR until reviewed by @ChrisRackauckas.

Summary

Fixes two pre-existing test failures on unmodified master (aa895b5):

  1. lib/OrdinaryDiffEqRosenbrock QA group: all_explicit_imports_are_public errored on 12 names imported from OrdinaryDiffEqDifferentiation (build_J_W, build_grad_config, build_jac_config, calc_rosenbrock_differentiation[!], calc_tderivative, dolinsolve, issuccess_W, jacobian2W!, resize_grad_config!, resize_jac_config!, wrapprecs), and public API has docstrings failed on HybridExplicitImplicitRK.
  2. lib/OrdinaryDiffEqRosenbrockTableaus default suite: public API has docstrings failed on 8 undocumented exports.

Root causes (git blame, no bisect needed)

  • De-publicized Differentiation API: e1db9b0 (Document public developer APIs #3832, "Split public and developer API docs", 2026-07-10) removed the Expr(:public, ...) block from OrdinaryDiffEqDifferentiation and dropped its Jacobian/W-matrix section from the docs page — but eight sublibraries (OrdinaryDiffEqRosenbrock, OrdinaryDiffEqFIRK, OrdinaryDiffEqSDIRK, OrdinaryDiffEqExtrapolation, OrdinaryDiffEqStabilizedIRK, OrdinaryDiffEqExponentialRK, OrdinaryDiffEqNonlinearSolve, StochasticDiffEqImplicit) still explicitly import those names, and their QA all_explicit_imports_are_public checks (plus the qa.jl header comments from ExplicitImports: drive sublibrary QA checks to green (ei_broken markers) #3776) rely on them being public. Restoring the public block fixes the confirmed Rosenbrock failure and should fix the same latent failure in the other consumers.
  • Undocumented exports: latent since HybridExplicitImplicitRK was exported without a docstring in 1c68eff (2026-02-22) and since the tableau sublibrary extraction (25dc6e8/32a53ca5, April 2026) exported 8 tableau names without docstrings. They only started failing when 12b6996 (Update SciMLTesting QA docs coverage #3867, 2026-07-11) upgraded the QA infrastructure to SciMLTesting 2.1, which introduced the public API has docstrings check. So the trigger was the new SciMLTesting check, not a recent source regression.

Changes

  • Restore the Expr(:public, ...) block (20 names) in OrdinaryDiffEqDifferentiation — all 20 still had their docstrings from Document public API: add docstrings + docs entries #3858 — plus the corresponding @docs section in docs/src/devtools/internals/public_api.md and the using/modules wiring in docs/make.jl.
  • Add devtools/internals/public_api.md to size_threshold_ignore: with the restored entries the page renders at 202.6 KiB, just over Documenter's 200 KiB default (same treatment as the two large Rosenbrock pages).
  • Add a docstring for HybridExplicitImplicitRK (following the existing Tsit5DA docstring).
  • Add docstrings for RodasTableau, Rodas5Tableau, ROS3PRodasTableau, RosShamp4RodasTableau, Velds4RodasTableau, GRK4ARodasTableau, ROS2PRRodasTableau, ROS34PW1bRodasTableau (matching the existing short style, e.g. Rodas4Tableau).
  • Version bumps: OrdinaryDiffEqDifferentiation 3.3.1 → 3.4.0 (restores public names; the removal shipped in 3.3.x), OrdinaryDiffEqRosenbrock 2.4.1 → 2.4.2, OrdinaryDiffEqRosenbrockTableaus 2.2.1 → 2.2.2 (docstrings only).

If the #3832 de-publicization of the Differentiation solver-author API was intentional, the alternative fix is adding these names to the ExplicitImports ignore lists of all eight consumer sublibs — happy to switch, but restoring publicness matches the qa.jl header comments and the #3776 design.

Verification (all run locally on this branch)

  • ODEDIFFEQ_TEST_GROUP=QA Pkg.test() in lib/OrdinaryDiffEqRosenbrock: passed — Aqua 19/19 (was 17 pass / 1 fail / 1 error on master).
  • Pkg.test() in lib/OrdinaryDiffEqRosenbrockTableaus: passed — Quality Assurance 19/19 (was 18/1 fail), convergence 335/335.
  • Full docs build (julia --project=docs docs/make.jl): exited 0; rendered public_api page contains the restored Differentiation entries.
  • Standalone check: Base.ispublic(OrdinaryDiffEqDifferentiation, n) == true for restored names; Docs.undocumented_names(OrdinaryDiffEqRosenbrockTableaus) clean.
  • julia -m Runic --check passes on all changed files.

Note: #3931 (rodas3d) also touches lib/OrdinaryDiffEqRosenbrock and lib/OrdinaryDiffEqRosenbrockTableaus; the tableau-file docstring additions here may produce a trivial merge conflict with it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NNigabD3sZaUKvDZ1NVQgv

…ng docstrings

Fixes two pre-existing test failures on master:

1. OrdinaryDiffEqRosenbrock QA: all_explicit_imports_are_public errored
   because SciML#3832 (e1db9b0) removed the Expr(:public, ...) block from
   OrdinaryDiffEqDifferentiation (and its docs section) while eight
   sublibraries still explicitly import those names and their QA enforces
   publicness. Restore the public block, the Jacobian/W-matrix section of
   docs/src/devtools/internals/public_api.md, and the docs/make.jl wiring
   (all 20 names still had docstrings from SciML#3858).

2. "public API has docstrings" failures, latent undocumented exports
   surfaced by the SciMLTesting 2.1 QA upgrade (SciML#3867):
   - HybridExplicitImplicitRK (exported undocumented since 1c68eff)
   - 8 OrdinaryDiffEqRosenbrockTableaus exports (RodasTableau,
     Rodas5Tableau, ROS3PRodasTableau, RosShamp4RodasTableau,
     Velds4RodasTableau, GRK4ARodasTableau, ROS2PRRodasTableau,
     ROS34PW1bRodasTableau) undocumented since the sublibrary extraction.

Add docs/src/devtools/internals/public_api.md to size_threshold_ignore:
restoring the Differentiation entries puts the page at 202.6 KiB, just
over Documenter's 200 KiB default, matching the existing ignores for the
two large Rosenbrock pages.

Version bumps: OrdinaryDiffEqDifferentiation 3.3.1 -> 3.4.0 (restores
public names), OrdinaryDiffEqRosenbrock 2.4.1 -> 2.4.2 and
OrdinaryDiffEqRosenbrockTableaus 2.2.1 -> 2.2.2 (docstrings only).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NNigabD3sZaUKvDZ1NVQgv
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

CI triage

This PR's targets are green: lib/OrdinaryDiffEqRosenbrock [QA] and lib/OrdinaryDiffEqRosenbrockTableaus [QA] both pass on this PR (both failed on merged #3921 / current master).

Triage of the remaining failures, compared check-by-check against merged PR #3921 (= master aa895b5):

1. Other sublibrary [QA] jobs (DelayDiffEq, BDF, ExponentialRK, Extrapolation, FIRK, IMEXMultistep, NonlinearSolve, PDIRK, StabilizedIRK, StochasticDiffEqImplicit/Leaping/Weak) — pre-existing, not caused by this PR

Every one of these also failed on #3921. They run here only because the Differentiation change triggers path-filtered CI for its dependents. Spot-checked lib/OrdinaryDiffEqFIRK [QA]: it fails all_explicit_imports_are_public on OrdinaryDiffEqCore names, e.g.

PredictiveControllerCache is not public in OrdinaryDiffEqCore but it was imported ... at lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl:47

That is the same root cause as the Rosenbrock failure fixed here — #3832 (e1db9b0) also removed a set of OrdinaryDiffEqCore names from Core's public block (PredictiveControllerCache, IControllerCache, get_fsalfirstlast, cache types, etc.) while consumers still import them. Scope decision: this PR deliberately restores only the OrdinaryDiffEqDifferentiation block (the confirmed Rosenbrock failure); restoring/triaging the trimmed OrdinaryDiffEqCore names touches many more consumers and deserves its own small PR rather than expanding this one.

2. lib/OrdinaryDiffEqBDF / Tests - Core — pre-existing, unrelated

Also failed on #3921. Log shows BDF Inference Tests erroring at test/inference_tests.jl:19 with an @inferred return-type mismatch inside OrdinaryDiffEqNonlinearSolve's NonlinearSolveAlg/TrustRegion cache types — nothing to do with docstrings or public declarations (which have no runtime/inference effect).

3. tests / * (julia lts) groups — known infra issue

All LTS-group failures show Failed to precompile DiffEqDevTools ... UndefVarError: RungeKuttaMethod not defined, the known DiffEqDevTools-on-LTS issue fixed separately in #3939. (Which LTS groups fail varies run to run — #3921 failed Integrators_II, this PR fails other groups — consistent with that issue, not with this change.)

4. downgrade-sublibraries + GPU — chronic, identical failure set to #3921.

Net: no CI failure on this PR is introduced by this change; the two failures it targets are fixed, and it incidentally un-breaks the QA of the other sublibs that import the Differentiation names (their remaining QA failures are the Core-name issue above).

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Findings from an independent investigation of the master QA failures (checkout of 4e1a434), relevant to this PR's approach:

Blast radius confirmation. The de-publicization in #3832 (e1db9b0) breaks QA far beyond Rosenbrock. The full-matrix Sublibrary CI run on master aa895b5 (run link) failed 24 QA jobs: PDIRK, FIRK, LowOrderRK, Extrapolation, BDF, ImplicitDiscreteSolve, NonlinearSolve, ExponentialRK, DelayDiffEq, IMEXMultistep, FunctionMap, StabilizedIRK, Rosenbrock, StochasticDiffEq{RODE,Weak,HighOrder,IIF,LowOrder,Milstein,Implicit,ROCK,Leaping,Core}, and DiffEqDevTools. A grep of the monorepo shows the removed OrdinaryDiffEqNonlinearSolve hooks are explicitly imported by BDF, SDIRK, IMEXMultistep, Multirate, PDIRK, StabilizedIRK, StochasticDiffEq{Implicit,Leaping,Weak}, and DelayDiffEq (nlsolve!, nlsolvefail, compute_step!, anderson, anderson!), and the removed OrdinaryDiffEqDifferentiation names by Extrapolation, FIRK, Rosenbrock, SDIRK, StabilizedIRK, ExponentialRK, and StochasticDiffEqImplicit.

Local reproduction. On master, ODEDIFFEQ_TEST_GROUP=QA for lib/OrdinaryDiffEqStabilizedIRK fails all_explicit_imports_are_public on exactly build_nlsolver, nlsolve!, du_alias_or_new, markfirststage! (OrdinaryDiffEqNonlinearSolve) and dolinsolve, update_W! (OrdinaryDiffEqDifferentiation).

Gap in this PR. This PR restores the OrdinaryDiffEqDifferentiation public block, which fixes the Differentiation-name half everywhere. It does not restore the OrdinaryDiffEqNonlinearSolve hooks (build_nlsolver, nlsolve!, nlsolvefail, compute_step!, initial_η, markfirststage!, du_alias_or_new, anderson, anderson!) that #3832 also removed — those are only addressed by #3912's per-lib ignores, and only in 5 libs there (BDF/SDIRK/Multirate/StochasticDiffEq*/DelayDiffEq are uncovered by either PR). One of the two approaches (restore public in the owner, per this PR, vs. per-lib ignores, per #3912) should be applied consistently to the OrdinaryDiffEqNonlinearSolve names too, or PRs touching those libs will keep failing QA.

🤖 Generated with Claude Code

https://claude.ai/code/session_015WU5V4PXt8SZ3BpjxdtM7d

singhharsh1708 added a commit to singhharsh1708/OrdinaryDiffEq.jl that referenced this pull request Jul 18, 2026
Neither is referenced anywhere in the package; only PolyesterThreads
is actually used (algorithms.jl threading dispatch). Fixes the
no_stale_explicit_imports QA failure independently of SciML#3940's
separate all_explicit_imports_are_public fix for the same package.
ChrisRackauckas pushed a commit that referenced this pull request Jul 20, 2026
Neither is referenced anywhere in the package; only PolyesterThreads
is actually used (algorithms.jl threading dispatch). Fixes the
no_stale_explicit_imports QA failure independently of #3940's
separate all_explicit_imports_are_public fix for the same package.
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review July 22, 2026 02:38
@ChrisRackauckas
ChrisRackauckas merged commit abc6fdd into SciML:master Jul 22, 2026
21 of 22 checks passed
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.

2 participants