fix(replication): send full Document envelope, not just user payload (v1.7.1)
The leader was broadcasting only `doc->data.dump()` — just the user's
JSON fields. The follower's applyReplicatedEntry then parsed that via
Document::fromJson, which expects the full envelope (id, collection,
data, version, timestamps, encryption state). Document::fromJson reads
`j.value("data", {})` — so the user's payload ended up in the "data
field fallback of itself" and became empty.
Result: replication produced structurally-correct stubs (right _id and
_version) but zero user content. Pre-existing bug from commit a96c168
(2026-02-05), unrelated to v1.7.0 eviction work. Surfaced by the
replication sanity load test added in commit 7b9a08e.
Fix is one line — use doc->toJson() instead of doc->data.dump() on the
leader. Follower code unchanged.
Verified with tests/load_test/run_replication_test.sh:
before fix: 1000 docs replicated, 0 content matches, 1000 mismatches
after fix: 1000 docs replicated, 1000 matches, 0 mismatches, 366ms