Skip to content

Conversation

@github-actions
Copy link
Contributor

Summary

This PR enhances 5 Go files with meaningful debug logging statements to improve troubleshooting and development visibility. All changes follow the project's logging guidelines from AGENTS.md.

Files Enhanced

1. pkg/workflow/claude_tools.go (workflow:claude_tools)

  • Added logging for neutral tools expansion entry with input tools count
  • Added expansion completion logging with result tools and Claude allowed count
  • Added error detection logging for claude section in input
  • Added conversion logging for neutral to Claude-specific format

2. pkg/cli/enable.go (cli:enable)

  • Added entry logging for enable/disable workflows with workflow count and repo
  • Added GitHub workflows status fetch with count logging
  • Added workflows not found error logging
  • Added target workflows processing count logging
  • Added desired state already achieved detection logging

3. pkg/workflow/script_registry.go (workflow:script_registry)

  • Added script registry creation logging
  • Added GetActionPath lookups with results logging
  • Added script filename collection from JavaScript sources logging

4. pkg/cli/dependency_graph.go (cli:dependency_graph)

  • Added import extraction from file with parsing details logging
  • Added frontmatter parsing for imports logging
  • Added git root discovery with search path logging

5. pkg/cli/spec.go (cli:spec)

  • Added repo spec version parsing logging
  • Added GitHub URL format detection and parsing logging
  • Added current directory repo resolution logging
  • Added local workflow spec parsing with validation logging
  • Added GitHub URL component extraction with logging

Logger Guidelines Compliance

All changes follow the project's logging guidelines:

  • ✅ Each file already had a logger declaration with correct naming convention
  • ✅ Logger arguments don't compute anything or cause side effects
  • ✅ Logging messages are meaningful and helpful for debugging
  • ✅ No duplicate logging with existing logs
  • ✅ Used log.Enabled() checks for expensive debug info where appropriate
  • ✅ Logged function entry for important operations
  • ✅ Logged important control flow and state changes
  • ✅ Logged error conditions with context

Testing & Validation

  • ✅ Changes validated with make build (no compilation errors)
  • ✅ Workflow compilation tested with DEBUG=* ./gh-aw compile dev
  • ✅ Debug logging output verified for enhanced files
  • ✅ No test files modified
  • ✅ Maximum 5 files per PR constraint met

Cache Updated

Session 33 information saved to cache:

  • processed-files.json updated with 5 new files (total: 44 files enhanced)
  • last-run.json updated with current commit SHA and session details

Impact

These logging enhancements will help developers:

  • Debug Claude tool expansion and configuration issues
  • Troubleshoot workflow enable/disable operations
  • Trace script registry lookups and bundling
  • Understand dependency graph build and resolution
  • Debug repository spec parsing and validation

All logging is only visible when DEBUG=* or specific logger names are enabled, so there's no impact on normal CLI output.

AI generated by Go Logger Enhancement

Enhanced Claude tools expansion, workflow enable/disable operations, script
registry, dependency graph tracking, and repository spec parsing with
meaningful debug logging statements following project guidelines.

Files enhanced:
- pkg/workflow/claude_tools.go (workflow:claude_tools)
- pkg/cli/enable.go (cli:enable)
- pkg/workflow/script_registry.go (workflow:script_registry)
- pkg/cli/dependency_graph.go (cli:dependency_graph)
- pkg/cli/spec.go (cli:spec)

All changes validated with successful build and test compilation.

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

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@github-actions github-actions bot added automation enhancement New feature or request labels Dec 30, 2025
@pelikhan pelikhan merged commit 6f12ed4 into main Dec 30, 2025
4 checks passed
@pelikhan pelikhan deleted the main-f46cf04d78005e6d branch December 30, 2025 14:39
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