Skip to content

[log] Add debug logging to 5 workflow/cli files#22026

Merged
pelikhan merged 1 commit intomainfrom
add-debug-logging-20260320-202827-ad2fe609cc8d8220
Mar 20, 2026
Merged

[log] Add debug logging to 5 workflow/cli files#22026
pelikhan merged 1 commit intomainfrom
add-debug-logging-20260320-202827-ad2fe609cc8d8220

Conversation

@github-actions
Copy link
Contributor

Add meaningful debug logging calls to 5 files that had sparse or missing logging, using existing per-file logger variables.

Changes

pkg/workflow/mcp_github_config.go (1 → 8 log calls)

  • getGitHubType: log when mode is explicitly set vs defaulting to local
  • getGitHubToolsets: log resolved toolsets string
  • expandDefaultToolset: log when default/action-friendly keyword is expanded
  • getGitHubDockerImageVersion: log the resolved Docker image version

pkg/workflow/copilot_engine_tools.go (3 → 7 log calls)

  • computeCopilotToolArguments: log when edit tool, safe-outputs, web-fetch, and custom MCP server permissions are added

pkg/workflow/compiler_github_actions_steps.go (1 → 3 log calls)

  • generateGitHubScriptWithRequire: log the script path being loaded
  • generateInlineGitHubScriptStep: log step name and condition

pkg/workflow/mcp_config_serena_renderer.go (3 → 5 log calls)

  • renderSerenaMCPConfigWithOptions: log render options (copilot fields, inline args, guard policies) and selected container image

pkg/cli/yaml_frontmatter_utils.go (3 → 5 log calls)

  • findAndReplaceInLine: log when a key is replaced
  • applyFrontmatterLineTransform: log when a transformation is applied

Validation

  • make build passes with no compilation errors
  • go build ./... succeeds across all packages
  • Copilot-related unit tests pass

Generated by Go Logger Enhancement ·

  • expires on Mar 22, 2026, 8:30 PM UTC

Add meaningful debug logging to key functions across 5 files:

- mcp_github_config.go: log GitHub MCP mode, toolsets, default expansion,
  and Docker image version selection
- copilot_engine_tools.go: log when edit, safe-outputs, web-fetch tools are
  enabled and when custom MCP server permissions are added
- compiler_github_actions_steps.go: log script path and step name/condition
  when generating github-script steps
- mcp_config_serena_renderer.go: log render options and selected container
  image in renderSerenaMCPConfigWithOptions
- yaml_frontmatter_utils.go: log key replacement in findAndReplaceInLine
  and when a transformation is applied

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added automation enhancement New feature or request labels Mar 20, 2026
@pelikhan pelikhan merged commit 7867b04 into main Mar 20, 2026
@pelikhan pelikhan deleted the add-debug-logging-20260320-202827-ad2fe609cc8d8220 branch March 20, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant