Skip to content

fix(overload): MissingPrimalError in reductions of tracer Fills with FillArrays v1.17 - #328

Merged
adrhill merged 9 commits into
mainfrom
ah/fix-ci-bee8149
Aug 26, 2026
Merged

adrhill merged 9 commits into
mainfrom
ah/fix-ci-bee8149

Conversation

@adrhill

@adrhill adrhill commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Since FillArrays v1.17, reduction fast paths call iszero/isone on the fill value (_foldl_length_op in fillbroadcast.jl), which global tracers deliberately answer with a MissingPrimalError. Since Fills of tracers are also SCT's own representation of "all outputs share one pattern" (inv, eigen, cholesky, \), this broke CI on all Core jobs, e.g. on #327.

This PR adds exact O(1) sum and prod overloads for AbstractFills of tracers that stay in this representation: a scalar tracer for a full reduction, a Fill for a reduction along dims. Summation is linear, so the fill value's pattern is preserved exactly; products create all second-order self-interactions via second_order_or, except for single-element and empty reductions, which are exact.

Also fixes the Benchmarks CI jobs, which failed independently because SimpleDiffEq v1.17 no longer defines solve: it is now imported from CommonSolve.

Bumps the version to v1.2.3-DEV and updates the changelog.

Tested locally against FillArrays v1.17.0 (all of test_arrays.jl, including a new "Fill reductions" testset) and SimpleDiffEq v1.17.0 (Brusselator jacobian_sparsity benchmark path).

🤖 Generated with Claude Code

adrhill and others added 5 commits August 26, 2026 20:26
…rays v1.17

Since FillArrays v1.17, reduction fast paths call `iszero`/`isone` on the
fill value, which global tracers deliberately reject.
Add exact O(1) `sum` and `prod` overloads for `AbstractFill`s of tracers
that stay in the `Fill` representation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
SimpleDiffEq v1.17 no longer defines `solve`, breaking the Brusselator
ODE benchmark with an `UndefVarError`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov-commenter

codecov-commenter commented Aug 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.90%. Comparing base (a98dbd5) to head (dfa042f).

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #328       +/-   ##
===========================================
+ Coverage   40.22%   93.90%   +53.67%     
===========================================
  Files          28       29        +1     
  Lines        1044     1115       +71     
===========================================
+ Hits          420     1047      +627     
+ Misses        624       68      -556     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

adrhill and others added 3 commits August 26, 2026 20:36
Instead of computing the number of reduced elements per output slice,
branch directly on the only three cases that matter: empty, single-element,
and everything else. Also compare `dims = :` output dimensionality
against regular arrays in the tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The Benchmarks test group includes benchmark/jacobian.jl, which now
imports solve from CommonSolve.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@adrhill adrhill mentioned this pull request Aug 26, 2026
@adrhill
adrhill merged commit ff7952b into main Aug 26, 2026
10 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