Problem
rehydrate-sync/src/execute.rs and rehydrate-sync/src/push.rs have zero unit test coverage. The merge/reconciliation logic — exactly where a silent data-loss bug would hide — is currently exercised only by tests/full_pull_smoke.rs, which requires a real reMarkable plugged in over USB and is #[ignore] by default.
This was identified in the v1.0.0 release-readiness review as the highest-leverage post-ship gap.
Why this matters
- Pull/push reconciliation decides what wins when the tablet and the local library disagree. A regression here can silently drop a document version or overwrite a newer side.
- The CHANGELOG v0.9.0 already flagged "no IPC test harness" as a 1.0 punch list item — the sync engine gap is the same shape one layer down.
- We can't catch this in CI today: smoke tests need a physical device.
Suggested approach
- Build a
MockDevice (or extend rehydrate-device::fake) that returns scripted manifests, blob bytes, and write outcomes.
- Cover at minimum:
- Pull: new doc, updated doc, deleted-on-tablet doc, folder move, identical hash (no-op)
- Push: new doc upload, version restore, archive (soft-delete propagation on next sync), folder rename
- Reconciliation: both sides changed (current resolution policy), tombstone semantics, clock-skew guard
- Run on every PR (already cheap — no device, no network).
References
- crates/rehydrate-sync/src/execute.rs
- crates/rehydrate-sync/src/push.rs
- crates/rehydrate-sync/tests/full_pull_smoke.rs (the only existing coverage)
- crates/rehydrate-device/src/fake.rs (likely starting point for the mock)
Problem
rehydrate-sync/src/execute.rsandrehydrate-sync/src/push.rshave zero unit test coverage. The merge/reconciliation logic — exactly where a silent data-loss bug would hide — is currently exercised only bytests/full_pull_smoke.rs, which requires a real reMarkable plugged in over USB and is#[ignore]by default.This was identified in the v1.0.0 release-readiness review as the highest-leverage post-ship gap.
Why this matters
Suggested approach
MockDevice(or extendrehydrate-device::fake) that returns scripted manifests, blob bytes, and write outcomes.References