Skip to content

Pass the wrapper to the table cut's calls, so its NoAdjoint twin infers on Julia 1.13 - #1059

Merged
seabbs merged 1 commit into
mainfrom
fix/table-cut-inference-1.13
Dec 4, 2026
Merged

seabbs merged 1 commit into
mainfrom
fix/table-cut-inference-1.13

Conversation

@seabbs-bot

Copy link
Copy Markdown
Collaborator

The ForwardDiff job of the AD workflow fails on main, because one test fixture does not infer on Julia 1.13.
This changes only the fixture, so the check that every scenario infers passes again.

Claude Opus 5.5 [high]

Failure. On main (runs 47332341889 and 47334708947) ad / ForwardDiff fails one test, "Benchmarks call each scenario and matrix case directly" (test/ad/scenarios.jl:158).
The scenario "NoAdjoint Convolution lag contributions of a table cut at a report day" returns Any from Base.promote_op.
CI's Julia 1 is now 1.13.4.

Cause. _table_cut in test/ADFixtures/src/registry.jl (added in #1049) built a local closure cut(K) that captured the wrapper w.
For the twin, w is the type NoAdjoint, which a closure holds as a UnionAll field.
Julia 1.13 does not infer through that field.
The same body with w passed straight to _table_contributions infers as Float64, and the package's own _table_contributions(NoAdjoint, K; stop) infers on its own, so src needs no change.

Fix. Each call passes w itself, with a comment saying why.

Evidence (local, Julia 1.13.4).

  • Before: the uninferred scenarios are the four expected ones plus the table-cut twin.
  • After: only the four expected ones.
  • The test item "Benchmarks call each scenario and matrix case directly" passes, 77 of 77.

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

…rs on Julia 1.13

The fixture's local closure captured `w`, which for the twin is the
`NoAdjoint` type, held as a `UnionAll` field that Julia 1.13 does not infer
through. The ForwardDiff AD job's check that every scenario infers then failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@seabbs-bot
seabbs-bot requested a review from seabbs as a code owner December 4, 2026 20:13
@seabbs
seabbs merged commit a67de5a into main Dec 4, 2026
16 of 22 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