G findings: mesh-config's and mesh-vault's owner views are followed by the reader (Follow), not adopted: they hear the owner's own views event

Adopt subscribes a seat's event with further parts (<seat>.<event>.>), which never matches the plain views event of an owner; the reader's Follow hears it and asks again on a gap. Also the distribution whole test counts its own two events by subject, as the writer's are said beside them.

Builds: design 47 G A-28, A-26, A-30
This commit is contained in:
2026-11-11 22:22:24 +01:00
parent c81915b039
commit d03ffa8038
6 changed files with 50 additions and 80 deletions
@@ -210,9 +210,12 @@ func TestDistributionWhole(t *testing.T) {
i, err := c.Info(ctx)
return err == nil && i.NumPending == 0 && i.NumAckPending == 0 && i.Delivered.Consumer >= 2
})
info, _ := s.Info(ctx)
if info.State.Msgs != 2 {
t.Errorf("distribution.events holds %d events, want old-name-closed and direct-writes-closed once each", info.State.Msgs)
// The stream holds the module's own events once each; the finding writer's (design 47 G A-30) are said beside them.
info, _ := s.Info(ctx, jetstream.WithSubjectFilter("mesh.stream.distribution.event.>"))
for _, ev := range []string{holder.OldNameClosedEvent, holder.DirectWritesClosedEvent} {
if n := info.State.Subjects["mesh.stream.distribution.event."+ev]; n != 1 {
t.Errorf("distribution.events holds %s %d times, want once", ev, n)
}
}
for _, ev := range []string{holder.OldNameClosedEvent, holder.DirectWritesClosedEvent} {
if _, err := s.GetLastMsgForSubject(ctx, "mesh.stream.distribution.event."+ev); err != nil {