Artifact 62015316cdd0c6f963de6f523a9037eb870eebe2764ba67ee1d037879db4247d:
- File
conformance/sync_gaps_test.go
— part of check-in
[8cc3d7c5e4]
at
2026-10-13 02:23:50
on branch test/conformance-01-drafts
— test(conformance): check the -01 drafts of artifact, repo-state and sync
Re-pin the conformance suite to draft-fossil-artifact-format-01, draft-fossil-repo-state-01 and draft-fossil-sync-protocol-01, copied byte for byte from zit check-in 100351e26c. The delta format has no -01 and stays on -00. The -00 errata are folded into -01 and are no longer pinned; the six -01 errata are pinned for the fossil 2.28 behavior they record. conformance/rfcs/README.md records where each copy came from.
The requirement tables are re-read against -01, and new cases cover the date tag's event time (repo-state ยง4.2 step 6), the Julian-day grammar, a delta manifest naming a delta, dropped reserved F cards, the trailing-punctuation retry, truncated payloads, errors N, a file card after a refused push, the end of a request after a failed login, and the answer to a gimme for private content.
No library behavior changes. Where -01 departs from fossil 2.28 and go-libfossil follows fossil (a cancelled, unparsable or 0 date tag), the cases are marked as deviations. The non-conformances the re-pin exposes are marked as gaps, tracked in #370, #371, #372, #373, #374 and #375. (user: [email protected], size: 2382) [annotate] [blame] [check-ins using] [more...]
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{ // The client sends an unversioned file named by SHA3 to a server older // than SHA3 support, where fossil sends the refusal in its place // (internal/sync/client.go buildUVFileCards). "sync.7.6.client-uv-gate": "#303", // A payload cut short by the end of the body fails the whole decode: // the server answers HTTP 400 and the client keeps none of the reply // (internal/xfer decode), where Section 5.1 makes it a handler failure. "sync.5.1.truncated-payload-server": "#373", "sync.5.1.truncated-payload": "#373", // The server's card loop (internal/sync/handler.go): a file card after // a refused push is refused without a reset and does not end card // processing (Section 6.6); a failed login skips the end-of-request // steps and the closing comment (6.4); errors N counts the unknown-card // error and the private-content refusal (5.3). "sync.6.6.file-after-refused-push": "#374", "sync.5.3.errors-counts-reset": "#374", "sync.6.4.failure-end-of-request": "#374", "sync.5.3.errors-skips-bad-command": "#374", "sync.5.3.errors-skips-private-refusal": "#374", // handleGimme skips private content outside a private sync, where // Section 8.6 answers a peer dated 2020-04-13 or later with igot HASH 1. "sync.8.6.private-gimme-igot": "#375", } // 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) } } }