From ebca7816bf0817bdba189479da21ae065f49a66c Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 11 Oct 2026 05:47:40 +0200 Subject: [PATCH] inventory: a person's one tool is granted naming that person as the caller too (hq issue 365) --- internal/inventory/people_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/inventory/people_test.go b/internal/inventory/people_test.go index 7df4b15c..5919607e 100644 --- a/internal/inventory/people_test.go +++ b/internal/inventory/people_test.go @@ -44,15 +44,17 @@ func TestAPersonMayCallToolsAndNothingElse(t *testing.T) { } // The one tool, both ways it is addressed (novox/hq ADR 0159): to whichever instance // answers, and to the instance on one machine. Nothing else. - // And asking what answers (novox/hq ADR 0197), which claims nothing and calls nothing. + // And asking what answers (novox/hq ADR 0197), which claims nothing and calls nothing. Each way again + // naming ada as the caller and nobody else (novox/hq issue 365). var tools []string for _, s := range perms.Publish { if !strings.HasPrefix(s, "$SRV.") { tools = append(tools, s) } } - if len(tools) != 2 || tools[0] != "mesh.mod.mesh-catalog.tool.catalog_tools" || - tools[1] != "mesh.mod.mesh-catalog.tool.catalog_tools.*" { + want := []string{"mesh.mod.mesh-catalog.call.catalog_tools.*.person~ada", "mesh.mod.mesh-catalog.call.catalog_tools.person~ada", + "mesh.mod.mesh-catalog.tool.catalog_tools", "mesh.mod.mesh-catalog.tool.catalog_tools.*"} + if strings.Join(tools, " ") != strings.Join(want, " ") { t.Errorf("ada may publish %v, which should be the one tool, both ways addressed, and nothing else", perms.Publish) } for _, s := range perms.Publish {