diff --git a/go/views/behind_internal_test.go b/go/views/behind_internal_test.go new file mode 100644 index 00000000..286b1245 --- /dev/null +++ b/go/views/behind_internal_test.go @@ -0,0 +1,21 @@ +package views + +import ( + "testing" + "time" +) + +// TestAPictureWhoseAnswerNamesNoMakeTimeIsJudgedByItsRevision: an owner whose answer names no time its state was made (the +// indexer's modules) left the assigner's picture "behind" for good while events said 2026-10-29; by its revision it is not. +func TestAPictureWhoseAnswerNamesNoMakeTimeIsJudgedByItsRevision(t *testing.T) { + made := time.Date(2026, 10, 29, 8, 38, 50, 0, time.UTC) + f := &Follower{heardCreated: made, heardRev: 210} + f.st.Revision = 210 + if why := f.behindLocked(); why != "" { + t.Errorf("a picture at the revision heard, its answer naming no make time, is behind: %s", why) + } + f.heardRev = 211 + if why := f.behindLocked(); why == "" { + t.Error("a picture one revision short is not behind") + } +} diff --git a/go/views/follow.go b/go/views/follow.go index 9aa25d8d..7fb9f00d 100644 --- a/go/views/follow.go +++ b/go/views/follow.go @@ -370,6 +370,13 @@ func (f *Follower) behindLocked() string { return fmt.Sprintf("the consumer of its events was made at %s, after the first view was asked at %s: what was said between is not delivered", f.consumerMade.Format(time.RFC3339), f.st.Asked.Format(time.RFC3339)) case f.heardCreated.IsZero(): return "" + case f.st.Created.IsZero(): + // An answer that names no time its state was made cannot be judged by it (the indexer's modules answered none, and + // the assigner's picture stayed behind for good, its wants unchanged since 2026-11-14): its revision alone says. + if f.heardRev > f.st.Revision { + return fmt.Sprintf("revision %d heard, the picture holds %d", f.heardRev, f.st.Revision) + } + return "" case f.heardCreated.After(f.st.Created): return fmt.Sprintf("the state was made again at %s, the picture holds the one made at %s", f.heardCreated.Format(time.RFC3339), f.st.Created.Format(time.RFC3339)) case f.heardCreated.Equal(f.st.Created) && f.heardRev > f.st.Revision: