Skip to content

Conversation

@github-actions
Copy link
Contributor

Summary

Added debug logging statements to 5 files to improve troubleshooting capabilities and help developers understand the execution flow during development:

  • pkg/cli/run.go: Added logging for workflow run cancellation operations

    • Logs workflow IDs and lock file names being cancelled
    • Tracks the number of runs found and individual cancellations
    • Reports completion status
  • pkg/workflow/fetch.go: Added logging for MCP fetch server configuration

    • Logs when web-fetch tool is requested or skipped
    • Tracks engine support detection
    • Records successful configuration additions
  • pkg/workflow/npm.go: Added logging for npm package validation

    • Logs the number of packages being validated
    • Tracks individual package validation results
    • Reports validation failures and successes
  • pkg/workflow/pip.go: Added logging for pip/uv package validation

    • Logs package validation start and pip command detection
    • Tracks individual package validation for pip and uv
    • Reports fallback to pip3 when needed
  • pkg/workflow/env.go: Added logging for header writing operations

    • Logs the number of headers being written to YAML
    • Reports completion status

Guidelines Followed

All changes follow the project's logging guidelines from AGENTS.md:

✅ Logger naming convention: pkg:filename pattern (e.g., cli:cancel, workflow:fetch)
✅ Logger arguments have no side effects or computations
✅ Logging messages are meaningful and helpful for debugging
✅ Logs added at function entry, control flow decisions, and important operations
✅ No test files modified (*_test.go)
✅ Maximum 5 files per PR maintained

Test Plan

  • Build validation: make build passes without errors
  • Debug logging test: DEBUG=* ./gh-aw compile dev shows new logging output
  • Verified logger naming conflicts resolved (renamed runLog to cancelLog in run.go)
  • Confirmed no side effects in log arguments
  • All modified files compile successfully

Example Debug Output

workflow:fetch web-fetch tool not requested, skipping MCP fetch server +74ms

🤖 Generated with Claude Code

AI generated by Go Logger Enhancement

Added debug logging statements to improve troubleshooting capabilities:

- pkg/cli/run.go: Added logging for workflow run cancellation operations
- pkg/workflow/fetch.go: Added logging for MCP fetch server configuration
- pkg/workflow/npm.go: Added logging for npm package validation
- pkg/workflow/pip.go: Added logging for pip/uv package validation
- pkg/workflow/env.go: Added logging for header writing operations

All loggers follow the project's naming convention (pkg:filename) and
use meaningful messages without side effects. Changes validated with
make build and tested with DEBUG=* ./gh-aw compile dev.

🤖 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 Oct 30, 2025
@pelikhan pelikhan merged commit e7671bd into main Oct 30, 2025
4 checks passed
@pelikhan pelikhan deleted the log-enhance-5-files-bf923bed5bff8821 branch October 30, 2025 12:27
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