Skip to content

fix(ci): bound AMD below 0.5.4 to unbreak the SciML precompile - #381

Closed
seabbs-bot wants to merge 1 commit into
mainfrom
fix/amd-pin
Closed

seabbs-bot wants to merge 1 commit into
mainfrom
fix/amd-pin

Conversation

@seabbs-bot

@seabbs-bot seabbs-bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Collaborator

Unblocks every open PR. The red across the repo has one cause, and it is not in this package.

What breaks

AMD.jl 0.5.4 removed SS_Int. SparseColumnPivotedQR's AMD extension still reads that name, and LinearSolve calls scpqr at load time, so precompilation of the whole SciML stack fails before any package code runs:

_amd_colperm    @ SparseColumnPivotedQR/ext/SparseColumnPivotedQRAMDExt.jl:31
_build_symbolic @ SparseColumnPivotedQR/src/SparseColumnPivotedQR.jl:731
scpqr_analyze   @ SparseColumnPivotedQR/src/SparseColumnPivotedQR.jl:957
top-level scope @ LinearSolve/src/sparsearrays.jl:958

Confirmed in the failing test / test logs on #348, #366, #373 and #377. It also takes down coverage, downgrade-compat and Benchmark. On #366 every macOS and Windows job fails this way, so it is not platform-specific — it is whichever jobs have run since the resolution moved.

main is not exempt — it is already red. Test run 33872097377 on 658bf8fa fails on the same first error. The last green run was 33862009154 on 2b9b89e2 at 10:11 today, so the break arrived in the registry between 10:11 and 12:18.

The split across jobs is exactly which of them resolve ModelingToolkit: the seven AD jobs, the nine-way test matrix, downgrade-compat and Documenter are red, while pre-commit, registrability, sync, both benchmarks, compare and codecov are green.

Why the resolver was free to do this

SparseColumnPivotedQR declares no compat entry for AMD at all. Its registry Compat.toml bounds only SparseMatricesCSR, LinearAlgebra, PrecompileTools, SparseArrays and julia. AMD is a weak dependency with no upper bound.

The bound

AMD = "0.5.1 - 0.5.3" in the root Project.toml, with AMD as a direct dependency purely to carry it. SciML/SparseColumnPivotedQR.jl#66 (closed) confirms SS_Int has been present since 0.5.1, so the floor is real rather than arbitrary.

Why the root file and not test/Project.toml

The first version of this PR bounded only the test environment. That was not enough: docs, benchmark, test/ad, test/ADFixtures and test/jet each resolve AMD independently. The first CI run showed it exactly — the whole suite passed (1972 unit tests, every other quality item) except Quality: linting (JET), which runs in its own environment and had taken 0.5.4.

A root compat bound is inherited by every environment that resolves the package. That includes test/jet/Project.toml, which is scaffold-managed and must not be hand-edited, so bounding each environment separately was not an option there.

The Aqua consequence

AMD is declared but never loaded, so Aqua.test_stale_deps would flag it. QA_CONFIG.aqua now passes stale_deps = (; ignore = [:AMD]). That ignore is part of the same workaround and comes out with the dependency.

Verified, not assumed

A scratch environment holding the same LinearSolve 5.15.1 and SparseColumnPivotedQR 2.1.7 as the failing CI runs, with only AMD changed, loads cleanly. The real test environment then resolves to AMD 0.5.3 and loads ModelingToolkit and OrdinaryDiffEq, both of which sit on LinearSolve.

Upstream

Already filed by others, so nothing to report:

This is a workaround with a removal condition, not a fix. Drop the dep and the bound once #71 lands. Tracked in #379.

This was opened by a bot. Please ping @seabbs for any questions.

AMD 0.5.4 removed `SS_Int`. `SparseColumnPivotedQR`'s AMD extension still
reads it and `LinearSolve` calls `scpqr` at load time, so the whole SciML
stack fails to precompile before any package code runs. `SparseColumnPivotedQR`
declares no compat for AMD, so the resolver was free to take 0.5.4.

AMD becomes a direct dependency only to carry the bound; nothing here uses it.

Closes #379 once upstream lands.
@seabbs-bot
seabbs-bot requested a review from seabbs as a code owner September 4, 2026 15:53
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Try this Pull Request!

Option 1: Julia Package Manager

Open Julia and type:

import Pkg
Pkg.activate(temp=true)
Pkg.add(url="https://github.com/EpiAware/ComposableTuringIDModels.jl", rev="fix/amd-pin")
using ComposableTuringIDModels

Option 2: Local Checkout

If you have the repo locally:

git checkout fix/amd-pin
julia --project=. -e "using Pkg; Pkg.instantiate()"

@seabbs-review-bot seabbs-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds AMD as a direct test-env dependency and bounds it to 0.5.1–0.5.3 to work around a broken 0.5.4 that breaks the SciML precompile via SparseColumnPivotedQR/LinearSolve. The fix only touches test/Project.toml; docs/Project.toml pulls in the same SciML stack (Catalyst, ModelingToolkit, OrdinaryDiffEq) and is unpinned, which lines up with the currently failing Documenter check. The added comment also embeds issue/PR numbers, which the org's own comment-history standard says not to do.

Automated first pass by seabbs-review-bot (Claude sonnet), triggered by: first pass. Not a human review. Comment @seabbs-review-bot to ask for another pass: @seabbs any time, the author's agent once it has pushed changes. Add the no-review label to opt this PR out. Ping @seabbs with any questions.

Comment thread test/Project.toml
# stack fails to precompile. See EpiAware/ComposableTuringIDModels.jl#379 and
# SciML/SparseColumnPivotedQR.jl#72.
# Drop the dep and this bound once SparseColumnPivotedQR#71 lands.
AMD = "0.5.1 - 0.5.3"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue docs/Project.toml depends on the same SciML stack (Catalyst, ModelingToolkit, OrdinaryDiffEq) but has no AMD dep/bound. It will resolve AMD 0.5.4 and hit the exact precompile failure described here — which is consistent with the Documenter/Documentation check currently failing on this PR. Add the same AMD dep and "0.5.1 - 0.5.3" compat entry to docs/Project.toml.

Comment thread test/Project.toml
# is free to take 0.5.4, which removed `SS_Int`. Its AMD extension still reads
# that name, and `LinearSolve` calls `scpqr` at load time, so the whole SciML
# stack fails to precompile. See EpiAware/ComposableTuringIDModels.jl#379 and
# SciML/SparseColumnPivotedQR.jl#72.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue This comment cites #379, SciML/SparseColumnPivotedQR.jl#72 and #71. Org standard 8 ("Comments and docs carry no development history") says comments carry no issue or PR numbers — that record belongs to git blame/the PR, not the source. Keep the technical why (AMD unused directly, no compat from SparseColumnPivotedQR, 0.5.4 dropped SS_Int) and drop the issue references and the "once SparseColumnPivotedQR#71 lands" removal note.

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
unit 94.03% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@seabbs seabbs closed this Sep 4, 2026
seabbs-bot added a commit that referenced this pull request Sep 4, 2026
The bound in `test/Project.toml` covered only the test environment. `docs`,
`benchmark`, `test/ad`, `test/ADFixtures` and `test/jet` each resolve AMD
independently and took 0.5.4, which is why #381's first run passed the whole
suite except `Quality: linting (JET)`.

A root compat bound reaches all of them, including `test/jet/Project.toml`,
which is scaffold-managed and must not be hand-edited.

AMD is then declared but never loaded, so Aqua's stale-deps check needs to
ignore it. Both come out with the dependency once upstream lands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llm-reviewed Reviewed by seabbs-review-bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants