Skip to content

fix: correct KeyValueLimitTest error codes and size calculations - #62

Merged
s2x merged 2 commits into
masterfrom
fix/keyvaluelimit-test-codes
Jul 3, 2026
Merged

fix: correct KeyValueLimitTest error codes and size calculations#62
s2x merged 2 commits into
masterfrom
fix/keyvaluelimit-test-codes

Conversation

@s2x

@s2x s2x commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Fixes 6 pre-existing failures in KeyValueLimitTest:

  1. Wrong error codes (4 tests): FDB client returns 2102/2103 (client-side validation), not 2203/2204 (server-side)
  2. Transaction size miscalculation (1 test): ignored key bytes — 100 × (14B key + 100KB value) > 10MB. Reduced valueSize to 99800.
  3. Fragile message assertion (1 test): asserted message contains large but FDB says Transaction exceeds byte limit

Piotr Hałas added 2 commits July 3, 2026 23:49
- Use client-side error codes 2102/2103 instead of server-side 2203/2204
- Account for key byte overhead in transactionAtDefaultSizeLimitSucceeds
- Remove fragile message string assertions (FDB returns 'exceeds', not 'large')
- Add & 0xFF bitmask to chr() calls to satisfy int<0,255> constraint
- Lines 215, 244: TYPE_INT_ZERO arithmetic guaranteed in range but PHPStan
  can't prove it statically
- Line 313: XOR with 0xFF always produces 0-255 but PHPStan doesn't track it
- Line 759: hexdec of 2-char substring always produces 0-255
@s2x
s2x merged commit a56a11d into master Jul 3, 2026
6 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.

1 participant