Fix sublibrary QA (Aqua) and Downgrade CI red lanes#108
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please ignore until reviewed by @ChrisRackauckas. Draft; opened by an automated agent.
Fixes the red Sublibrary CI lanes on
mainforlib/CorleoneOEDandlib/OptimalControlBenchmarks— the QA (Aqua.test_all) and Downgrade jobs. Every QA finding is a genuine repo violation and is fixed at the source (noaqua_kwargs/ignore-list papering-over).QA — CorleoneOED
DISCRETEtype param from the twoupdate_fim(::OEDLayer{<:Any, SAMPLED, FIXED, ...})methods (src/oed.jl), and the unusedSPLITparam from the twoupdate_fim(::MultiExperimentLayer{DISCRETE, FIXED, <:Any, ...})methods (src/multiexperiments.jl). In each, the position the var would bind is<:Any, so thewherevar never binds.get_sampling_sums/get_sampling_sums!methods onOEDLayer{<:Any, false, <:Any, <:MultipleShootingLayer}, ..., st::NamedTuple{fields}that Aqua's message suggests.SAMPLED == falsemeans no sampling, so they return[]/nothing.shooting_constraints(::AbstractVector{<:Trajectory})/shooting_constraints!methods were defined in CorleoneOED but extend a function owned byCorleoneon a type (Trajectory) also owned byCorleone— CorleoneOED owns neither. Moved them intoCorleone(src/multiple_shooting.jl), right next to the single-Trajectorymethods, where the function and type both live. (Not in the triage plan, but it was red onmainand bareAqua.test_allrequires it; fixed at the source, not ignored.)StableRNGsisusing-ed only intest/core/*, never insrc— moved from[deps]to[extras]+[targets].test(+ kept its[compat]).Pkg = "1"compat (Pkg is a test extra).QA — OptimalControlBenchmarks
OptimizationLBFGSB,Ipopt,UnoSolver,OrdinaryDiffEq,Runicfrom[deps]— none are imported insrc(the moduleusingsOrdinaryDiffEqTsit5, and the concrete optimizer is passed in as an argument).Ipoptstays in[extras]as a benchmark-only optimizer.[compat]forBenchmarkTools,CairoMakie,IntervalSets,ModelingToolkit,ModelingToolkitBase, andPkg = "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).Aqua.test_stale_deps+Aqua.test_deps_compat→ 5/5 pass (the only two checks that were red onmain; OCB source is untouched, so the other checks are unchanged and were already green).julia-downgrade-compatmerged min-resolve) on bothlib/CorleoneOEDandlib/OptimalControlBenchmarks: resolves successfully; resulting manifest pinsSciMLBase = 2.141.0andSymbolicIndexingInterface = 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).srcfiles.🤖 Generated with Claude Code