diff --git a/modules/claude-code/cmd/claude-code/invokes_test.go b/modules/claude-code/cmd/claude-code/invokes_test.go new file mode 100644 index 000000000..e2c8bbd9d --- /dev/null +++ b/modules/claude-code/cmd/claude-code/invokes_test.go @@ -0,0 +1,19 @@ +package main + +import ( + "os" + "strings" + "testing" +) + +// The operator channel's notify, which notifyOperator calls, is in the manifest's invokes, which the grants part reads per +// verb (design 47 G GR8): without it the call is refused live. +func TestTheManifestInvokesTheNotifyTheModuleCalls(t *testing.T) { + raw, err := os.ReadFile("../../module.json") + if err != nil { + t.Fatal(err) + } + if !strings.Contains(string(raw), `"seat:operator-channel.notify"`) { + t.Error("the manifest does not invoke seat:operator-channel.notify") + } +} diff --git a/modules/claude-code/module.json b/modules/claude-code/module.json index 505a04f8a..882b366ab 100644 --- a/modules/claude-code/module.json +++ b/modules/claude-code/module.json @@ -51,7 +51,8 @@ "mesh-delivery-assigner.assigner_read_assignments", "seat:anthropic-licence-manager.bindings", "seat:anthropic-licence-manager.current", - "seat:mesh-vault.get" + "seat:mesh-vault.get", + "seat:operator-channel.notify" ], "consumes": [ "mesh-catalog.catalog-revision", diff --git a/modules/restic/cmd/restic-backups/invokes_test.go b/modules/restic/cmd/restic-backups/invokes_test.go new file mode 100644 index 000000000..8fd1ed536 --- /dev/null +++ b/modules/restic/cmd/restic-backups/invokes_test.go @@ -0,0 +1,21 @@ +package main + +import ( + "os" + "strings" + "testing" +) + +// The seat verbs the module calls are in its manifest's invokes, which the grants part reads per verb (design 47 G GR8): the +// assignments that tell who holds the seat mesh-broker (seatlist.HolderOf) and the broker's show that names its finding stream (A-274). +func TestTheManifestInvokesTheSeatVerbsTheModuleCalls(t *testing.T) { + raw, err := os.ReadFile(moduleDir + "/module.json") + if err != nil { + t.Fatal(err) + } + for _, verb := range []string{"seat:mesh-module-assigner.assignments", "seat:mesh-broker.show"} { + if !strings.Contains(string(raw), `"`+verb+`"`) { + t.Errorf("the manifest does not invoke %s", verb) + } + } +} diff --git a/modules/restic/module.json b/modules/restic/module.json index e46097bd4..1caef9ace 100644 --- a/modules/restic/module.json +++ b/modules/restic/module.json @@ -17,6 +17,7 @@ } ], "invokes": [ + "seat:mesh-module-assigner.assignments", "seat:mesh-broker.show" ], "consumes": [