From 45ee5a2a88db2d6edc1219140567ad19420e9e0b Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 15 Nov 2026 23:38:39 +0100 Subject: [PATCH] views: a picture whose answer names no make time is judged by its revision alone The assigner's first view of the indexer's modules stayed behind from 2026-11-14 15:04 UTC: events said the state was made 2026-10-29, the answer named no make time, and zero is always before it, so it asked 378 times and took in no event; every want kept its build of that day (the indexer's own new build was never wanted, so mesh-delivery #219 was never taken in). --- go/views/behind_internal_test.go | 21 +++++++++++++++++++++ go/views/follow.go | 7 +++++++ 2 files changed, 28 insertions(+) create mode 100644 go/views/behind_internal_test.go 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: