Adds a Rateless Bloom Filter + residual IBLT hybrid for the sync
pre-flight, implementing the divergent-replica reconciliation scheme
from arXiv 2510.27614 (Silva Gomes & Baquero, 2025).
When the local revision count exceeds RBF_REV_COUNT_THRESHOLD (200) —
the heuristic for initial clones and post-partition reconnects — the
client now ships a small RBF + small residual IBLT instead of an
over-provisioned single-stage IBLT. The receiver partitions its key
set by the Bloom filter, builds the candidate-intersection residual
IBLT, and subtracts the client bundle to recover missing_from_remote
in one round trip.
Wire-format change is strictly additive: two new SyncMessage variants
(RbfRequest, RbfResponse) are appended after SealedFileAck; all
existing discriminants are preserved (regression test added). Onion
diff and transport framing are unchanged.
Files modified / added:
- crates/clawsync-onion/src/rbf.rs (new module, 30 unit tests + 3 proptests)
- crates/clawsync-onion/src/manifest.rs (RbfManifest bundle type + 6 tests)
- crates/clawsync-onion/src/lib.rs (re-exports)
- crates/clawsync-transport/src/protocol.rs (RbfRequest/RbfResponse variants + 3 roundtrip tests)
- crates/clawsync-cli/src/main.rs (heuristic switch in client push path + server dispatch)
- crates/clawsync-agent/src/backend.rs (TCP/QUIC/SSH push paths opt into RBF)
- CHANGELOG.md (Unreleased entry)
- crates/clawsync-onion/proptest-regressions/rbf.txt (seed file)
Gates:
- cargo check --workspace: clean
- cargo clippy -p (affected crates) --lib --bins --tests -- -D warnings: clean
- cargo test --workspace: 704 passed / 0 failed (87 in clawsync-onion incl. all RBF tests)