docs: reflect group/status sender-key leasing and store incarnation (whatsapp-rust#1027) - #404
Conversation
…whatsapp-rust#1027) PR #1027 fixed a crash-safety gap where the production group-send path bypassed the durability gate entirely, and folded group/status sender-key advances into the same batched counter-lease pattern DMs already use (instead of a synchronous flush on every send). It also introduced a store-incarnation marker so a clean reload/reconnect no longer burns an unused lease batch the way an actual crash recovery must.
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Addresses greptile review nit on PR #404.
The DM flush-scheduling bullet unconditionally said every load fast-forwards, which contradicted the Clean reload vs. crash recovery section added just below it (a trusted store-backed reload does not fast-forward). Addresses greptile review feedback on PR #404.
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
#404 (whatsapp-rust#1027 docs) merged to main and rewrote the same "Flush scheduling" bullets this branch touched. Kept #404's version of the DM/group-send bullets, downgrade warning, and new "Clean reload vs. crash recovery" section, and re-layered this branch's retry-recovery paragraph on top. Also added a caveat, prompted by review, that the pre-wire flush gate is a point-in-time check: a session checked out by a concurrent operation is skipped by flush() without failing it, so a successful flush doesn't guarantee that specific session's reservation cleared. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mpevz37YPKV1SB8GNmwCqB
Summary
Reflects whatsapp-rust#1027 ("fix(signal): gate the group sender-key advance before the wire"), which:
wacore::send::encrypt_group_message) was a second, unguarded implementation that didn't gate the sender-key advance on durability — the docs claim that group/status sends "always persist synchronously" was true in intent but not in the code that actually ran. That path now delegates to the sharedgroup_encryptprimitive.SessionRecord, documented for #1026) to group/status sends via a newSenderKeyRecord::reserve_iterations, so most group/status sends now ride the coalesced write-behind instead of flushing on every send.SignalStoreCache::clear_after_flush(), which only evicts fully-settled cache entries instead of unconditionally clearing everything after a flush.Changes
advanced/signal-protocol.mdx— updated the "flush scheduling" bullet for group/status sends (was: "ignores the lease... on every send... not implemented yet"), updated the downgrade warning, and added a new "Clean reload vs. crash recovery" section documenting the store-incarnation mechanism.api/send.mdx— updated thesend_messagedurability note to describe the shared DM/group/status lease model.api/client.mdx— updatedflush_pending_signal_statedocs to match.concepts/architecture.mdx— updated the disconnect-cleanup table row and added a note on settled-only eviction (clear_after_flush).No changes under
changelog/(per project convention, that's maintained by a human).Test plan
wacore/src/store/signal_cache.rs,wacore/libsignal/src/protocol/{sender_keys,group_cipher,state/session}.rs,wacore/libsignal/src/protocol/local_field.rs,wacore/src/send/encrypt.rs,src/store/signal.rs,src/message/commit_batch.rs) to verify every claim against the actual code changes and new tests.mint broken-links(not run locally in this environment — no network-installed Mintlify CLI)Generated by Claude Code
Summary by cubic
Update docs for group/status sender-key leasing and a unified, durability‑gated group/status encrypt path that only flushes on lease extension. Add store‑incarnation behavior for trusted reloads, clarify the DM fast‑forward wording to match it, note settled‑only eviction via
SignalStoreCache::clear_after_flush(), and fix theOnceLockarticle nit.SessionRecord/SenderKeyRecordand can reuse counters/iterations that were only reserved (status@broadcast reactions follow DM lease rules).Written for commit 53730a6. Summary will update on new commits.