You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make test_abstract_blocktype work with MatrixAlgebraKit 0.6.6 (#262)
## Summary
Two issues surface in `test/test_abstract_blocktype.jl` once
MatrixAlgebraKit 0.6.6 is resolved (which can happen on any new
`Pkg.add`/`Pkg.update` against the registered v0.10.39, since its
`test/Project.toml` allows `MatrixAlgebraKit = "0.6.0 - 0.6.4, 0.6.6"`):
- `@test_broken f(a)` for `f ∈ (svd_full, svd_trunc)` on JLArray-backed
`BlockSparseMatrix{T, AbstractMatrix{T}}` errors with `Expression
evaluated to non-Boolean` because `svd_full` now succeeds and returns a
3-tuple — it used to throw, which `@test_broken` correctly caught.
- The unconditional `@test c * u ≈ a` in the right-side loop is flaky on
JLArray for `right_orth`, `lq_compact`, `lq_full`. These factorizations
regressed in MatrixAlgebraKit 0.6.5/0.6.6 and produce `c * u != a` on
GPU-backed inputs (0.6.4 was correct), tracked upstream at
QuantumKitHub/MatrixAlgebraKit.jl#218. Whether the assertion fails on a
given CI run depends on the random matrix.
This PR:
- Seeds each `(arrayt, elt)` iteration with `StableRNG(1)` so the test
is deterministic across runs.
- Promotes `svd_full` to a regular `@test` on JLArray (the math is now
correct).
- Wraps `svd_trunc` in a Boolean-safe `@test ... broken = true` block so
its return value can no longer surface as a non-Boolean error.
- Marks `c * u ≈ a` as broken on JLArray for `right_orth`, `lq_compact`,
`lq_full`, with a comment pointing at
QuantumKitHub/MatrixAlgebraKit.jl#218.
## Test plan
- [x] `Pkg.test BlockSparseArrays` passes locally with MatrixAlgebraKit
0.6.6 (`test_abstract_blocktype.jl`: 198 pass + 54 broken = 252).
- [ ] CI is green.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments