Skip to content

Release v1.6.3#505

Merged
neekolas merged 1 commit intoreleasefrom
11-29-release_v1.6.3
Nov 30, 2025
Merged

Release v1.6.3#505
neekolas merged 1 commit intoreleasefrom
11-29-release_v1.6.3

Conversation

@neekolas
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor Author

neekolas commented Nov 30, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add 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.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@neekolas neekolas mentioned this pull request Nov 30, 2025
@claude
Copy link
Copy Markdown

claude bot commented Nov 30, 2025

Claude finished @neekolas's task —— View job


Code Review for Release v1.6.3

Review Tasks

  • Read changed files to understand the scope
  • Review xmtpv3.kt Kotlin bindings for code quality
  • Check for potential bugs and security issues
  • Assess performance considerations
  • Evaluate test coverage needs
  • Provide comprehensive feedback

Summary

This PR updates the libxmtp native library to version ab0df092 (release/v1.6, 2025-11-30) and regenerates Kotlin bindings. The changes are auto-generated by the UniFFI tool, which creates Kotlin bindings from Rust FFI definitions.

Changes Overview

Release version: 4.6.2 → 4.6.3 (.github/workflows/release.yml:8)

Key functional changes in xmtpv3.kt:

  1. New codec functions for text and wallet operations
  2. Enhanced GroupUpdated structure with admin/super-admin tracking
  3. Data type change in FfiRemoteAttachment

Detailed Review

Code Quality - GOOD

The code is auto-generated and follows consistent patterns:

  • Standard UniFFI binding conventions
  • Proper error handling with @Throws(GenericException::class)
  • Consistent naming (snake_case for FFI, camelCase for Kotlin)
  • Proper use of Kotlin data classes

🔍 Changes Analysis

1. New Decode/Encode Functions (library/src/main/java/xmtpv3.kt)

Added codec support for:

  • decodeText / encodeText - Text message codec
  • decodeGroupUpdated / encodeGroupUpdated - Group update events
  • decodeWalletSendCalls / encodeWalletSendCalls - Wallet transaction support

2. Enhanced FfiGroupUpdated Data Structure (xmtpv3.kt:12617-12668)

data class FfiGroupUpdated(
    // Existing fields...
+   var `addedAdminInboxes`: List<FfiInbox>,
+   var `removedAdminInboxes`: List<FfiInbox>,
+   var `addedSuperAdminInboxes`: List<FfiInbox>,
+   var `removedSuperAdminInboxes`: List<FfiInbox>,
)

Good: Adds proper admin permission tracking for group management
⚠️ Note: These fields use var (mutable) - this is consistent with existing pattern but consider if immutability would be better

3. Data Type Change in FfiRemoteAttachment (xmtpv3.kt:13476)

data class FfiRemoteAttachment(
    // ...
-   var `contentLength`: kotlin.ULong,
+   var `contentLength`: kotlin.UInt,
    // ...
)

⚠️ POTENTIAL BREAKING CHANGE:

  • ULong (0 to 18,446,744,073,709,551,615) → UInt (0 to 4,294,967,295)
  • Maximum file size reduced from ~18 exabytes to ~4GB
  • Impact: This is likely intentional for mobile constraints, but could break existing code that stores/expects ULong values
  • Recommendation: Document this in changelog/migration guide if not already done

🔒 Security Considerations - GOOD

✅ All changes are in FFI bindings (data serialization layer)
✅ No direct cryptographic code modified
✅ Error handling properly propagates exceptions
✅ Type safety maintained with strongly-typed converters
✅ No raw pointer manipulation exposed to Kotlin

The native .so libraries are binary updates - cannot review directly, but:

  • Checksums are updated (integrity verification)
  • All architectures updated consistently (arm64-v8a, armeabi-v7a, x86, x86_64)

Performance - GOOD

Memory allocation: Proper size calculation in allocationSize() methods
No blocking operations: All FFI calls use uniffiRustCallWithError
Efficient serialization: Direct byte buffer operations via JNI

Mobile-specific considerations:

  • ULong → UInt change reduces memory footprint (good for mobile)
  • Additional fields in GroupUpdated add ~32 bytes per instance (minimal impact)

🧪 Test Coverage - NEEDS ATTENTION

⚠️ No tests found for new functions:

  • decodeText / encodeText
  • decodeWalletSendCalls / encodeWalletSendCalls
  • decodeGroupUpdated (new function, existing codec uses protobuf directly)

Existing test: library/src/androidTest/java/org/xmtp/android/library/GroupUpdatedTest.kt likely covers GroupUpdated functionality, but should verify it handles new admin fields.

Recommendation:

  1. Run existing test suite to ensure no regressions: ./gradlew connectedAndroidTest
  2. Consider adding tests for new codec functions (though this may be handled by higher-level codec tests)
  3. Verify GroupUpdated tests cover new admin fields

🐛 Potential Issues

  1. Breaking Change (Medium Priority)

    • FfiRemoteAttachment.contentLength: ULong → UInt
    • File: xmtpv3.kt:13476
    • Impact: Could break serialization of existing remote attachments > 4GB
    • Action: Verify this is intentional and documented
  2. API Checksum Updates (Expected)

    • All checksum values updated (xmtpv3.kt:2976-3075)
    • This will force clients to rebuild against new bindings
    • Action: Ensure version bump is communicated

📋 Kotlin/Android Best Practices - GOOD

✅ Proper null safety with ? and !! operators
✅ No coroutine issues (FFI calls are synchronous by design)
✅ Exception handling follows Kotlin conventions
✅ Data classes properly implement equals/hashCode
✅ ByteArray properly handled for binary data

Minor observation:

  • Data classes use var instead of val - this is consistent with UniFFI generated code but reduces immutability guarantees
  • Not an issue since this is auto-generated, just noting for context

Recommendations

  1. ✅ Merge-ready from code perspective - The bindings are properly generated

  2. 🔍 Before merging:

    • Run full test suite: ./gradlew test connectedAndroidTest
    • Verify ktlint passes: ./gradlew ktlintCheck
    • Confirm the ULong → UInt change is intentional and documented
    • Test with existing attachments to ensure no serialization breakage
    • Verify GroupUpdated tests cover new admin permission fields
  3. 📝 Documentation:

    • Document the breaking change in contentLength type if not already done
    • Update changelog with new codec functions
    • Note libxmtp version update (ab0df092)

Final Assessment

Overall: ✅ APPROVE with recommendations

This is a clean native library update with properly generated bindings. The code quality is good, security considerations are sound, and performance impact is minimal. The main concern is the contentLength type change which could be breaking - verify this is intentional and properly communicated.

The changes enhance the SDK with:

  • ✨ New text and wallet send call codecs
  • ✨ Admin permission tracking in group updates
  • ✨ Updated native library with latest fixes

| Branch: 11-29-release_v1.6.3

@neekolas neekolas marked this pull request as ready for review November 30, 2025 02:25
@neekolas neekolas requested a review from a team as a code owner November 30, 2025 02:25
@neekolas neekolas force-pushed the 11-29-release_v1.6.3 branch from e87dad6 to 755f253 Compare November 30, 2025 02:26
@neekolas neekolas merged commit 28dc724 into release Nov 30, 2025
8 of 10 checks passed
@neekolas neekolas deleted the 11-29-release_v1.6.3 branch November 30, 2025 02:27
@macroscopeapp
Copy link
Copy Markdown

macroscopeapp bot commented Nov 30, 2025

Release v1.6.3 and add new Uniffi FFI decode/encode functions with checksum enforcement and UInt content length in FfiRemoteAttachment in xmtpv3.kt

Introduce new UniffiLib FFI entrypoints for decode/encode, extend FfiGroupUpdated with admin fields, enforce checksums for new functions, and change FfiRemoteAttachment.contentLength to UInt. Update release workflow version and native .so binaries.

📍Where to Start

Start at uniffiCheckApiChecksums and the new top-level encode/decode functions in xmtpv3.kt.


Macroscope summarized 755f253.

neekolas added a commit that referenced this pull request Dec 2, 2025
neekolas added a commit that referenced this pull request Dec 3, 2025
* Release v1.6.2

* Release v1.6.3 (#505)

* Fix merge conflict

* Fmt
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