Skip to content

test(decomposed-server): fix np.float32 vs python-float equality flake#142

Merged
rylinjames merged 1 commit into
mainfrom
fix/decomposed-server-float-comparison-flake
May 20, 2026
Merged

test(decomposed-server): fix np.float32 vs python-float equality flake#142
rylinjames merged 1 commit into
mainfrom
fix/decomposed-server-float-comparison-flake

Conversation

@rylinjames
Copy link
Copy Markdown
Collaborator

Fixes the pre-existing test flake on main that has been blocking pytest CI since commit f9811d2 pinned numpy<2. call["state"][0, 0] is np.float32; comparing to Python's 0.1 (float64) under == is False due to precision boundary. Use np.isclose.

Unblocks PRs #139, #140, #141 from this same flake.

🤖 Generated with Claude Code

call["state"][0, 0] is np.float32 (per the dtype assertion three lines
above + the upstream marshal layer's float32 cast). Comparing
np.float32(0.1) to Python's 0.1 (float64) under == is False — the bit
patterns differ at boundary precision. Use np.isclose.

Flake started surfacing on main when commit f9811d2 pinned numpy<2
(numpy 2.x had different repr rules that masked the issue). Affects
pi05_decomposed test only; no production impact.

Per CLAUDE.md "fix it now, not later" — this was noted as a follow-up
during PR #137/#138 merges + earlier on the fluxvla docs alignment
session; landing the fix as part of the lift #4 PR cleans the CI signal.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rylinjames rylinjames merged commit 30dac07 into main May 20, 2026
6 checks passed
@rylinjames rylinjames deleted the fix/decomposed-server-float-comparison-flake branch May 20, 2026 11:29
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.

1 participant