Skip to content

Fix sublibrary QA (Aqua) and Downgrade CI red lanes#108

Merged
ChrisRackauckas merged 2 commits into
SciML:mainfrom
ChrisRackauckas-Claude:fix-red-lane
Jul 5, 2026
Merged

Fix sublibrary QA (Aqua) and Downgrade CI red lanes#108
ChrisRackauckas merged 2 commits into
SciML:mainfrom
ChrisRackauckas-Claude:fix-red-lane

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Please ignore until reviewed by @ChrisRackauckas. Draft; opened by an automated agent.

Fixes the red Sublibrary CI lanes on main for lib/CorleoneOED and lib/OptimalControlBenchmarks — the QA (Aqua.test_all) and Downgrade jobs. Every QA finding is a genuine repo violation and is fixed at the source (no aqua_kwargs/ignore-list papering-over).

QA — CorleoneOED

  • unbound_args: drop the unused DISCRETE type param from the two update_fim(::OEDLayer{<:Any, SAMPLED, FIXED, ...}) methods (src/oed.jl), and the unused SPLIT param from the two update_fim(::MultiExperimentLayer{DISCRETE, FIXED, <:Any, ...}) methods (src/multiexperiments.jl). In each, the position the var would bind is <:Any, so the where var never binds.
  • ambiguities: add the disambiguating get_sampling_sums/get_sampling_sums! methods on OEDLayer{<:Any, false, <:Any, <:MultipleShootingLayer}, ..., st::NamedTuple{fields} that Aqua's message suggests. SAMPLED == false means no sampling, so they return []/nothing.
  • piracy: the shooting_constraints(::AbstractVector{<:Trajectory}) / shooting_constraints! methods were defined in CorleoneOED but extend a function owned by Corleone on a type (Trajectory) also owned by Corleone — CorleoneOED owns neither. Moved them into Corleone (src/multiple_shooting.jl), right next to the single-Trajectory methods, where the function and type both live. (Not in the triage plan, but it was red on main and bare Aqua.test_all requires it; fixed at the source, not ignored.)
  • stale_deps: StableRNGs is using-ed only in test/core/*, never in src — moved from [deps] to [extras] + [targets].test (+ kept its [compat]).
  • deps_compat: added Pkg = "1" compat (Pkg is a test extra).

QA — OptimalControlBenchmarks

  • stale_deps: removed OptimizationLBFGSB, Ipopt, UnoSolver, OrdinaryDiffEq, Runic from [deps] — none are imported in src (the module usings OrdinaryDiffEqTsit5, and the concrete optimizer is passed in as an argument). Ipopt stays in [extras] as a benchmark-only optimizer.
  • deps_compat: added missing [compat] for BenchmarkTools, CairoMakie, IntervalSets, ModelingToolkit, ModelingToolkitBase, and Pkg = "1".

Downgrade (both sublibs)

Both sublibs path-source the parent Corleone, so they must not declare a lower floor than the parent for a shared dep (the merged min-resolve otherwise picks the sublib's lower floor and the sandbox re-resolve rejects it against the parent's real compat):

  • SciMLBase "2, 3""2.141.0, 3" (matches parent floor)
  • SymbolicIndexingInterface "0.3""0.3.43" (matches parent floor)

Local validation

  • Aqua.test_all(CorleoneOED)11/11 pass on Julia 1.11 and 1.12 (all checks, incl. ambiguities/unbound/stale_deps/deps_compat/piracy).
  • OCB Aqua.test_stale_deps + Aqua.test_deps_compat5/5 pass (the only two checks that were red on main; OCB source is untouched, so the other checks are unchanged and were already green).
  • Downgrade action (julia-downgrade-compat merged min-resolve) on both lib/CorleoneOED and lib/OptimalControlBenchmarks: resolves successfully; resulting manifest pins SciMLBase = 2.141.0 and SymbolicIndexingInterface = 0.3.43 (new floors respected), and all newly-added OCB compat floors resolve (MTK 11.0.0, MTKBase 1.0.0, CairoMakie 0.15.0, IntervalSets 0.7.4, BenchmarkTools 1.0.0).
  • Runic clean on all changed src files.

🤖 Generated with Claude Code

Sublibrary CI was red on both the QA (Aqua.test_all) and Downgrade
lanes for lib/CorleoneOED and lib/OptimalControlBenchmarks.

QA (genuine Aqua violations, fixed at the source, no ignore-lists):

CorleoneOED
- unbound_args: drop the unused `DISCRETE` type param from the two
  `update_fim(::OEDLayer{<:Any, SAMPLED, FIXED, ...})` methods in
  src/oed.jl, and the unused `SPLIT` param from the two
  `update_fim(::MultiExperimentLayer{DISCRETE, FIXED, <:Any, ...})`
  methods in src/multiexperiments.jl (first/third positional params are
  `<:Any`, so the declared vars never bind).
- ambiguities: add the disambiguating
  `get_sampling_sums(!)(::OEDLayer{<:Any, false, <:Any,
  <:MultipleShootingLayer}, ..., st::NamedTuple{fields})` methods that
  Aqua suggests (SAMPLED=false has no sampling, so `[]`/`nothing`).
- piracy: move the `shooting_constraints(!)(::AbstractVector{
  <:Trajectory})` methods out of CorleoneOED into the owning package
  Corleone (src/multiple_shooting.jl), next to the single-Trajectory
  methods — both the function and `Trajectory` are Corleone's, so the
  vector dispatch belongs there, not in a downstream package.
- stale_deps: StableRNGs is used only in test/core, not src -> move it
  from [deps] to [extras]+[targets].test (it was silently pulled from
  the parent dev tree before).
- deps_compat: add `Pkg = "1"` compat (Pkg is a test extra).

OptimalControlBenchmarks
- stale_deps: remove OptimizationLBFGSB, Ipopt, UnoSolver,
  OrdinaryDiffEq, Runic from [deps] (none imported in src; the module
  uses OrdinaryDiffEqTsit5 and takes the optimizer as an argument).
  Ipopt stays in [extras] as a benchmark-only optimizer.
- deps_compat: add missing [compat] for BenchmarkTools, CairoMakie,
  IntervalSets, ModelingToolkit, ModelingToolkitBase, and `Pkg = "1"`.

Downgrade (both sublibs path-source the parent, so they must not declare
a lower floor than the parent for a shared dep):
- SciMLBase "2, 3" -> "2.141.0, 3" (match parent Corleone floor)
- SymbolicIndexingInterface "0.3" -> "0.3.43" (match parent floor)

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
The sublibrary downgrade lanes still failed after the previous floor
bumps because several direct-dep compat floors were below what the
resolved graph actually needs at min-resolution.

CorleoneOED / OptimalControlBenchmarks:
- Reexport "1.2" -> "1.2.2": the parent Corleone (path-sourced) requires
  Reexport >= 1.2.2, but the merged downgrade resolve strips Corleone and
  picked Reexport 1.2.0 from the sublib floor. The Pkg.test sandbox then
  re-resolves WITH the parent and rejects the pinned 1.2.0 as
  Unsatisfiable ("restricted to 1.2.0 by an explicit requirement -- no
  versions left"). Matching the parent's floor makes the downgrade pick
  1.2.2 up front.
- DocStringExtensions "0.9" -> "0.9.3": same class of latent dead-end
  (parent floor is 0.9.3; 0.9.0-0.9.2 exist in the registry).

OptimalControlBenchmarks only:
- ModelingToolkit "11" -> "11.2.0": MTK 11.0.0/11.1.0 call
  Base.ispublic unguarded in @import_mtkbase; Base.ispublic only exists
  on Julia >= 1.11, so precompile dies on the LTS (1.10) downgrade lane
  with "UndefVarError: ispublic not defined". MTK 11.2.0 is the first
  release that guards the call with @static if VERSION >= v"1.11".
- Symbolics "7" -> "7.2.0": at floor, ModelingToolkitBase 1.0.0 and
  ModelingToolkitTearing 1.0.2 declare no Symbolics lower bound, so the
  resolver picks Symbolics 7.1.1. MTKTearing calls
  fixpoint_sub(iv, dict, Shift) positionally, but 7.1.1's fixpoint_sub
  takes the operator only as a keyword; the positional OP arg was added
  in Symbolics 7.2.0. Without the bump, MTK's precompile workload dies
  with "MethodError: no method matching fixpoint_sub(..., ::Type{Shift})".

Validated at floor (Julia 1.10, GROUP=Core, the downgrade lane's group):
- CorleoneOED: 1D Example 36/36, Lotka Volterra 125/125, LV SVD 17/17,
  tests passed.
- OptimalControlBenchmarks: 12 deps (incl. MTK/MTKBase/Tearing)
  precompiled cleanly, tests passed.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review July 5, 2026 09:00
@ChrisRackauckas ChrisRackauckas merged commit 4036eea into SciML:main Jul 5, 2026
27 of 28 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