-
Notifications
You must be signed in to change notification settings - Fork 22
1.6 Release Candidate 1 #497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
How to use the Graphite Merge QueueAdd the label mergequeue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
|
Claude finished @cameronvoell's task —— View job Code Review Complete ✅I've completed a comprehensive review of PR #497: 1.6 Release Candidate 1. Here are my findings: OverviewThis PR introduces three main features:
✅ Strengths1. Good API Design
2. Proper Null Safety
3. Good Test Coverage
4. Consistent Coroutine Usage
|
e7f622e to
ef7f197
Compare
Prepare 1.6 Release Candidate 1 by adding
ClientOptions.forkRecoveryOptions, changingConversations.syncAllConversationsto returnGroupSyncSummary, and introducingGroup.leaveGroupwith FFI supportThis release candidate updates client configuration and conversation APIs and wires new FFI methods.
ClientOptions.forkRecoveryOptionsand map to FFI inClientconstruction; passapi.gatewayHosttoconnectToBackendin Client.ktConversations.syncAllConversationsreturn type toGroupSyncSummaryand addGroupSyncSummaryconversion in Conversations.ktGroup.leaveGroupand FFIFfiConversation.leaveGroupimplementation in xmtpv3.ktGroupSyncSummary.numSyncedin ConversationsTest.kt📍Where to Start
Start with the
Clientinitialization and FFI wiring in Client.kt, then review theGroupSyncSummarychange andConversations.syncAllConversationsreturn mapping in Conversations.kt, and finally the FFI additions includingFfiConversation.leaveGroupin xmtpv3.kt.📊 Macroscope summarized 518531d. 5 files reviewed, 5 issues evaluated, 5 issues filtered, 0 comments posted
🗂️ Filtered Issues
library/src/main/java/org/xmtp/android/library/Client.kt — 0 comments posted, 5 evaluated, 5 filtered
connectToApiBackendreplaces a previously cached client with a new one when the cached client is not connected, but does not explicitly destroy/close the old client before overwriting the cache entry. This can lead to non-deterministic resource retention until GC triggers theCleaner, potentially leaking native/Rust resources in the interim. Add an explicitdestroy()/close()on the stalecachedinstance before replacing it inapiClientCache. [ Low confidence ]connectToSyncApiBackendmirrors the cache replacement behavior ofconnectToApiBackendand also overwrites a potentially disconnected cached client without explicitly destroying/closing it. This risks temporary native resource leaks until GC. Before replacing the entry insyncApiClientCache, explicitlydestroy()/close()the stalecachedclient. [ Low confidence ]withFfiClientcreates anFfiXmtpClientviacreateClient(...)for ephemeral use and then invokesuseClient(ffiClient)without ensuring that the created client is destroyed/closed on every exit path. This violates the single paired cleanup invariant and can leak native resources, DB handles, or threads until GC. WrapuseClient(ffiClient)in a try/finally and callffiClient.destroy()(orclose()) in the finally block. [ Low confidence ]withFfiClientpassessyncApi = connectToApiBackend(api)rather than usingconnectToSyncApiBackend(api)as is done increateFfiClient. If the sync API backend is distinct (e.g., gateway vs. device sync server), this asymmetry can lead to incorrect backend selection for sync operations and contract mismatch across code paths. For consistency and parity, useconnectToSyncApiBackend(api)for thesyncApiparameter. [ Low confidence ]createFfiClient, thedisableEventsparameter forcreateClientis set tooptions.debugEventsEnabled. This appears inverted: enabling debug events should not disable events. If the underlying FFI parameterdisableEventstruly disables event emission, passingdebugEventsEnabledwill disable events when debug events are enabled. UsedisableEvents = !options.debugEventsEnabled(or correct parameter mapping) to preserve semantics. [ Low confidence ]