Conversation
- Rename misleading "should handle lookup consistently within tolerance window" to "should return lock info for active lock" - Move Storage Key Consistency tests from E2E to new crypto.test.ts - Add comprehensive unit tests for generateLockId, hashKey, formatFence
- formatFence: reject non-finite, non-integer, and negative values before BigInt conversion (prevents leaked RangeError, fixes -0.1→0 bug) - makeStorageKey: validate backendLimitBytes (positive int) and reserveBytes (non-negative int) to prevent limit bypass - Add FENCE_FORMAT_MAX constant (10^15-1) distinct from operational FENCE_THRESHOLDS.MAX (9e14) - Update tests for stricter contracts - Bump version to 2.5.3
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #30 +/- ##
==========================================
+ Coverage 76.37% 76.63% +0.26%
==========================================
Files 42 42
Lines 2688 2718 +30
==========================================
+ Hits 2053 2083 +30
Misses 635 635
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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
BigInt()conversionChanges
formatFence hardening — fixes contract violations:
makeStorageKey validation — prevents limit bypass:
New constant
FENCE_FORMAT_MAX(10^15-1) distinguishes the format limit fromFENCE_THRESHOLDS.MAX(9e14) operational limit.Test coverage
All edge cases covered: NaN, Infinity, negative fractions, non-integers, invalid config.