fix(platform-wallet): enforce FFI lifetime invariants#4160
Conversation
|
Warning Review limit reached
Next review available in: 47 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ 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 |
|
🕓 Ready for review — 27 ahead in queue (commit 53a091e) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v4.1-dev #4160 +/- ##
=============================================
- Coverage 87.63% 65.42% -22.21%
=============================================
Files 2624 26 -2598
Lines 331678 2707 -328971
=============================================
- Hits 290659 1771 -288888
+ Misses 41019 936 -40083
🚀 New features to boost your workflow:
|
…etime-safety # Conflicts: # packages/swift-sdk/build_ios.sh
Issue being fixed or feature implemented
Native FFI conversion and manager teardown could violate their pointer/count and callback-lifetime contracts under edge-case data or shutdown timing.
This is a client/SDK boundary hardening change. It does not change Platform consensus or require a protocol-version activation.
What was done?
How Has This Been Tested?
cargo test -p rs-sdk-ffi --lib— 304 passedcargo test -p platform-wallet --lib— 470 passedcargo test -p platform-wallet-ffi --lib— 182 passedcargo clippy -p rs-sdk-ffi -p platform-wallet -p platform-wallet-ffi --lib -- -D warningscargo fmt -p rs-sdk-ffi -p platform-wallet -- --checkSwiftDashSDKscheme with Xcode 26.6The repository-wide all-target strict Clippy run also reached the changed targets; it is currently blocked by pre-existing warnings in unrelated wallet test files.
Breaking Changes
None.
Checklist:
For repository code-owners and collaborators only