Make robustspecies wordsize-agnostic (fix 32-bit Modeling CI on master) - #1555
Merged
ChrisRackauckas merged 1 commit intoSep 12, 2026
Merged
Conversation
`robustspecies` built its result as `Int64[]` and stored it in
`NetworkProperties.robustspecies::Vector{Int}`. On 32-bit Julia
`Int == Int32`, so the assignment threw
`TypeError: in setfield!, expected Vector{Int32}, got Vector{Int64}`,
failing the CRN Theory tests in the "Modeling 32-bit" CI lane.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Agent-Harness: Claude Code 2.1.269
Agent-Model: claude-fable-5-1
Agent-Session: https://claude.ai/code/session_01KjwXuMxmYxyayQcn6tNwRo
Claude-Session: https://claude.ai/code/session_01KjwXuMxmYxyayQcn6tNwRo
ChrisRackauckas
approved these changes
Sep 12, 2026
ChrisRackauckas
marked this pull request as ready for review
September 12, 2026 05:29
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.
What changed and why
robustspecies(src/network_analysis.jl:1402) built its result asInt64[]and then stored it inNetworkProperties.robustspecies, which is declaredVector{Int}(src/reactionsystem.jl:121). On 32-bit JuliaInt == Int32, so the assignment throwsTypeError: in setfield!, expected Vector{Int32}, got a value of type Vector{Int64}. This is the same class of bug as #1552; it has been latent since8b26cb794("implement robustness for deficiency one", 2024-06) and only surfaced once the 32-bit Modeling CI lane was added in #1550. The fix is a one-token change,Int64[]->Int[].Failing master CI job (commit 7e42f3e): https://github.com/SciML/Catalyst.jl/actions/runs/34655420896/job/103454181607
Verification
The existing
test/network_analysis/crn_theory.jltests are the discriminating regression test: they error on unmodified master with 32-bit Julia and pass with the fix. Run locally withjulia +1.12~x86(juliaup,1.12.7+0.x86.linux.gnu) andjulia +1.12(1.12.7+0.x64.linux.gnu) via a script thatincludes the test file inside a@testset.Before the fix, 32-bit Julia 1.12.7 (unmodified master 7e42f3e):
After the fix, 32-bit Julia 1.12.7:
After the fix, 64-bit Julia 1.12.7 (also 68/68 before the fix, i.e. no behaviour change on 64-bit):
typosover the diff and oversrc/network_analysis.jl: clean.Runic.main(["--check", "--diff", "src/network_analysis.jl"]): exit 0, no diff.Not verified
test/network_analysis/crn_theory.jlwas run locally, not the fullModelinggroup or the other test groups (the change is a single literal insiderobustspecies, which no other file references besides this test and the docs).src/still contains other explicitInt64uses (e.g.chemistry_functionality.jl:291,dsl.jl:577, and throughoutspatial_reaction_systems/); I did not audit whether any of those are assigned intoInt-typed fields. This PR deliberately fixes only the one that fails on master CI.🤖 Generated with Claude Code (model: claude-fable-5-1)
https://claude.ai/code/session_01KjwXuMxmYxyayQcn6tNwRo