RD-1: the validator reads a seat-named view in consumes
seat:<seat>.views.<state> is accepted where the seat's definition offers the state as a view, and refused naming it where it does not or the seat is unknown; the trunk called the seat: prefix no usable name. Builds: design 47 G §621, §616, §699 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user