kupakupar (#3356): re-enabling the library (or an agent's models) on a
computer that synced with the part left out sent that computer's older
content up over the server's newer one. What #6428 fixed for states
since it writes — a part left out is marked in Off, and one synced again
joins like a first sync — did not reach the states older magpies wrote:
they carry no Off mark, so the join saw a real hash against the
nothing-hash the last sync left and took it as a change here, against a
server it had already seen.
A part that syncs now, whose baseline is the nothing-hash a left-out
part carries and that holds something of its own here, joins again the
same way: each side's own counts as changed there, the newer stays. A
state since #6428 already names such parts in Off and takes the old
path; a first sync has no baseline to compare and is the join already.
Run (worktree at base a8fa771a6):
- go test ./internal/davsync -run TestSyncPartTurnedBackOn: ok, the
marked and the unmarked state both; broken by hand: the unmarked
state's fallback loop taken out puts the overwrite back
(TestSyncPartTurnedBackOnWithoutOffMark)
- go test ./internal/davsync -count=1 -timeout 25m: ok
- gofmt -l: clean; go vet ./internal/davsync: clean
Generated-by: GLM-5.3-Flash (ZCode)