Conversation
…d wizard command - pkg/fileutil/tar.go: Log target path, archive size, entries scanned, and whether file was found - pkg/parser/schema_utilities.go: Log ignored field filtering with counts and field names - pkg/cli/mcp_schema.go: Log schema property default assignments and missing properties - pkg/workflow/mcp_config_types.go: Log well-known container lookups for MCP commands - pkg/cli/add_wizard_command.go: Log wizard startup parameters and TTY/CI detection results Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds debug logging to several previously silent code paths to improve troubleshooting across tar extraction, schema utilities, MCP schema defaults, MCP config container mapping, and the add-wizard command.
Changes:
- Introduces package-scoped debug loggers (
logger.New("pkg:filename")) in 5 files. - Adds targeted debug statements for tar extraction scanning, ignored frontmatter filtering, schema default application, well-known MCP container lookup, and add-wizard environment checks.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/fileutil/tar.go | Logs tar extraction parameters and scan outcomes (found/not found, entry count). |
| pkg/parser/schema_utilities.go | Logs ignored frontmatter filtering, including per-field removals. |
| pkg/cli/mcp_schema.go | Logs when defaults are applied or skipped due to missing properties. |
| pkg/workflow/mcp_config_types.go | Logs whether a well-known container mapping was found for a command. |
| pkg/cli/add_wizard_command.go | Logs wizard startup parameters and terminal/CI eligibility checks. |
Comments suppressed due to low confidence (1)
pkg/parser/schema_utilities.go:15
- The doc comment says this function "currently does nothing", but the implementation actively filters keys listed in constants.IgnoredFrontmatterFields (currently includes "user-invokable") and now even logs removals. Please update the comment to reflect the current behavior (or, if the intent is truly no-op, consider removing the filtering logic and keeping it validated elsewhere).
// filterIgnoredFields removes ignored fields from frontmatter without warnings
// NOTE: This function is kept for backward compatibility but currently does nothing
// as all previously ignored fields (description, applyTo) are now validated by the schema
func filterIgnoredFields(frontmatter map[string]any) map[string]any {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
This was referenced Mar 5, 2026
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 statements to 5 files that lacked any logging, helping with troubleshooting and development diagnostics.
Changes
pkg/fileutil/tar.go: AddstarLogto log tar extraction — target path, archive size, number of entries scanned, and whether the file was found or not. Useful when debugging "file not found in archive" issues.pkg/parser/schema_utilities.go: AddsschemaUtilitiesLogto log ignored frontmatter field filtering — counts ignored fields to check and logs each field that is removed. Helps diagnose schema migration and field removal behavior.pkg/cli/mcp_schema.go: AddsmcpSchemaLogto theAddSchemaDefaulthelper — logs when a schema property default is set and when a requested property doesn't exist. Aids in debugging MCP tool elicitation defaults (SEP-1024).pkg/workflow/mcp_config_types.go: AddsmcpConfigTypesLogtogetWellKnownContainer— logs whether a well-known container image was found for a given MCP command (npx,uvx, etc.). Helps diagnose automatic MCP server containerization.pkg/cli/add_wizard_command.go: AddsaddWizardLogto the wizardRunEclosure — logs startup parameters and the TTY/CI environment check result. Useful when diagnosing why the wizard fails to start in certain environments.Validation
make buildpasses with no compilation errorsgo test ./pkg/fileutil/... ./pkg/parser/... ./pkg/cli/... ./pkg/workflow/...Logger naming convention
All loggers follow the
pkg:filenamepattern per project guidelines:"fileutil:tar","parser:schema_utilities","cli:mcp_schema","workflow:mcp_config_types","cli:add_wizard_command"