diff --git a/modules/mesh-delivery-indexer/judge/rules_test.go b/modules/mesh-delivery-indexer/judge/rules_test.go index 7ff73f7e..a1db9033 100644 --- a/modules/mesh-delivery-indexer/judge/rules_test.go +++ b/modules/mesh-delivery-indexer/judge/rules_test.go @@ -2457,11 +2457,11 @@ func caseAProcessBusNamesOnlyTheModulesOwn(t *testing.T) { } } -// 1179/AC4: a bus declaring serves, holds, claims or a seat is refused naming the key; a bus with invokes of -// a tool or a seat verb is accepted. +// 1179/AC4, changed by design 47 G A-107, A-109, A-110: a bus declaring holds, claims or a seat is refused naming the +// key; a bus declaring serves (the seat verbs the process answers, each seat:.) is accepted and given whole to +// the grant composition, as is a bus with invokes of a tool or a seat verb. func caseAProcessBusNeverServesOrHoldsASeat(t *testing.T) { for name, c := range map[string]struct{ bus, says string }{ - "serves": {`{"emits":["mail.send.sent"],"serves":["send"]}`, "serves"}, "holds": {`{"emits":["mail.send.sent"],"holds":["mail-sender"]}`, "holds"}, "claims": {`{"emits":["mail.send.sent"],"claims":["mail-sender"]}`, "claims"}, "seat": {`{"emits":["mail.send.sent"],"seat":"mail-sender"}`, "seat"}, @@ -2475,6 +2475,14 @@ func caseAProcessBusNeverServesOrHoldsASeat(t *testing.T) { if _, err := ParseManifest([]byte(mailSenderProcessManifest(t, accepted))); err != nil { t.Fatalf("a bus invoking a tool and a seat verb was refused: %v", err) } + serving := `{"emits":["mail.send.sent"],"serves":["seat:mail-sender.send"]}` + m, err := ParseManifest([]byte(mailSenderProcessManifest(t, serving))) + if err != nil { + t.Fatalf("a bus serving a seat verb was refused: %v", err) + } + if got := m.ProcessBuses()["send"].Serves; !strSliceEqual(got, []string{"seat:mail-sender.send"}) { + t.Fatalf("the process's serves read as %v", got) + } } // 1179/AC1: a well-formed bus on a process whose account the module makes is accepted, and the catalogue