From b19feb243f1f2bdb7f04e5c6f3b693ee8cd2a8b7 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 10 Mar 2026 16:09:13 +0100 Subject: pkg/aflow: ensure we don't register MCP tools with duplicate names If we have duplicate names, then only one of the duplicates will be used at random. Add a check that we don't have duplicate names. Currently it's only "crash-reproducer" (both action and a tool). Also ignore "set-results" tool, and all tools created in tests. --- pkg/aflow/flow/flows_test.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'pkg/aflow/flow') diff --git a/pkg/aflow/flow/flows_test.go b/pkg/aflow/flow/flows_test.go index 3c01596b5..a66479d14 100644 --- a/pkg/aflow/flow/flows_test.go +++ b/pkg/aflow/flow/flows_test.go @@ -3,4 +3,16 @@ package flow -// An empty test that runs registration and verification of all registered workflows via init functions. +import ( + "testing" + + "github.com/google/syzkaller/pkg/aflow" +) + +// Note: this test also runs registration and verification of all registered workflows via init functions. + +func TestMCPTools(t *testing.T) { + for tool := range aflow.MCPTools { + t.Log(tool.Name) + } +} -- cgit mrf-deployment