Repository navigation
Conversation
|
@coderabbitai review |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughCalldata encoding now rejects numbers that are not safe integers and strings with unpaired UTF-16 surrogates. The checks apply to string values and map keys. Tests cover bigint round-tripping and valid surrogate pairs. ChangesCalldata input validation
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to Unsafe numbers and malformed surrogate strings are rejected, while bigint and valid Unicode remain supported. No material merge risk is evident. Architecture SummaryArchitecture risk: 🟡 Medium · up to The change affects 2 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
Reliability and maintainability
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Fixes #229
What
numberinputs and requirebigintfor exact large integersTextEncodercan replace them with U+FFFDWhy
The previous encoder could silently change caller values before they reached GenVM. Unsafe JavaScript Numbers may already be rounded before conversion to
bigint, andTextEncoderreplaces malformed surrogate code units. The GenVM Python reference preserves integer precision and rejects unpaired surrogates.Testing done
Decisions made
numbersupport within the safe-integer rangebigintwhen exact integer precision exceeds that rangeChecks
Reviewing tips
Focus on the safe-integer guard and surrogate validation paths, especially map keys where replacement could otherwise collapse distinct JavaScript strings.
User facing release notes
calldata.encodenow rejects JavaScript inputs that would lose integer precision or Unicode identity before reaching GenVM.