Fix MCP config tests for --validate-actor flag and GITHUB_REPOSITORY env var#15154
Merged
pelikhan merged 2 commits intocopilot/add-actor-flag-supportfrom Feb 12, 2026
Merged
Conversation
…env var Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing tests in the codebase
Fix MCP config tests for --validate-actor flag and GITHUB_REPOSITORY env var
Feb 12, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates MCP config rendering tests to match the recent MCP server config changes (switching to --validate-actor and including GITHUB_REPOSITORY in the environment context).
Changes:
- Updated expected
entrypointArgsfrom--actor ${GITHUB_ACTOR}to--validate-actor. - Updated expected environment variable set to include
GITHUB_REPOSITORYin both JSON and TOML test assertions.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
141
to
+145
| `"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 |
There was a problem hiding this comment.
In the JSON-mode tests, the dev-mode cases don’t assert that GITHUB_ACTOR / GITHUB_REPOSITORY are present in the rendered env block. Since dev mode relies on the container image CMD (documented as including --validate-actor), it seems important for the tests to cover that these env vars are wired in dev mode as well (not just release mode).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tests failed after recent changes to the MCP server configuration that switched from
--actor "${GITHUB_ACTOR}"to--validate-actorflag and addedGITHUB_REPOSITORYenvironment variable.Changes
Updated test expectations in
mcp_config_refactor_test.go:["mcp-server", "--actor", "${GITHUB_ACTOR}"]to["mcp-server", "--validate-actor"]GITHUB_REPOSITORYto expected list:["DEBUG", "GITHUB_TOKEN", "GITHUB_ACTOR", "GITHUB_REPOSITORY"]Affected tests:
TestRenderAgenticWorkflowsMCPConfigWithOptionsTestRenderAgenticWorkflowsMCPConfigTOMLThe
--validate-actorflag now reads actor and repository context from environment variables instead of CLI arguments, enabling cleaner role-based access control validation.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.