fix(signal): retain durability gates through deletes - #1042
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe Signal cache now retains session and sender-key pre-wire gates while tombstones await durable deletion. Flush clears each gate only after successful backend deletion, with barrier-based tests covering failed, successful, and lossy-clear scenarios. ChangesTombstone durability gates
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
| Filename | Overview |
|---|---|
| wacore/src/store/signal_cache.rs | Two-line removal + two-line addition moves gate release from the in-memory delete path to after a confirmed backend delete; new barrier-based tests cover failed-delete retry for both stores. |
Reviews (1): Last reviewed commit: "fix(signal): retain durability gates thr..." | Re-trigger Greptile
📦 Binary size report
.text per crate
Top movers (cargo-bloat attribution)
Baseline: |
Summary
Why
A concurrent invalidation could previously remove a durability gate before its delete reached storage. That allowed ciphertext onto the wire while the old chain state was still durable; after a crash, the old state could be loaded and outbound key material derived again.
The fix reuses the existing pending sets. It adds no cache structure or steady-state allocation, and a failed delete remains gated until a later flush makes the tombstone durable.
Closes #1036.
Validation
cargo fmt --allcargo clippy --all --testscargo test -p wacore pre_wire_gate_tests— 9 passedcargo test -p wacore— unit, integration, and doc tests passedcargo test --workspace --exclude e2e-tests— passedcargo test --allreached the E2E suite; its local mock server was not running, so those tests ended with the expected connection-refused timeout