Skip to content

Add MCP gateway log rendering to step summary#9504

Merged
pelikhan merged 5 commits into
mainfrom
copilot/add-mcp-gateway-log-step
Jan 10, 2026
Merged

Add MCP gateway log rendering to step summary#9504
pelikhan merged 5 commits into
mainfrom
copilot/add-mcp-gateway-log-step

Conversation

Copilot AI commented Jan 10, 2026

Copy link
Copy Markdown
Contributor

MCP gateway logs were not visible in the workflow step summary, requiring manual artifact inspection to debug gateway startup issues.

Changes

JavaScript Parser (actions/setup/js/parse_mcp_gateway_log.cjs)

  • Reads gateway stderr from /tmp/gh-aw/mcp-logs/gateway/stderr.log
  • Wraps content in collapsible <details> with code fence
  • Handles empty logs and whitespace normalization

Go Code Generation

  • Added generateMCPGatewayLogParsing() in compiler_yaml_ai_execution.go
  • Integrated into workflow compilation after safe-inputs log parsing
  • Step executes with if: always() to capture logs on failure

Generated Step

- name: Parse MCP gateway logs for step summary
  if: always()
  uses: actions/github-script@v8.0.0
  with:
    script: |
      const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
      setupGlobals(core, github, context, exec, io);
      const { main } = require('/opt/gh-aw/actions/parse_mcp_gateway_log.cjs');
      await main();

The step is automatically included in all workflows using MCP tools.

Original prompt

Add a step that renders the MCP gateway log into the step summary.

Render using a details section and a code section in markdown. Use JavaScript script stored in actions/setup


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits January 10, 2026 06:46
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Create parse_mcp_gateway_log.cjs to parse and render gateway logs
- Add generateMCPGatewayLogParsing method in compiler_yaml_ai_execution.go
- Call MCP gateway log parsing in compiler_yaml_main_job.go after safe-inputs parsing
- Use details/summary markdown structure with code fence for log display

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Create parse_mcp_gateway_log.test.cjs with comprehensive test coverage
- Test details/summary structure generation
- Test empty log handling
- Test whitespace trimming
- Test line break preservation
- All 4 tests passing

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add step to render MCP gateway log in summary Add MCP gateway log rendering to step summary Jan 10, 2026
Copilot AI requested a review from pelikhan January 10, 2026 07:02
@pelikhan pelikhan marked this pull request as ready for review January 10, 2026 07:03
@pelikhan pelikhan added the smoke label Jan 10, 2026
@github-actions

github-actions Bot commented Jan 10, 2026

Copy link
Copy Markdown
Contributor

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions

github-actions Bot commented Jan 10, 2026

Copy link
Copy Markdown
Contributor

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions

github-actions Bot commented Jan 10, 2026

Copy link
Copy Markdown
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions

github-actions Bot commented Jan 10, 2026

Copy link
Copy Markdown
Contributor

💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges...

@pelikhan pelikhan merged commit 2130ea6 into main Jan 10, 2026
35 of 36 checks passed
@pelikhan pelikhan deleted the copilot/add-mcp-gateway-log-step branch January 10, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants