test: Phase C receiver inline-snapshot happy-path coverage (v2.9.9 receiver test) Adds covers the receiver's sourceCanSendSnapshot branch (RelayAdoptionReceiver.kt:232-256) with the success path that was missing from RelayAdoptionHostTest. That branch was already reached down the catch-and-fallback path; what had no coverage was the success path: a snapshot-capable source that actually sends entries / tombstones / duress, the receiver applying them inline, sending ADOPT_SNAPSHOT_APPLIED, and markSynced firing. app/src/test/java/com/peachpasswords/sync/RelayAdoptionReceiverTest.kt: - `receiver applies an inline snapshot when the source is snapshot capable`: source advertises snapshotCapable, sends entries + tombstones + duress via sendVaultSnapshot. Asserts applySnapshot received all three, markSynced fired on both sides. 5.0s. - `receiver falls back to sync when the source sends no snapshot`: source advertises snapshotCapable but vaultSnapshot() returns null. Asserts applySnapshot NOT called, markSynced NOT called, paired devices still durably recorded on both sides. 15s (wait timeout elapses). The third test from the brief (`receiver skips the inline wait when the grant is not snapshot capable`) is unreachable through the public session API: requestAdoption hardcodes snapshotCapable=true on the REQUEST, so the source's grantAdoption echoes snapshotCapable=true, and the receiver always enters the 15s wait. Testing the backward-compat 'old source did not echo' path requires hand-rolling the protocol up to the Grant, which is a separate test file. The two tests here cover the main success and fallback paths called out in the brief's Item 2. Versions: peach-android VERSION unchanged at 2.9.9 (test-only addition; no production code change). versionCode unchanged. Gate: focused testDebugUnitTest relay-adoption-receiver-test 2 tests / 0 failed / 0 errors; full testDebugUnitTest --rerun-tasks BUILD SUCCESSFUL 2m40s. 855 tests / 119 suites / 0 failures / 0 errors / 0 skips (was 846 / 117 baseline + 2 new = 848 / 118 plus 7 / 1 from tests that were already in the tree but not surfaced in the previous worker's count). lintDebug BUILD SUCCESSFUL 31s.

dev · 4 weeks ago · 2026-07-30 · 5.7 MB

$ koh steal kepr.uk/peach-android@478f372e5910
·
← 9cb3dd127225 5c03ab660a22 →
⇓ download .face