Skip to content

Make Reaction type assertions wordsize-agnostic (fixes x86 CI) - #1552

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-reaction-int32-asserts
Sep 11, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-reaction-int32-asserts

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Summary

The Modeling test group's Reaction Structure testset asserts rx1 isa Reaction{SymbolicT,Int64} and rx4 isa Reaction{SymbolicT,Rational{Int64}}. On 32-bit Julia (ubuntu-latest, x86), the three-argument Reaction constructor builds stoichiometries with ones(Int, ...), and literals like 2//3 produce Rational{Int32}, so the actual types are Reaction{SymbolicT,Int32} / Reaction{SymbolicT,Rational{Int32}} and the assertions fail (10 failures on master).

The fix asserts Int/Rational{Int}, which is correct on both wordsizes.

Test plan

  • Verified the failure mode on Julia 1.13.0 x86: rx1 is Reaction{SymbolicT,Int32} (would fail the old assertion)
  • Verified @test rx1 isa Reaction{SymbolicT,Int} and @test rx4 isa Reaction{SymbolicT,Rational{Int}} pass on Julia 1.13.0 x86 for all rate types in the loop
  • On 64-bit, Int === Int64 so the assertions are unchanged

🤖 Generated with Devin CLI (model: SWE-2 Max) — local session, no shareable URL

On 32-bit Julia, `ones(Int, ...)` stoichiometries and `2//3` literals
produce Int32/Rational{Int32}, so `rx1 isa Reaction{SymbolicT,Int64}`
and `rx4 isa Reaction{SymbolicT,Rational{Int64}}` fail on the x86 CI
lane. Assert `Int`/`Rational{Int}` instead.

Verified on Julia 1.13.0 x86: rx1 is Reaction{SymbolicT,Int32} and the
updated assertions pass for all rate types.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Agent-Harness: Devin CLI 3000.10.21
Agent-Model: SWE-2 Max
Agent-Session: local Devin CLI session (no shareable URL); workspace /home/crackauc/sandbox/tmp_20260911_110613_57839
@ChrisRackauckas
ChrisRackauckas merged commit e4fec21 into SciML:master Sep 11, 2026
21 of 22 checks passed
ChrisRackauckas added a commit that referenced this pull request Sep 12, 2026
- Make Reaction type assertions wordsize-agnostic (#1552)
- Add AirspeedVelocity benchmarking CI (#1553)
- Fix SI extension typing, add mtkcompile support for coupled DAEs, and harden tests (#1554)
- Make robustspecies wordsize-agnostic (#1555)



Agent-Harness: Claude Code
Agent-Model: claude-opus-5[1m]
Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R

Co-authored-by: Claude Opus 5 (1M context) <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.

2 participants