Artifact 025efe98cd65a9f8a4478931710b7b18495cabac57de2300c50e5b76ff98cb2f:
- File
conformance/horizon_test.go
— part of check-in
[d9b18ab619]
at
2026-10-18 18:40:30
on branch feat/submanifest-reader
— test(conformance): pin the sparse-cone and horizon drafts, with zit as the cone oracle
The two drafts from zit's horizon-rfc branch at 86d4b67372, their requirements tables (later phases recorded as not yet implemented), the sparsecone suite over the cone specification and the sparse worktree, and the horizon suite's one case. zit's serialized cones, the files its sparse worktrees materialize over flat and tree histories, and a commit from a zit sparse worktree are recorded under testdata/zit-cones and replayed without zit. (user: [email protected], size: 1032) [annotate] [blame] [check-ins using] [more...]
package conformance import ( "testing" "github.com/danmestas/go-libfossil/internal/cone" ) // The horizon suite tracks draft-fossil-horizon-00, none of which is // implemented yet. Its one case is the half of ยง3.3 that binds an // implementation predating the document: a cone serialized with a version // go-libfossil does not know, as a cone carrying a horizon member will be, // is refused rather than read as path members. func horizonSuiteCases() []Case { return []Case{horizonUnknownVersion} } var horizonUnknownVersion = Case{ID: "horizon.3.3.unknown-version", Req: "HZ-3.3-2"} func TestHorizon(t *testing.T) { check(t, horizonUnknownVersion, func() error { // A version-2 cone with one inclusion, relabelled as each later // version: a reader that skipped the version would see "src". for v := byte(3); v < 8; v++ { forged := []byte{0, v, 1, 0, 3, 0, 's', 'r', 'c'} if c, err := cone.Parse(forged); err == nil { return expectf("serialized version %d read as %v", v, c) } } return nil }) }