Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
… var Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
🔍 Smoke Test Investigation - Run #98SummaryThe Smoke Claude test failed due to GitHub MCP token response limits, not due to this PR's changes. The agent successfully completed its task after recovering from initial pagination errors. This is a false positive - the smoke test validation is too strict. Failure Details
Root Cause AnalysisWhat happened: Error sequence:
Agent outcome:
Why the workflow failed: Investigation FindingsNOT RELATED TO THIS PR: Historical context:
Root cause: Recommended ActionsImmediate (to unblock this PR):
Short-term (fix the smoke test):
Long-term (prevent recurrence):
Prevention Strategies
Historical ContextThis is a known issue that affects smoke tests, not a new problem introduced by PRs:
The pattern is well-documented and has a clear solution. Investigation Metadata:
Verdict: ✅ False positive - safe to merge this PR
|
|
@copilot Review the error in https://github.com/githubnext/gh-aw/actions/runs/19049252838/job/54405172663#step:28:1 The agent output collection step needs to be properly configured. |
🔍 Smoke Test Investigation - Run #103SummaryThe Smoke Codex workflow failed due to double JSON encoding of the Failure Details
Root Cause AnalysisThe Problem: Double JSON Encoding in Codex Workflow Configuration The Codex workflow applies # Line 149 - Initial definition (correct)
GH_AW_SAFE_OUTPUTS_CONFIG: "{\"create_issue\":{\"max\":1},\"missing_tool\":{}}"
# Line 1029 - Setup MCPs step (INCORRECT - double encoding)
GH_AW_SAFE_OUTPUTS_CONFIG: ${{ toJSON(env.GH_AW_SAFE_OUTPUTS_CONFIG) }}
# Line 1065 - MCP server TOML config (INCORRECT - double encoding)
"GH_AW_SAFE_OUTPUTS_CONFIG" = ${{ toJSON(env.GH_AW_SAFE_OUTPUTS_CONFIG) }}What Happens:
Failed Jobs and Errors
Key Log Excerpts: Investigation FindingsAgent Behavior: The Codex agent worked perfectly:
The Agent's Output (rejected): {
"title": "Summary of last five merged PRs (#3069 – #3065)",
"body": "## Overview\nThe latest five merges continue the ongoing security hardening...",
"type": "create_issue"
}Why It Failed: Not the agent's fault - the validation infrastructure couldn't recognize Recommended ActionsIMMEDIATE FIX (Workflow Compiler)The issue is in the workflow compiler (likely Files to Fix:
Change Required: # WRONG (current)
GH_AW_SAFE_OUTPUTS_CONFIG: ${{ toJSON(env.GH_AW_SAFE_OUTPUTS_CONFIG) }}
# CORRECT
GH_AW_SAFE_OUTPUTS_CONFIG: ${{ env.GH_AW_SAFE_OUTPUTS_CONFIG }}Why This Matters for PR #3070This PR is updating the safe-output MCP server. While the failure is in the workflow compiler (not your changes), it's good to be aware:
Prevention Strategies
Historical ContextThis appears to be a NEW failure pattern specific to Codex workflows with safe-outputs. No similar issues found in the investigation database or GitHub issues. Related Patterns:
Key Differences:
Investigation DataInvestigation stored at: Pattern ID: Note: This investigation is informational for PR #3070. The root cause is in the workflow compiler, not in your safe-outputs MCP server changes. The smoke test failure is due to pre-existing configuration bugs in the Codex workflow generation.
|
…string Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in commit 3840332. The issue was that |
|
@copilot apply fix outlined in #3070 (comment) |
…nstead of content Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in commit b8fb1f6. The Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the safe outputs configuration mechanism by moving from environment variable-based configuration to file-based configuration. Instead of passing the configuration through the GH_AW_SAFE_OUTPUTS_CONFIG environment variable, the configuration is now written to a file at /tmp/gh-aw/safeoutputs/config.json and referenced via the GH_AW_SAFE_OUTPUTS_CONFIG_PATH environment variable.
Key Changes:
- Configuration is now written to a file instead of being passed as an environment variable
- New environment variable
GH_AW_SAFE_OUTPUTS_CONFIG_PATHreplacesGH_AW_SAFE_OUTPUTS_CONFIG - JavaScript/test code updated to read configuration from file instead of parsing environment variable
Reviewed Changes
Copilot reviewed 76 out of 76 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/safe_outputs_mcp_server_test.go |
Updated test helper to write config to file and set path environment variable |
pkg/workflow/safe_outputs_mcp_integration_test.go |
Updated integration test to verify config file creation instead of env var |
pkg/workflow/safe_outputs.go |
Removed environment variable config generation |
pkg/workflow/safe_output_helpers_test.go |
Removed config environment variable assertions from tests |
pkg/workflow/mcp_servers.go |
Removed config env var from MCP server setup |
pkg/workflow/mcp_config_shared_test.go |
Removed config env var from test assertions |
pkg/workflow/mcp_config_refactor_test.go |
Updated tests to verify config is not in env vars |
pkg/workflow/mcp-config.go |
Removed config env var from MCP configuration rendering |
pkg/workflow/main_job_env_test.go |
Updated tests to verify config is not in environment variables |
pkg/workflow/js/safe_outputs_mcp_server_defaults.test.cjs |
Updated tests to use config path instead of config content |
pkg/workflow/js/safe_outputs_mcp_server.cjs |
Refactored to read config from file instead of environment variable |
pkg/workflow/js/safe_outputs_mcp_large_content.test.cjs |
Updated tests to set config path instead of config content |
pkg/workflow/js/collect_ndjson_output.test.cjs |
Updated all tests to write config to file and set path |
pkg/workflow/js/collect_ndjson_output.cjs |
Updated to read config from file instead of environment variable |
pkg/workflow/compiler_yaml.go |
Removed config env var from output collection step |
pkg/workflow/compiler_jobs.go |
Removed config env var from main job setup |
pkg/workflow/compile_config_test.go |
Updated test to verify config is not in environment variables |
Multiple .lock.yml files |
Updated generated workflow files to reflect the configuration changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot merge main, fix tests |
Head branch was pushed to by a user without write access
|
@copilot merge main, recompile, fix tests |
|
@copilot fix JavaScript tests |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Head branch was pushed to by a user without write access
Fixed in commit b0ed140. Updated all 11 remaining tests in |
Update Safe Output MCP Server Configuration
This PR updates the safe output MCP server to read configuration from a file instead of an environment variable.
Plan
safe_outputs_mcp_server.cjs) to:/tmp/gh-aw/safeoutputs/config.jsonfileGH_AW_SAFE_OUTPUTS_CONFIGenvironment variableGH_AW_SAFE_OUTPUTS_CONFIG_PATHenvironment variable (if needed) for config file pathChanges Made
JavaScript MCP Server (
safe_outputs_mcp_server.cjs):GH_AW_SAFE_OUTPUTS_CONFIGenvironment variableGH_AW_SAFE_OUTPUTS_CONFIG_PATHor defaults to/tmp/gh-aw/safeoutputs/config.jsonMCP Config Rendering (
mcp-config.go):GH_AW_SAFE_OUTPUTS_CONFIGfrom environment variables in JSON and TOML formatsSafe Output Environment Setup (
safe_outputs.go,compiler_jobs.go,mcp_servers.go,compiler_yaml.go):GH_AW_SAFE_OUTPUTS_CONFIGfrom all environment variable setupsmcp_servers.goduring setup stepOutput Collection (
collect_ndjson_output.cjs):Tests Updated:
safe_outputs_mcp_server_test.go- updated to write config to file with path env varsafe_outputs_mcp_server_defaults.test.cjs- ALL 11 remaining tests fixed to write config to file and use path env varcollect_ndjson_output.test.cjs- all 82 test instances updated to write config to file instead of env varsafe_outputs_mcp_large_content.test.cjs- fixed to useGH_AW_SAFE_OUTPUTS_CONFIG_PATHinstead of reading file content into env varTest Results
ALL TESTS PASS: ✓✓✓
Bug Fixes
Final Status
The migration from environment variable-based to file-based configuration is now complete and fully tested. All 646 JavaScript tests and all Go tests pass.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.