Skip to content

Release 1.10.0 updates into main#3327

Open
cameronvoell wants to merge 14 commits intomainfrom
cv/release-1.10-updates-into-main
Open

Release 1.10.0 updates into main#3327
cameronvoell wants to merge 14 commits intomainfrom
cv/release-1.10-updates-into-main

Conversation

@cameronvoell
Copy link
Copy Markdown
Contributor

@cameronvoell cameronvoell commented Mar 13, 2026

Release 1.10.0 SDK updates with manual history sync into main

  • Bumps workspace version to 1.11.0-dev and adds release notes for Android/iOS 4.10.0 and Node/WASM 1.10.0 SDKs
  • Makes history sync manual (breaking change): removes automatic sync behavior and deprecates preferences.sync() in favor of explicit archive management methods
  • Adds tests for the new manual sync request flow and archive-based device sync across Android (HistorySyncTest.kt), iOS (HistorySyncTests.swift), and mobile bindings (tests.rs)
  • Behavioral Change: callers must now explicitly call sendSyncRequest and process archives with a PIN; automatic history transfer on new installation no longer occurs
📊 Macroscope summarized 0887d86. 1 file reviewed, 2 issues evaluated, 0 issues filtered, 1 comment posted

🗂️ Filtered Issues

@cameronvoell cameronvoell requested review from a team as code owners March 13, 2026 20:07
@claude
Copy link
Copy Markdown

claude bot commented Mar 13, 2026

Claude finished @cameronvoell's task —— View job


Code Review Complete

Review Date: April 7, 2026 at 16:42 UTC


Critical Issue

⚠️ CI Test Coverage Disabled (.github/workflows/test.yml)

The workflow file appears to have proper conditional logic based on path changes, which is good. However, Macroscope's review comment flagged that jobs may have been temporarily disabled - I verified this is NOT the case in the current version. All test jobs properly use needs.detect-changes.outputs.<platform> == 'true' conditions, not hardcoded if: false. This appears to have been fixed since the Macroscope review.


Code Quality Issues

1. Dead Code in Android Test (HistorySyncTest.kt:178-187)

Lines 178-187 contain unreachable code copied from testSyncConsent:

// Sync both clients until consent propagates to client2.
// Client1 publishes the worker-queued intent, client2 pulls the update.
waitUntil {
    alixClient.preferences.sync()
    alixClient2.preferences.sync()
    group2.consentState() == ConsentState.DENIED
}

assertEquals(group2.consentState(), ConsentState.DENIED)

This code references alixClient2 and group2 which don't exist in testSyncDeviceArchive. It appears to be copy-paste remnants that should be removed.

2. Resource Cleanup Concern (HistorySyncTest.kt:326-329)

The test at line 322 creates alixClient directly via Client.create() instead of using the createClient() helper. While the previous Macroscope review about this was marked "no longer relevant", I verified the current code and the concern remains valid: this client is not added to createdClients for proper cleanup in tearDown(). This could cause database connection leaks.

Recommendation: Use createClient(alixWallet, localApi, deviceSyncEnabled = false) for consistent cleanup.

3. Test Flakiness (HistorySyncTests.swift)

Multiple iOS tests are skipped due to flakiness:

  • testSyncMessages (line 107)
  • testSyncDeviceArchive (line 181)
  • testStreamConsent (line 280)
  • testStreamPrivatePreferences (line 347)

While skipping flaky tests is pragmatic for CI, this represents significant missing test coverage for critical functionality (message sync, archive sync, streaming). Consider investigating root causes.


Test Coverage

Positive:

  • New archive-based sync tests added to Android, iOS, and Rust bindings
  • Tests verify message visibility across installations
  • Comprehensive coverage of sync request flow

Concerns:

  • 4 out of 7 iOS history sync tests are skipped
  • Android testDisablingHistoryTransferDoesNotTransfer has inconsistent message count expectations (line 334 expects 2 messages, line 365 expects same count despite deviceSyncEnabled difference)

Performance Considerations

No obvious performance issues in the changed code. The PR description mentions a performance fix for apps with many conversations or disappearing messages, but I don't see the actual implementation changes in this diff - likely in a different PR.


Security

No security concerns identified. The archive-based sync maintains encryption, and the manual sync request change actually improves security by giving developers explicit control over network activity.


Release Notes

Well-documented breaking changes and migration paths. The documentation clearly explains:

  • Manual history sync requirement
  • Deprecation timeline for preferences.sync()
  • New archive management APIs

Recommendations

  1. High Priority: Remove dead code at HistorySyncTest.kt:178-187
  2. High Priority: Fix resource cleanup in testDisablingHistoryTransferDoesNotTransfer (line 326)
  3. Medium Priority: Investigate and fix flaky iOS tests to restore coverage
  4. Low Priority: Verify Android test expectations in testDisablingHistoryTransferDoesNotTransfer are correct

@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Mar 13, 2026

Approvability

Verdict: Needs human review

2 blocking correctness issues found. There is an unresolved critical review comment identifying a compilation error in the Android test file (undefined variables alixClient2 and group2), and a high-severity comment about CI tests being disabled. These substantive issues require human attention before merging.

You can customize Macroscope's approvability policy. Learn more.

fixes device sync tests in mobile bindings, android, and ios so it
correctly verifies functionality

<!-- Macroscope's pull request summary starts here -->
<!-- Macroscope will only edit the content between these invisible
markers, and the markers themselves will not be visible in the GitHub
rendered markdown. -->
<!-- If you delete either of the start / end markers from your PR's
description, Macroscope will append its summary at the bottom of the
description. -->
> [!NOTE]
> ### Fix device sync mobile bindings tests for iOS, Android, and Rust
> - Adds new tests for the full device sync request flow in [Rust
bindings](https://github.com/xmtp/libxmtp/pull/3288/files#diff-04f42fcf088abf13f3a20c3e154feac6341b3e9938a0f46f831a23b21a0aed74),
[Android](https://github.com/xmtp/libxmtp/pull/3288/files#diff-33ca4980924b8d59d5ffc62a9e4dd6a5a30413b2183b9a946f9bba9faa3ac79f),
and
[iOS](https://github.com/xmtp/libxmtp/pull/3288/files#diff-c046ca278ac5c7d2a98b0d5353c906570b0a18bfe3a192448723a3ef4ceab6fa),
covering message replication, consent sync, and archive-based history
restore.
> - Replaces fixed delays with polling loops and explicit
`sendSyncRequest` calls to make tests deterministic and less flaky.
> - Adds archive upload/process tests (`testSyncDeviceArchive`) on both
Android and iOS that validate pre-installation history is restored via a
pinned archive.
> - Updates `getrandom` from 0.3 to 0.4 with the `sys_rng` feature in
the workspace hack crate to unblock builds.
> - Behavioral Change: `testDisablingHistoryTransferDoesNotTransfer` now
explicitly creates clients with `deviceSyncEnabled=false/true` and
tightens assertions around which messages are visible post-sync.
>
> <!-- Macroscope's review summary starts here -->
>
> <sup><a href="https://app.macroscope.com">Macroscope</a> summarized
190a4e7.</sup>
> <!-- Macroscope's review summary ends here -->
>
<!-- Macroscope's pull request summary ends here -->

---------

Co-authored-by: cameronvoell <cameronvoell@users.noreply.github.com>
Co-authored-by: Dakota Brink <git@kota.is>
@cameronvoell cameronvoell force-pushed the cv/release-1.10-updates-into-main branch from eea6742 to eec7151 Compare March 13, 2026 20:17
macroscopeapp[bot]
macroscopeapp bot previously approved these changes Mar 13, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.14%. Comparing base (175dd2c) to head (0887d86).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3327      +/-   ##
==========================================
+ Coverage   83.04%   83.14%   +0.09%     
==========================================
  Files         377      377              
  Lines       51255    51255              
==========================================
+ Hits        42564    42615      +51     
+ Misses       8691     8640      -51     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cameronvoell cameronvoell mentioned this pull request Mar 16, 2026
4 tasks
@macroscopeapp macroscopeapp bot dismissed their stale review March 17, 2026 16:33

Dismissing prior approval to re-evaluate a24032c

macroscopeapp[bot]
macroscopeapp bot previously approved these changes Mar 17, 2026
@macroscopeapp macroscopeapp bot dismissed their stale review March 19, 2026 04:15

Dismissing prior approval to re-evaluate ed55ae1

test-workspace:
needs: detect-changes
if: needs.detect-changes.outputs.workspace == 'true'
if: false
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 High workflows/test.yml:89

The commit hardcodes if: false for test-workspace, test-node, test-wasm, test-android, and test-bindings-check jobs, and hardcodes if: true for test-ios, while removing all other jobs from the final test gate's needs array. If merged, this disables CI test coverage for everything except iOS, allowing untested code to be merged without detection. The detect-changes job still runs but its outputs are never consumed.

-    if: false
+    if: needs.detect-changes.outputs.workspace == 'true'
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file .github/workflows/test.yml around line 89:

The commit hardcodes `if: false` for `test-workspace`, `test-node`, `test-wasm`, `test-android`, and `test-bindings-check` jobs, and hardcodes `if: true` for `test-ios`, while removing all other jobs from the final `test` gate's `needs` array. If merged, this disables CI test coverage for everything except iOS, allowing untested code to be merged without detection. The `detect-changes` job still runs but its outputs are never consumed.

@cameronvoell cameronvoell force-pushed the cv/release-1.10-updates-into-main branch from 668f62a to 3d28971 Compare March 20, 2026 19:37
@cameronvoell cameronvoell force-pushed the cv/release-1.10-updates-into-main branch from 3d28971 to 3650b6f Compare March 20, 2026 21:38
Comment on lines +181 to +187
alixClient.preferences.sync()
alixClient2.preferences.sync()
group2.consentState() == ConsentState.DENIED
}

assertEquals(group2.consentState(), ConsentState.DENIED)
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Critical library/HistorySyncTest.kt:181

Lines 181-186 reference undefined variables alixClient2 and group2, which will cause a compilation error. These variables don't exist in testSyncDeviceArchive() — only client1, client2, group, group2Before, and group2After are declared. This appears to be leftover code accidentally copied from testSyncConsent(). Remove these lines.

-            // Sync both clients until consent propagates to client2.
-            // Client1 publishes the worker-queued intent, client2 pulls the update.
-            waitUntil {
-                alixClient.preferences.sync()
-                alixClient2.preferences.sync()
-                group2.consentState() == ConsentState.DENIED
-            }
-
-            assertEquals(group2.consentState(), ConsentState.DENIED)
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file sdks/android/library/src/androidTest/java/org/xmtp/android/library/HistorySyncTest.kt around lines 181-187:

Lines 181-186 reference undefined variables `alixClient2` and `group2`, which will cause a compilation error. These variables don't exist in `testSyncDeviceArchive()` — only `client1`, `client2`, `group`, `group2Before`, and `group2After` are declared. This appears to be leftover code accidentally copied from `testSyncConsent()`. Remove these lines.

Evidence trail:
- sdks/android/library/src/androidTest/java/org/xmtp/android/library/HistorySyncTest.kt lines 20-22: class-level properties `alixClient`, `boClient`, `caroClient`, `alixWallet` (no `alixClient2`)
- Lines 128-187: `testSyncDeviceArchive()` function - declares `client1`, `client2`, `group`, `group2Before`, `group2After`
- Lines 178-186: references `alixClient2.preferences.sync()` and `group2.consentState()` - neither variable exists in this function
- Lines 48-90: `testSyncConsent()` - declares `alixClient2` at line 58 and `group2` at lines 74-76, with identical code block at lines 82-89

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