[log] Add debug logging to 5 workflow/cli files#22026
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 localgetGitHubToolsets: log resolved toolsets stringexpandDefaultToolset: log whendefault/action-friendlykeyword is expandedgetGitHubDockerImageVersion: log the resolved Docker image versionpkg/workflow/copilot_engine_tools.go(3 → 7 log calls)computeCopilotToolArguments: log when edit tool, safe-outputs, web-fetch, and custom MCP server permissions are addedpkg/workflow/compiler_github_actions_steps.go(1 → 3 log calls)generateGitHubScriptWithRequire: log the script path being loadedgenerateInlineGitHubScriptStep: log step name and conditionpkg/workflow/mcp_config_serena_renderer.go(3 → 5 log calls)renderSerenaMCPConfigWithOptions: log render options (copilot fields, inline args, guard policies) and selected container imagepkg/cli/yaml_frontmatter_utils.go(3 → 5 log calls)findAndReplaceInLine: log when a key is replacedapplyFrontmatterLineTransform: log when a transformation is appliedValidation
make buildpasses with no compilation errorsgo build ./...succeeds across all packages