Artifact 8dca44317cd38d3ac12ab4329bbe1aa5467c8d67c151ed764aa4cbc59a992a93:
- File
conformance/repostate_eventtags_test.go
— part of check-in
[f61c8174a8]
at
2026-10-17 20:27:53
on branch main
— test(conformance): re-pin the -01 drafts with the 2026-10-14/16 errata (#436)
zit check-in 3f86ff4261 applies six more errata to the -01 drafts. Copy the three drafts and the five new -01 errata files, re-pin their SHA-256 in the requirements tables, and record the check-in in the README.
The draft text changes add six requirements and reword two:
- AF-4.7.3-2: a named delta's delete markers are filtered out of a delta-of-delta's file set and lookups. - AF-4.7.8-1: an absent and a present empty J value decode alike. - AF-6.2-7: the Z verification state is read from the bytes at n-35 and n-34, not from card lines. - RS-5.3-3: a cancel keeps its card's value on the row it writes. - RS-5.3-6: the event table and propagation treat that value as null. - RS-5.3-7: an artifact's tag cards apply in card order. - RS-6.2-4: a branch root carrying *sym-NAME and -sym-NAME keeps the tag. - SP-6.6-4: a client recognizes a refusal by its leading text.
go-libfossil already behaves this way. Each row has a case, checked against fossil 2.28 where the harness does: 421 requirements, 420 covered, 1 partial (SP-9.5-7, as before).
The repo-state ยง5.3 step 3 change is filed in zit as a -00 erratum and is not pinned, like the other -00 errata; the -01 draft carries its text. (user: [email protected], size: 2973) [annotate] [blame] [check-ins using]
package conformance import "testing" // The bgcolor, user and comment tags override a check-in's derived event row // (bgcolor, euser, ecomment), whatever the tag's type, and a cancel clears // the column. fossil(1) does this in tag_insert when the tag arrives after // the check-in and in manifest_crosslink when it arrived first, while the // check-in was still a phantom. draft-fossil-repo-state-01 does not describe // these columns, so the cases name no requirement and stay out of the // coverage audit, with fossil(1) as their reference. // eventTagCase compares the bgcolor, euser and ecomment of the check-ins. func eventTagCase(id string, arts []rsArt, want []string, ignoring ...string) rsCase { return rsCase{ Case: Case{ID: id}, arts: arts, tables: []string{"eventcols"}, want: rows("eventcols", want...), ignoring: ignoring, rebuild: true, each: true, } } func eventTagCases() []rsCase { base := chain()[:2] none := "NULL NULL NULL" return []rsCase{ eventTagCase("repostate.fossil.bgcolor-singleton", with(base, control("t", 9, "+bgcolor {c2} red")), []string{"c1 " + none, "c2 'red' NULL NULL"}, "-eventcols: c2 'red' NULL NULL", "+eventcols: c2 "+none), eventTagCase("repostate.fossil.bgcolor-propagating", with(chain(), control("t", 9, "*bgcolor {c2} red")), []string{"c1 " + none, "c2 'red' NULL NULL", "c3 'red' NULL NULL", "c4 'red' NULL NULL"}, "-eventcols: c3 'red' NULL NULL", "+eventcols: c3 "+none), eventTagCase("repostate.fossil.bgcolor-cancel", with(chain()[:3], control("t1", 8, "*bgcolor {c2} red"), control("t2", 9, "-bgcolor {c2}")), []string{"c1 " + none, "c2 " + none, "c3 " + none}, "-eventcols: c2 "+none, "+eventcols: c2 'red' NULL NULL"), eventTagCase("repostate.fossil.user-tag", with(base, control("t", 9, "+user {c2} bob")), []string{"c1 " + none, "c2 NULL 'bob' NULL"}, "-eventcols: c2 NULL 'bob' NULL", "+eventcols: c2 "+none), eventTagCase("repostate.fossil.comment-tag", with(base, control("t", 9, "+comment {c2} reworded")), []string{"c1 " + none, "c2 NULL NULL 'reworded'"}, "-eventcols: c2 NULL NULL 'reworded'", "+eventcols: c2 "+none), } } // cancelValueNotCached cancels bgcolor with a value: the row keeps it, but // the event table takes the cancel as null (Section 5.3, step 3). Unlike the // cases above it names a requirement, so it runs in TestRepoState. func cancelValueNotCached() rsCase { none := "NULL NULL NULL" c := eventTagCase("repostate.5.3.cancel-value-not-cached", with(chain()[:3], control("t1", 8, "*bgcolor {c2} red"), control("t2", 9, "-bgcolor {c2} why")), []string{"c1 " + none, "c2 " + none, "c3 " + none}, "-eventcols: c2 "+none, "+eventcols: c2 'why' NULL NULL") c.Req = "RS-5.3-6" return c } func TestRepoStateEventTags(t *testing.T) { runRepoStateCases(t, eventTagCases()) } func TestRepoStateEventTagsReasons(t *testing.T) { checkRepoStateReasons(t, eventTagCases()) }