diff --git a/pkg/workflow/mcp_config_refactor_test.go b/pkg/workflow/mcp_config_refactor_test.go index 4613432515..8e9aa4ce6a 100644 --- a/pkg/workflow/mcp_config_refactor_test.go +++ b/pkg/workflow/mcp_config_refactor_test.go @@ -133,7 +133,7 @@ func TestRenderAgenticWorkflowsMCPConfigWithOptions(t *testing.T) { `"type": "stdio"`, `"container": "alpine:latest"`, `"entrypoint": "/opt/gh-aw/gh-aw"`, - `"entrypointArgs": ["mcp-server", "--actor", "\${GITHUB_ACTOR}"]`, + `"entrypointArgs": ["mcp-server", "--validate-actor"]`, `"/opt/gh-aw:/opt/gh-aw:ro"`, // gh-aw binary mount (read-only) `"/usr/bin/gh:/usr/bin/gh:ro"`, // gh CLI binary mount (read-only) `"\${GITHUB_WORKSPACE}:\${GITHUB_WORKSPACE}:rw"`, // workspace mount (read-write) @@ -141,7 +141,8 @@ func TestRenderAgenticWorkflowsMCPConfigWithOptions(t *testing.T) { `"args": ["--network", "host", "-w", "\${GITHUB_WORKSPACE}"]`, // Network access + working directory `"DEBUG": "*"`, `"GITHUB_TOKEN": "\${GITHUB_TOKEN}"`, - `"GITHUB_ACTOR": "\${GITHUB_ACTOR}"`, // Actor for role-based access control + `"GITHUB_ACTOR": "\${GITHUB_ACTOR}"`, // Actor for role-based access control + `"GITHUB_REPOSITORY": "\${GITHUB_REPOSITORY}"`, // Repository context ` },`, }, unexpectedContent: []string{ @@ -279,12 +280,12 @@ func TestRenderAgenticWorkflowsMCPConfigTOML(t *testing.T) { expectedContainer: `container = "alpine:latest"`, shouldHaveEntrypoint: true, expectedMounts: []string{ - `entrypoint = "/opt/gh-aw/gh-aw"`, // Entrypoint needed in release mode - `entrypointArgs = ["mcp-server", "--actor", "${GITHUB_ACTOR}"]`, // EntrypointArgs needed in release mode with actor flag - `"/opt/gh-aw:/opt/gh-aw:ro"`, // gh-aw binary mount - `"/usr/bin/gh:/usr/bin/gh:ro"`, // gh CLI binary mount - `"\${GITHUB_WORKSPACE}:\${GITHUB_WORKSPACE}:rw"`, // workspace mount - `"/tmp/gh-aw:/tmp/gh-aw:rw"`, // temp directory mount + `entrypoint = "/opt/gh-aw/gh-aw"`, // Entrypoint needed in release mode + `entrypointArgs = ["mcp-server", "--validate-actor"]`, // EntrypointArgs needed in release mode with validate-actor flag + `"/opt/gh-aw:/opt/gh-aw:ro"`, // gh-aw binary mount + `"/usr/bin/gh:/usr/bin/gh:ro"`, // gh CLI binary mount + `"\${GITHUB_WORKSPACE}:\${GITHUB_WORKSPACE}:rw"`, // workspace mount + `"/tmp/gh-aw:/tmp/gh-aw:rw"`, // temp directory mount }, unexpectedContent: []string{ `--cmd`, @@ -304,7 +305,7 @@ func TestRenderAgenticWorkflowsMCPConfigTOML(t *testing.T) { `[mcp_servers.agenticworkflows]`, tt.expectedContainer, `args = ["--network", "host", "-w", "${GITHUB_WORKSPACE}"]`, // Network access + working directory - `env_vars = ["DEBUG", "GITHUB_TOKEN", "GITHUB_ACTOR"]`, + `env_vars = ["DEBUG", "GITHUB_TOKEN", "GITHUB_ACTOR", "GITHUB_REPOSITORY"]`, } expectedContent = append(expectedContent, tt.expectedMounts...)