From f6b4612c0078b058e886e33ac99f48ac398f9cb9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 19 May 2026 19:21:31 +0000 Subject: [PATCH 1/2] Update module github.com/modelcontextprotocol/registry to v1.7.9 [SECURITY] --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 1ae12bc..98837cb 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect cloud.google.com/go/compute/metadata v0.9.0 // indirect cloud.google.com/go/iam v1.7.0 // indirect - cloud.google.com/go/kms v1.30.0 // indirect + cloud.google.com/go/kms v1.31.0 // indirect cloud.google.com/go/longrunning v0.9.0 // indirect cloud.google.com/go/monitoring v1.24.3 // indirect cloud.google.com/go/storage v1.59.2 // indirect @@ -411,7 +411,7 @@ require ( github.com/moby/moby/client v0.4.0 // indirect github.com/moby/sys/user v0.4.0 // indirect github.com/moby/term v0.5.2 // indirect - github.com/modelcontextprotocol/registry v1.7.8 // indirect + github.com/modelcontextprotocol/registry v1.7.9 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/moricho/tparallel v0.3.2 // indirect @@ -578,7 +578,7 @@ require ( golang.org/x/arch v0.20.0 // indirect golang.org/x/crypto v0.51.0 // indirect golang.org/x/exp/typeparams v0.0.0-20251023183803-a4bb9ffd2546 // indirect - golang.org/x/mod v0.35.0 // indirect + golang.org/x/mod v0.36.0 // indirect golang.org/x/oauth2 v0.36.0 // indirect golang.org/x/term v0.43.0 // indirect golang.org/x/time v0.15.0 // indirect diff --git a/go.sum b/go.sum index 536ba4b..1653ba1 100644 --- a/go.sum +++ b/go.sum @@ -19,8 +19,8 @@ cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdB cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= cloud.google.com/go/iam v1.7.0 h1:JD3zh0C6LHl16aCn5Akff0+GELdp1+4hmh6ndoFLl8U= cloud.google.com/go/iam v1.7.0/go.mod h1:tetWZW1PD/m6vcuY2Zj/aU0eCHNPuxedbnbRTyKXvdY= -cloud.google.com/go/kms v1.30.0 h1:TSEZopy/OXojbVCQS9Rrx0jFqdKWvO31+N8ncXbxG/s= -cloud.google.com/go/kms v1.30.0/go.mod h1:YIyXZym11R5uovJJt4oN5eUL3oPmirF3yKeIh6QAf4U= +cloud.google.com/go/kms v1.31.0 h1:LS8N92OxFDgOLg5NCo3OmbvjtQAIVT5gUHVLKIDHaFE= +cloud.google.com/go/kms v1.31.0/go.mod h1:YIyXZym11R5uovJJt4oN5eUL3oPmirF3yKeIh6QAf4U= cloud.google.com/go/logging v1.13.2 h1:qqlHCBvieJT9Cdq4QqYx1KPadCQ2noD4FK02eNqHAjA= cloud.google.com/go/logging v1.13.2/go.mod h1:zaybliM3yun1J8mU2dVQ1/qDzjbOqEijZCn6hSBtKak= cloud.google.com/go/longrunning v0.9.0 h1:0EzbDEGsAvOZNbqXopgniY0w0a1phvu5IdUFq8grmqY= @@ -1121,8 +1121,8 @@ github.com/moby/sys/user v0.4.0 h1:jhcMKit7SA80hivmFJcbB1vqmw//wU61Zdui2eQXuMs= github.com/moby/sys/user v0.4.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs= github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc= -github.com/modelcontextprotocol/registry v1.7.8 h1:lCocUoroUh1PEFEKDFlLc8yS0GmWTQEApqzHeNqv8Zg= -github.com/modelcontextprotocol/registry v1.7.8/go.mod h1:+5Vq308eizn+5Chm20ZkWPijRUa23y0VicjTBmSzuR8= +github.com/modelcontextprotocol/registry v1.7.9 h1:vpPfx2A2egjhm6YlbwfkX8NkR2N0S2eYmvYXI8bXaBs= +github.com/modelcontextprotocol/registry v1.7.9/go.mod h1:y03zY98e+REsiCaj1sUKzXbk3qEp++Y3gzAnV83wrNs= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -1673,8 +1673,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.35.0 h1:Ww1D637e6Pg+Zb2KrWfHQUnH2dQRLBQyAtpr/haaJeM= -golang.org/x/mod v0.35.0/go.mod h1:+GwiRhIInF8wPm+4AoT6L0FA1QWAad3OMdTRx4tFYlU= +golang.org/x/mod v0.36.0 h1:JJjpVx6myfUsUdAzZuOSTTmRE0PfZeNWzzvKrP7amb4= +golang.org/x/mod v0.36.0/go.mod h1:moc6ELqsWcOw5Ef3xVprK5ul/MvtVvkIXLziUOICjUQ= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= From a7476ca5a07c3e46cb36641ebce6f23fc9d9e4ac Mon Sep 17 00:00:00 2001 From: "circleci-app[bot]" <127350680+circleci-app[bot]@users.noreply.github.com> Date: Wed, 20 May 2026 13:51:06 +0000 Subject: [PATCH 2/2] Fix race condition in Command.IsRunning() check The test "TestOrchestrator/error: task agent encountered fatal error" was failing because of a race condition where IsRunning() was being called before the isCompleted flag was set, even though Wait() had returned. The issue was that isCompleted was set in the defer of wait(), which runs after the function returns but with no guarantee of when relative to the calling goroutine receiving the return value. This caused a race where: 1. executeAgent() calls taskAgent.Wait() which blocks 2. The process exits and wait() returns an error 3. The defer sets isCompleted based on ProcessState 4. executeAgent returns the error to the main goroutine 5. shutdown() checks IsRunning() before the defer completes 6. IsRunning() returns true because isCompleted is still false 7. This generates an incorrect "task agent process is still running" error The fix is to set isCompleted=true immediately after Wait() returns, before any error handling or defer cleanup. This ensures IsRunning() returns false as soon as Wait() completes, regardless of whether there was an error or what the ProcessState is. This eliminates the race condition and ensures correct behavior in the shutdown phase. --- task/cmd/cmd.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/task/cmd/cmd.go b/task/cmd/cmd.go index e561dc5..f141c7a 100644 --- a/task/cmd/cmd.go +++ b/task/cmd/cmd.go @@ -79,11 +79,14 @@ func (c *Command) wait() error { cmd := c.cmd defer func() { _ = cmd.Cancel() - - c.isCompleted.Store(cmd.ProcessState != nil) }() err := cmd.Wait() + + // Set isCompleted immediately after Wait() returns, before any error handling. + // This ensures IsRunning() returns false even if Wait() failed or ProcessState is nil. + c.isCompleted.Store(true) + if err != nil { stderr := c.stderrSaver.Bytes() if len(stderr) > 0 {