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).
This commit is contained in:
2026-11-15 23:38:39 +01:00
parent 58c396e3dc
commit 45ee5a2a88
2 changed files with 28 additions and 0 deletions
+21
View File
@@ -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")
}
}
+7
View File
@@ -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: