Make Reaction type assertions wordsize-agnostic (fixes x86 CI) - #1552
Merged
ChrisRackauckas merged 1 commit intoSep 11, 2026
Merged
ChrisRackauckas merged 1 commit into
ChrisRackauckas merged 1 commit into
Conversation
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
Modelingtest group'sReaction Structuretestset assertsrx1 isa Reaction{SymbolicT,Int64}andrx4 isa Reaction{SymbolicT,Rational{Int64}}. On 32-bit Julia (ubuntu-latest, x86), the three-argumentReactionconstructor builds stoichiometries withones(Int, ...), and literals like2//3produceRational{Int32}, so the actual types areReaction{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
rx1isReaction{SymbolicT,Int32}(would fail the old assertion)@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 loopInt === Int64so the assertions are unchanged🤖 Generated with Devin CLI (model: SWE-2 Max) — local session, no shareable URL