Fix OTK-count semantics: absent is zero under sync v2, unknown under sliding sync #90
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Review finding (2026-08-13 recommendation review), CR-6/§10.4/§3.3.
SyncBatch.oneTimeKeyCounts is nullable (absent = null), but SessionCrypto.kt:92 collapses null to emptyMap and AccountKeeper.updateKeyCounts (AccountKeeper.kt:81) skips replenishment when signed_curve25519 is absent — for BOTH sources.
Per matrix-rust-sdk fix 6780 (they split receive_sync_changes by sync flavour for exactly this): under sync v2 an absent device_one_time_keys_count means ZERO remaining keys; under MSC4186 an absent e2ee extension means no information. Current katrix behavior is correct for sliding only. Failure mode is silent OTK exhaustion — peers get UTDs (rust-sdk v2 bug manifested as no one-time keys being uploaded).
Acceptance: SyncBatch carries per-source absence semantics (v2 absent means zero, sliding absent means unknown); tests on both sources; spec §10.4 note.