Add working directory logging and Docker workdir for agentic-workflows MCP server#14053
Add working directory logging and Docker workdir for agentic-workflows MCP server#14053
Conversation
…P server
- Log current working directory before checking gh version in mcp-server command
- Add Docker working directory (-w flag) to agentic-workflows MCP server
- Set working directory to ${{ github.workspace }} to ensure .github/workflows resolves correctly
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Remove GH_TOKEN expectations (only GITHUB_TOKEN is needed now) - Add args field expectations for working directory - Update JSON and TOML format tests Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
All changes implemented and tests passing: - MCP server logs current working directory before gh version check - Docker working directory set to workspace for agentic-workflows container - All unit tests updated and passing Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
✅ Changeset Generator completed successfully! |
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... |
Agent Container Tool Check
Result: 10/12 tools fully available ✅, 2 tools present with execution issues Notes:
|
Smoke Test Results - Run §21740597360PRs Reviewed:
✅ GitHub MCP | ✅ Safe Inputs GH CLI | ✅ Serena MCP | ✅ Playwright | ✅ File Writing | ✅ Bash Tool | ✅ Discussion Interaction | ✅ Build gh-aw | ✅ Workflow Dispatch Status: PASS ✅ cc: @pelikhan
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
Smoke Test Results ✅Status: PASS
Run: §21740597347
|
There was a problem hiding this comment.
Pull request overview
This PR adds working directory logging and proper Docker working directory configuration for the agentic-workflows MCP server to ensure consistent path resolution within containers.
Changes:
- Added current working directory logging to MCP server startup (before gh CLI version check)
- Set Docker container working directory to
${{ github.workspace }}via-wflag for both JSON and TOML MCP configurations - Removed obsolete
GH_TOKENfrom MCP environment variables (onlyGITHUB_TOKENis needed, as ExecGH helper auto-sets GH_TOKEN from GITHUB_TOKEN)
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/cli/mcp_server.go | Added working directory logging with error handling before gh CLI version check |
| pkg/workflow/mcp_config_builtin.go | Added Docker -w args and removed GH_TOKEN from env vars for both JSON and TOML formats |
| pkg/workflow/mcp_renderer_test.go | Updated tests to remove GH_TOKEN expectations and verify working directory args |
| pkg/workflow/mcp_config_refactor_test.go | Updated tests to expect only GITHUB_TOKEN and verify working directory args |
| pkg/workflow/mcp_config_compilation_test.go | Updated compilation test to verify working directory args in generated lock files |
| pkg/workflow/importable_tools_test.go | Updated importable tools test to verify working directory args |
| .github/workflows/*.lock.yml (27 files) | Regenerated lock files with new args field and without GH_TOKEN |
| docs/src/content/docs/reference/frontmatter-full.md | Enhanced plugins field documentation (unrelated to main PR purpose) |
| .changeset/patch-log-cwd-set-docker-dir.md | Added changeset for patch version bump |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Plugin configuration for installing plugins before workflow execution. Supports | ||
| # both array format (list of repos) and object format (repos + custom token). | ||
| # (optional) | ||
| # This field supports multiple formats (oneOf): | ||
|
|
||
| # Option 1: List of plugin repository slugs to install. Each plugin is installed | ||
| # using the engine's plugin installation command with default token resolution. | ||
| plugins: [] | ||
| # Array of Plugin repository slug in the format 'org/repo' (e.g., | ||
| # Array items: Plugin repository slug in the format 'org/repo' (e.g., | ||
| # 'github/example-plugin') | ||
|
|
||
| # Option 2: Plugin configuration with custom GitHub token. The custom token | ||
| # overrides the default token resolution chain. | ||
| plugins: | ||
| # List of plugin repository slugs to install | ||
| repos: [] | ||
| # Array of Plugin repository slug in the format 'org/repo' (e.g., | ||
| # 'github/example-plugin') | ||
|
|
||
| # Custom GitHub token expression to use for plugin installation. Overrides the | ||
| # default cascading token resolution (GH_AW_PLUGINS_TOKEN -> GH_AW_GITHUB_TOKEN -> | ||
| # GITHUB_TOKEN). | ||
| # (optional) | ||
| github-token: "${{ secrets.GITHUB_TOKEN }}" |
There was a problem hiding this comment.
These documentation changes for the plugins field appear unrelated to the PR's stated purpose of adding working directory logging and Docker workdir configuration. The PR description doesn't mention any plugins documentation updates. While the changes themselves look correct (documenting the dual format for plugins configuration), they should either be mentioned in the PR description or moved to a separate PR for better change tracking and review.
The agentic-workflows MCP server needed context logging and proper working directory setup for path resolution within containers.
Changes
${{ github.workspace }}via-wflag in MCP server args.github/workflowsresolves toworkspace/.github/workflowsinstead of container rootExample
The compiled agentic-workflows MCP configuration now includes:
Test updates
Removed obsolete
GH_TOKENexpectations from tests (onlyGITHUB_TOKENrequired per ExecGH helper convention).Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Changeset