Convert safe outputs MCP server to node process with individual module files#5919
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges... |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
📰 VERDICT: Smoke Copilot Playwright has concluded. All systems operational. This is a developing story. 🎤 |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
🤖 DIAGNOSTIC COMPLETE: Smoke Copilot No Firewall STATUS: ALL_UNITS_OPERATIONAL. MISSION_SUCCESS. |
|
@copilot store log file in agent log artifacts |
|
@copilot the server failed to launch. See https://github.com/githubnext/gh-aw/actions/runs/20050576968/job/57505411967#step:44:1 |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in commit e8d740d. The issue was that 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:
|
|
💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges... |
|
📰 VERDICT: Smoke Copilot Playwright has concluded. All systems operational. This is a developing story. 🎤 |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
@copilot review the code that writes output types entries in the MCP server . They do not match the schema expected by the ingestion phase. See https://github.com/githubnext/gh-aw/actions/runs/20063015659/job/57544440154#step:34:1 |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in commit 8200639. The issue was that the MCP server was cleaning up the config file immediately after startup, but the ingestion phase ( Without the config file, the ingestion phase had an empty expected types list (
Solution: Removed the config file cleanup from the MCP server. The config file contains no secrets (only schema/max counts), so it's safe to leave it on disk. Now the ingestion phase can properly read the config and validate outputs against the expected types. |
|
💥 WHOOSH! Smoke Claude springs into action on this pull request! [Panel 1 begins...] |
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
📰 BREAKING: Smoke Copilot Playwright is now investigating this pull request. Sources say the story is developing... |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
🔮 The ancient spirits stir... Smoke Codex awakens to divine this pull request... |
Smoke Test Results - Run 20063709330Last 2 Merged PRs:
Test Results:
Overall Status: PARTIAL - get_me tool exists but has insufficient permissions (expected behavior for default toolset)
|
Smoke Test ResultsFile Writing: ✅ Overall Status: FAIL 📰🔥📋 https://github.com/githubnext/gh-aw/actions/runs/20063709349 fer issue #5919 🗺️ |
Smoke Test Results✅ Playwright MCP: Successfully navigated to github.com, page title verified: "GitHub · Change is constant. GitHub keeps you ahead. · GitHub" Overall Status: FAIL (1 of 3 tests failed)
|
Smoke Test Results - Claude Engine (Run 20063709345)Last 2 Merged PRs:
Test Results:
Overall Status: PASS (5/6 tests passed - safeinputs-gh not configured)
|
|
Latest merged PRs: [WIP] Register safe output MCP server as nodejs runtime | Add golden test for
|
Task: Convert safe output MCP server to run as a node process
This PR converts the safe output MCP server from using actions/github-script to running as a standalone node process, following the same pattern as the safe inputs MCP server.
Summary of Changes
Created
safe_outputs_bootstrap.cjs: A new module that encapsulates the bootstrap logic for loading configuration and tools, following the same pattern as safe inputs.Refactored
safe_outputs_mcp_server.cjs:startSafeOutputsServer()functionRemoved github-script references: Removed misleading
/// <reference types="@actions/github-script" />TypeScript references from all safe outputs files that don't actually use github-script globals.Updated file embedding: Added proper Go embed directives and export functions for the new bootstrap module.
Added comprehensive tests: Created test suite for bootstrap module following existing test patterns.
Fixed directory creation: Added directory creation for safe outputs MCP logs.
Fixed environment variable: Added
GH_AW_MCP_LOG_DIRto the list of environment variables passed to the safe outputs MCP server so it can access the log directory configuration.Fixed JSDoc comment: Replaced JSDoc comment block with regular comments to avoid bundler issues that were causing syntax errors in the compiled output.
Write files individually: Changed from writing a single bundled script to writing each module file separately to disk (matching the safe inputs pattern). Each JavaScript module is written as a separate
.cjsfile withmodule.exportspreserved, and a simple entry point script requires the modules. This eliminates bundling issues and ensures proper Node.js module behavior.Fixed missing environment variables: Added
GH_AW_SAFE_OUTPUTS_CONFIG_PATHandGH_AW_SAFE_OUTPUTS_TOOLS_PATHto both job-level and MCP server environment variables. The bootstrap module needs these paths to load configuration and tools files.Fixed log directory location: Reverted safe outputs MCP log directory from
/tmp/gh-aw/sandbox/agent/logsto/tmp/gh-aw/mcp-logs/safeoutputsso logs are properly included in the mcp-logs artifact for debugging.Enhanced ingestion debugging: Added comprehensive logging to the
collect_ndjson_output.cjsscript with[INGESTION]prefix showing config loading, output processing, type normalization, and detailed warnings for type mismatches.Fixed config file cleanup timing: Removed the config file cleanup from the MCP server startup. The config file contains no secrets (only schema/max counts) and is needed by the ingestion phase (
collect_ndjson_output.cjs) that runs AFTER the MCP server completes. The previous cleanup was causing the ingestion phase to have an empty expected types list, resulting in all outputs being rejected with "Type 'X' not found in expected types: []" errors.Benefits
Plan
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.
Changeset
.cjsfiles, add tests, fix log directory and environment variables, improve ingestion logging, and remove premature config cleanup).