diff --git a/modules/mesh-delivery-indexer/judge/rules.go b/modules/mesh-delivery-indexer/judge/rules.go index b2e091a9..6e5cf777 100644 --- a/modules/mesh-delivery-indexer/judge/rules.go +++ b/modules/mesh-delivery-indexer/judge/rules.go @@ -1706,6 +1706,19 @@ func EventProblems(m catalogue.Manifest) []string { m.Module, c, catalogue.TheRest)) continue } + if seat, state, isSeat, err := catalogue.SeatViewConsume(c); isSeat { + // A consumed view of a seat (design 47 G §616, §699): the seat offers the state as a view; the holder is resolved + // where the view is followed. + switch s, known := catalogue.SeatNamed(seat); { + case err != nil: + problems = append(problems, fmt.Sprintf("%s consumes %v", m.Module, err)) + case !known: + problems = append(problems, fmt.Sprintf("%s consumes %q, a view of the seat %q, "+catalogue.UndeclaredSeat, m.Module, c, seat)) + case !slices.Contains(s.Views, state): + problems = append(problems, fmt.Sprintf("%s consumes %q, and the seat %s does not offer the state %q as a view (design 47 G §699)", m.Module, c, seat, state)) + } + continue + } if err := consumePattern(c); err != nil { problems = append(problems, fmt.Sprintf("%s consumes %q: %v", m.Module, c, err)) }