Skip to content

Conversation

@github-actions
Copy link
Contributor

Summary

Enhanced 5 Go files with debug logging statements to improve troubleshooting and development workflow. All enhancements follow the project's logging guidelines from AGENTS.md.

Files Enhanced

CLI Package (4 files)

  1. pkg/cli/mcp_registry.go (409 lines)

    • MCP registry client creation with URL logging
    • Server search operations with query parameters
    • Server processing count from registry responses
    • Filtered server count after local query matching
    • Server fetch operations with server name
    • Server found/not found status logging
  2. pkg/cli/remove_command.go (397 lines)

    • Workflow removal entry with pattern and keepOrphans flag
    • Workflow file count discovered during scanning
    • Workflows matched count for removal
    • Orphaned includes cleanup initiation
    • No markdown files found during cleanup
  3. pkg/cli/spec.go (389 lines)

    • Repository spec parsing entry
    • Workflow spec parsing with format detection
    • GitHub URL format detection
    • Local path format detection
    • Source spec parsing entry
    • Parsed source spec details (repo, path, ref)
  4. pkg/cli/enable.go (370 lines)

    • Workflow toggle operations with action, count, and repo
    • All workflows processing when no specific names provided
    • Disable all workflows except specific ones
    • YAML workflow file count discovered

Workflow Package (1 file)

  1. pkg/workflow/expression_nodes.go (205 lines)
    • Multiline disjunction rendering with term count

Logging Guidelines Followed

Logger declaration: Each file uses the pkg:filename naming convention
Function entry logging: Added logs at entry points with relevant parameters
Control flow logging: Added logs for important branching decisions
State change logging: Added logs before/after significant operations
No side effects: All logger arguments use existing variables without computation
No test files modified: Skipped all *_test.go files

Validation

  • ✅ Build passes: make build completes successfully
  • ✅ Debug logging works: Tested with DEBUG=* ./gh-aw compile dev
  • ✅ All 5 files compile without errors
  • ✅ No breaking changes to existing functionality

Example Debug Output

When running with DEBUG=*, users will now see detailed logging for:

  • MCP registry operations and server lookups
  • Workflow removal and cleanup operations
  • Spec parsing and format detection
  • Workflow enable/disable operations
  • Expression node rendering

This will significantly improve troubleshooting capabilities for developers working on these components.


🤖 Generated with Claude Code

Co-Authored-By: Claude (noreply@anthropic.com)

AI generated by Go Logger Enhancement

Enhanced 5 files with debug logging for improved troubleshooting:

**CLI Package:**
- `mcp_registry.go`: Added logging for MCP registry client operations including server search, filtering, and fetch operations
- `remove_command.go`: Added logging for workflow removal operations, file discovery, and orphan cleanup
- `spec.go`: Added logging for repository and workflow spec parsing with format detection
- `enable.go`: Added logging for workflow enable/disable operations and bulk workflow management

**Workflow Package:**
- `expression_nodes.go`: Added logging for multiline disjunction rendering

All logging follows project guidelines:
- Uses `pkg:filename` naming convention
- Logs function entry with parameters
- Logs control flow decisions and state changes
- Ensures no side effects in log arguments
- Uses existing variables without computation

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions bot added automation enhancement New feature or request labels Nov 22, 2025
@pelikhan pelikhan merged commit 4137d2b into main Nov 22, 2025
4 checks passed
@pelikhan pelikhan deleted the log-enhancement-cli-workflow-2025-11-22-8e5bffcf3a3a9475 branch November 22, 2025 12:29
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.

2 participants