The assigner, the indexer and the grants part tell their followers when the bus made their consumer (issue 1966, recovery)
mesh/delivery merged: source.main moved to novox/mesh-delivery@e39ec444bd39
mesh/delivery-group group fix/1966-views-durable merged: every member is merged
mesh/check checking 173a7654ba61 on e39ec444bd39 | novox/mesh-delivery#184 in group fix/1966-views-durable

A consumer is made from now, so an event said between a first view and the consumer is never delivered; the hub says when the bus made it (EventHub.OnBound) and each follower asks again if behind (Follower.ConsumerMade).

Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
2026-11-09 02:27:38 +01:00
parent 4a59c17c68
commit 173a7654ba
3 changed files with 14 additions and 0 deletions
@@ -200,6 +200,12 @@ func (iv *indexerViews) start(ctx context.Context, w *world, wake func(), settle
}
})
}
// The hub says when the bus made its consumer: a picture asked before then is asked again (views.Follower.ConsumerMade).
iv.hub.OnBound(func(created time.Time) {
for _, f := range all {
f.ConsumerMade(ctx, created)
}
})
// Not heard, the indexer's views family is the finding family-not-heard until it binds (ADR 0615 §5): the handler is
// registered on the module's hub, which the assigner starts once every handler is.
_ = notHeardWriter(iv.findings, iv.logf).Bind(process.EventsStream, "the indexer's manifests, modules and graph are the first views' alone until the assigner starts again", func() error {
@@ -166,6 +166,8 @@ func followAssignments(ctx context.Context, hub *process.EventHub, cred process.
}()
// The assigner's views family, on the module's one hub (the host starts it once every handler is registered); a family the
// hub cannot register is the finding family-not-heard until the indexer starts again (ADR 0615 §5).
// The hub says when the bus made its consumer: a picture asked before then is asked again (views.Follower.ConsumerMade).
hub.OnBound(func(created time.Time) { f.ConsumerMade(ctx, created) })
_ = notHeardWriter(ctx, findings, logf).Bind(process.EventsStream, "the assignments is the first view's alone, asked again by hand, until the indexer starts again", func() error {
return hub.Handle("mesh.mod."+index.AssignerModule+".event."+views.EventPrefix+"*", views.Hear(ctx, map[string]*views.Follower{index.AssignmentsState: f}, logf))
})
@@ -158,6 +158,12 @@ func run(ctx context.Context, getenv func(string) string, logOut io.Writer) erro
if !registered {
registered = true
// An owner's views event goes to the follower of its state, which acknowledges it (firstviews.go).
// The hub says when the bus made its consumer: a picture asked before then is asked again (views.Follower.ConsumerMade).
hub.OnBound(func(created time.Time) {
for _, f := range byState {
f.ConsumerMade(ctx, created)
}
})
if err := hub.Handle(views.EventsPattern, hearViews); err != nil {
return err
}