From eedb8f6ecc44a0de27627b2e9c8aa111c6867a79 Mon Sep 17 00:00:00 2001 From: Landon Cox Date: Sat, 14 Mar 2026 15:30:06 -0700 Subject: [PATCH 1/2] fix: suppress staticcheck SA1012 for intentional nil context test The test deliberately passes nil to verify GetAgentTagsSnapshotFromContext handles nil context gracefully. Add nolint directive to suppress SA1012. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- internal/mcp/sdk_method_dispatch_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/mcp/sdk_method_dispatch_test.go b/internal/mcp/sdk_method_dispatch_test.go index fc320a2c..5d8d50f0 100644 --- a/internal/mcp/sdk_method_dispatch_test.go +++ b/internal/mcp/sdk_method_dispatch_test.go @@ -16,7 +16,8 @@ import ( // GetAgentTagsSnapshotFromContext helper. func TestGetAgentTagsSnapshotFromContext(t *testing.T) { t.Run("nil context returns false", func(t *testing.T) { - snapshot, ok := GetAgentTagsSnapshotFromContext(nil) + //nolint:staticcheck // SA1012: intentionally testing nil context handling + snapshot, ok := GetAgentTagsSnapshotFromContext(nil) //nolint:staticcheck assert.False(t, ok) assert.Nil(t, snapshot) }) From 0db17461df1ae6b1346c04ff1d73f63bb0cc0573 Mon Sep 17 00:00:00 2001 From: Landon Cox Date: Sat, 14 Mar 2026 15:32:45 -0700 Subject: [PATCH 2/2] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- internal/mcp/sdk_method_dispatch_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/mcp/sdk_method_dispatch_test.go b/internal/mcp/sdk_method_dispatch_test.go index 5d8d50f0..68ce4084 100644 --- a/internal/mcp/sdk_method_dispatch_test.go +++ b/internal/mcp/sdk_method_dispatch_test.go @@ -16,8 +16,7 @@ import ( // GetAgentTagsSnapshotFromContext helper. func TestGetAgentTagsSnapshotFromContext(t *testing.T) { t.Run("nil context returns false", func(t *testing.T) { - //nolint:staticcheck // SA1012: intentionally testing nil context handling - snapshot, ok := GetAgentTagsSnapshotFromContext(nil) //nolint:staticcheck + snapshot, ok := GetAgentTagsSnapshotFromContext(nil) //nolint:staticcheck // SA1012: intentionally testing nil context handling assert.False(t, ok) assert.Nil(t, snapshot) })