Skip to content

Drop RandomizedLinAlg (REQUIRE-only release breaks Aqua persistent-tasks) and implement RSVD locally - #212

Merged
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas:green/ModelOrderReduction.jl
Oct 16, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas:green/ModelOrderReduction.jl

Conversation

@ChrisRackauckas

@ChrisRackauckas ChrisRackauckas commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

🚧 UNREVIEWED — awaiting review by @ChrisRackauckas. Filed by an AI agent running as @ChrisRackauckas; Chris has not seen this.
Harness: Devin CLI 3000.11.92 (diagnosis and fix), Claude Code 2.1.300 (PR) · Model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium
Conversation: https://claude.ai/code/session_01VZjwf7Ux9YtTzwHGHMqnsq (fleet master)

This fixes a failure on the default branch's CI. The diagnosis and the evidence below come from the investigating agent's report; "confirmed by running" and "read in logs" are kept apart there.

Failure 1: QA (Julia 1), Aqua "Persistent tasks" fails with Unable to locate Project.toml in .../RandomizedLinAlg/t4i9M

Error (read in logs)

Persistent tasks: Error During Test at ~/.julia/packages/Aqua/yUvBM/src/persistent_tasks.jl:40
  Test threw exception
  Expression: !(has_persistent_tasks(package; kwargs...))
  Stacktrace: ... Aqua.manifest_entries (persistent_tasks.jl:88/116/119) -> precompile_wrapper (142) -> has_persistent_tasks (51)
Some tests did not pass: 20 passed, 0 failed, 1 errored, 0 broken.

Julia 1.13.2, Aqua v0.8.18, SciMLTesting v2.13.2, RandomizedLinAlg v0.1.0. All Core jobs (lts, 1, pre, x86) pass. The QA group fails only on this check.

Cause: upstream (Aqua 0.8.17+ combined with a REQUIRE-only dependency)

  • Aqua v0.8.17 (2026-09-17, JuliaTesting/Aqua.jl PR #394 "Make test_persistent_tasks respect the environment") added manifest_entries. It builds the wrapper manifest by reading every dependency's Project.toml, and it calls error when one is missing. v0.8.18 keeps that behaviour. I read this in Aqua/yUvBM/src/persistent_tasks.jl.
  • RandomizedLinAlg's only registered release, v0.1.0, contains REQUIRE and no Project.toml. I confirmed this by listing ~/.julia/packages/RandomizedLinAlg/t4i9M. Upstream master has a Project.toml but was never tagged. RandomizedLinAlg issue Proper Orthogonal Decomposition (POD) method #18, which asks for a release, has been open since 2026-10-05 with no response, and the repo has not been pushed since 2023.
  • Timing: the last green main Tests run was on 2026-09-16 (https://github.com/SciML/ModelOrderReduction.jl/actions/runs/35146247645), one day before Aqua 0.8.17 was released. There were no main Tests runs between that one and df48976.
  • Upstream tracking: Aqua issue Persistent tasks fails in some other packages JuliaTesting/Aqua.jl#404 is open. A collaborator says he is trying a "skip with a warning" approach, but there is no open PR for it in Aqua.
  • Confirmed by running: on unmodified main (df48976), GROUP=QA julia +release --project -e 'using Pkg; Pkg.test()' reproduces the same error with Aqua v0.8.18 (20 passed, 1 errored).

Existing PRs

None. The open PRs in SciML/ModelOrderReduction.jl are #149, #88 and #27, and none of them touches this. There is no fix PR in JuliaTesting/Aqua.jl or JuliaLinearAlgebra/RandomizedLinAlg.jl.

Fix

The package used only RandomizedLinAlg.rsvd. The branch replaces it with a local implementation of the same algorithm (Halko, Martinsson & Tropp 2011, Algorithms 4.1 and 5.1: Gaussian range finder, QR, then the SVD of Q'A). This removes the REQUIRE-only dependency. No public API changes and no new dependency: randn is exported by Base, and qr!/svd! come from LinearAlgebra, which is already a dependency. RandomizedLinAlg is MIT.

  • Project.toml: RandomizedLinAlg removed from [deps]/[compat].
  • src/DataReduction/POD.jl: local _rsvd (throws ArgumentError when n + p exceeds the row count, as before). The reduce!(::RSVD) docstring Throws section is updated.
  • src/ModelOrderReduction.jl: imports qr! and svd! from LinearAlgebra.
  • src/Types.jl: the RSVD docstring no longer refers to RandomizedLinAlg.
  • test/DataReduction.jl and test/Project.toml (test-only Random): new testset "POD - RSVD". For an exactly rank-3 40×25 matrix it checks that the RSVD spectrum matches svdvals (rtol 1e-10), that rbasis*rbasis'*A ≈ A, and that an oversized n + p throws ArgumentError. This tests the numerics of the replacement. It is not a test that fails before the fix. The test that fails before and passes after is the existing Aqua persistent-tasks check:

Before (main df48976, log scratch/qa_before.log):

Persistent tasks: Error During Test at .../Aqua/yUvBM/src/persistent_tasks.jl:40
  Unable to locate Project.toml in ~/.julia/packages/RandomizedLinAlg/t4i9M
ERROR: LoadError: Some tests did not pass: 20 passed, 0 failed, 1 errored, 0 broken.

After (branch, Aqua v0.8.18, log scratch/qa_after.log):

QA/jet_tests.jl |    5      5
QA/qa.jl        |   21     21
     Testing ModelOrderReduction tests passed

Other checks I ran on the branch (Julia 1.13.2): GROUP=Core passed, all 8 files, DataReduction 18/18. docs/make.jl built with doctests and only pre-existing warnings. Runic --check and typos are clean on the changed files. Not run locally: QA/Core on Julia lts (1.10) and the Downgrade workflow. I did check that bare randn resolves on 1.10.12.

An alternative I did not take: cap Aqua = "0.8, <0.8.17" in test/qa/Project.toml. That pins QA tooling to an old release and leaves the unmaintained, REQUIRE-only dependency in place.

Links


🤖 Posted by an AI agent — harness: Devin CLI 3000.11.92 (fix), Claude Code 2.1.300 (PR) · model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium / claude-opus-5-5
Conversation: https://claude.ai/code/session_01VZjwf7Ux9YtTzwHGHMqnsq (fleet master)

🤖 Generated with Claude Code

Independent review (added by the fleet master)

Risk assessment

  • Risk: low
  • Blast radius: RSVD backend implementation and removal of a direct dependency; public POD/RSVD constructors and reduction behavior remain compatible.
  • Evidence: Compared against RandomizedLinAlg v0.1.0 source. Independently ran 63 assertions on each of Julia 1.10.12 and 1.13.2: identical-seed U/S/V parity and element types for Float64, Float32, complex, tall/wide matrices; rank-3 reconstruction/spectrum and oversampling bounds. Unchanged local GROUP=QA on Julia 1.13.2 passes: JET 5/5, QA 21/21, including persistent tasks. PR QA/Core CI remains pending. Read the default-branch failing QA log independently: Aqua 0.8.18 errors on the missing RandomizedLinAlg Project.toml.
  • Independent review: codex gpt-6.1-sol rated it low, high confidence in algorithm equivalence: the local helper preserves the released Gaussian range finder and projected SVD.
  • Merge: auto-merge candidate — conditional on green QA, Core, downgrade and docs; no numerical or public-API defect found.

🤖 Section added by an AI agent — harness: Claude Code 2.1.300 · model: claude-opus-5-5 (review by codex-cli 0.162.1, gpt-6.1-sol)
Conversation: https://claude.ai/code/session_01VZjwf7Ux9YtTzwHGHMqnsq

RandomizedLinAlg's only release (v0.1.0) ships a REQUIRE file and no
Project.toml. Aqua >= 0.8.17 builds the persistent-tasks wrapper manifest
from each dependency's Project.toml and errors on it, which turns the QA
group red (JuliaTesting/Aqua.jl#404). RSVD now uses a local implementation
of the same algorithm (Halko et al. 2011, Algorithms 4.1 and 5.1).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Devin <noreply@cognition.ai>
Agent-Harness: Devin CLI 3000.11.92
Agent-Model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium
Agent-Session: local headless Devin run (fleet master green lane; no session URL)
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review October 16, 2026 00:39
@ChrisRackauckas
ChrisRackauckas merged commit 3947de5 into SciML:main Oct 16, 2026
13 checks passed
ChrisRackauckas referenced this pull request Oct 16, 2026
Agent-Harness: Claude Code 2.1.301
Agent-Model: claude-opus-5-5
Claude-Session: https://claude.ai/code/session_01VZjwf7Ux9YtTzwHGHMqnsq

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant