test(mountsync): cover write-only to mirror mode-flip backfill
Draft
KH
3mo ago+73+73+01234567890123456789-0-0-0123456789
Closes #262.
Adds the missing regression for a write-only mount later flipped to mirror mode: performs a real write-only cycle, recreates the syncer in mirror mode against the same state dir, and proves pre-existing remote history is tree-listed/read/materialized instead of being skipped by the restart fast-path.
Test-only PR, no production code change. The underlying runtime fix (persist SyncMode and reset BootstrapComplete/bootstrap checkpoints in loadState on write-only→mirror transition) already exists on main — independently verified this test passes cleanly against a fresh origin/main checkout with no other changes, before opening this PR.
Test plan
-
go test ./internal/mountsync/... -run TestSyncOnceWriteOnlyToMirrorBackfillsExistingRemoteFiles -v -count=1 -
go test ./internal/mountsync/... -count=1