Artifact 2ce4aca15e20970352c7cc4d4f11c39130f3e35c2be4b661ae7b18db96843429:
- File
conformance/sync_gaps_test.go
— part of check-in
[8f03734a23]
at
2026-10-13 11:38:52
on branch main
— test(sync): mark dangling deltas whose basis arrives in the same pass (#413)
* test(sync): mark a dangling delta whose basis arrives in the same pass
SP-7.7-4 requires every artifact stored in a pass whose bytes are available in that pass to be checked against its HASH. A delta stored dangling is not rechecked when its basis arrives later in the same reply or request; fossil's commit hook catches it and rolls the round back. Add client, clone and server cases for it, marked as gaps.
Tracked in #412.
* test(sync): note how the server late-basis case must tighten when its gap closes (user: [email protected], size: 1381) [annotate] [blame] [check-ins using]
package conformance import "testing" // syncGaps marks the sync cases go-libfossil is known to fail, by case ID, // grouped by the code at fault. var syncGaps = map[string]string{ // Receive storage (internal/sync/client.go storeReceived): a delta stored // dangling is not rechecked when its basis arrives later in the pass. "sync.7.7.late-basis-wrong-hash": "#412", "sync.7.7.clone-late-basis-wrong-hash": "#412", "sync.7.7.server-late-basis-wrong-hash": "#412", } // syncDeviations marks the cases where go-libfossil differs from the draft // on purpose, by case ID, with the reason. var syncDeviations = map[string]string{ "sync.5.2.client-clone-seqno": "the server tolerates a client-sent clone_seqno, " + "which no conforming client sends, rather than answering bad command (#255)", "sync.8.2.clone-zero-phantom": "Clone fetches the phantoms a clone leaves with a " + "follow-up pull, so that a clone it reports done is complete (#255)", } // TestSyncGapKeys checks that every marked case exists. func TestSyncGapKeys(t *testing.T) { ids := map[string]bool{} for _, c := range syncSuiteCases() { ids[c.ID] = true } for id := range syncGaps { if !ids[id] { t.Errorf("syncGaps names %s, which is not a case", id) } } for id := range syncDeviations { if !ids[id] { t.Errorf("syncDeviations names %s, which is not a case", id) } } }