Artifact 7f5e6ed1721ad2a9fdce2bd2ba38e16935373855f6468f5911b92ee97a9393d8:
- File
conformance/repostate_gaps_test.go
— part of check-in
[30b9d65021]
at
2026-10-13 03:36:37
on branch main
— fix(tag): derive the check-in event time from direct date tags only (#372) (#380)
* fix(tag): derive the check-in event time from direct date tags only (#372)
Section 4.2, step 6 of repo-state-01 makes a date tag applied directly to a check-in set its event time, whatever order the tag and the check-in arrive in. Crosslinking read the date tagxref row whatever its source, so re-crosslinking after a propagating date tag retimed the descendants that inherited it, and a cancel, an unparsable value or 0 left no time or a time of 0, as fossil 2.28 does.
tag.RefreshEventTime now holds the rule, and both tag application and crosslinking call it: a direct, non-cancel date row whose value parses to 0 < r < 5373484.5 sets mtime; anything else restores the D-card time kept in omtime. The date-tag cancel, unparsable and zero cases are no longer deviations, and new before-checkin cases cover the other arrival order.
Tracked in #372.
* fix(tag): word the date-tag parse rule as step 6 does (#372)
* docs(changelog): tidy the entry spacing (#372) (user: [email protected], size: 1388) [annotate] [blame] [check-ins using]
package conformance import "testing" // repostateGaps marks the repository-state cases go-libfossil is known to // fail, by case ID, grouped by the code at fault, each with the issue // tracking its fix. None is open. var repostateGaps = map[string]string{} // repostateDeviations marks the cases where go-libfossil follows fossil(1) // rather than the draft text, by case ID. var repostateDeviations = map[string]string{ "repostate.7.3.parentless-untagged": parentlessDeviation, // verify.Rebuild now derives leaves through the crosslink sweep, so it shares // the same branch-aware leaf rule and the same ยง7.3 deviation. "repostate.7.3.parentless-untagged.rebuild": parentlessDeviation, } const parentlessDeviation = "follows fossil(1): an untagged parentless check-in is " + "never a leaf, where Section 7.3 makes every check-in without a same-branch " + "child one (the section's informative note records fossil's behavior)" // TestRepoStateGapKeys checks that every marked case exists. func TestRepoStateGapKeys(t *testing.T) { ids := map[string]bool{} for _, c := range repostateSuiteCases() { ids[c.ID] = true } for id := range repostateGaps { if !ids[id] { t.Errorf("repostateGaps names %s, which is not a case", id) } } for id := range repostateDeviations { if !ids[id] { t.Errorf("repostateDeviations names %s, which is not a case", id) } } }