Skip to content

[log] Add debug logging to 5 workflow compilation files#13682

Merged
pelikhan merged 1 commit intomainfrom
main-5e17c62e6f0ab15b
Feb 4, 2026
Merged

[log] Add debug logging to 5 workflow compilation files#13682
pelikhan merged 1 commit intomainfrom
main-5e17c62e6f0ab15b

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Feb 4, 2026

Summary

Enhanced 5 Go files in the pkg/workflow directory with debug logging statements to improve troubleshooting and development.

Files Modified

  1. pkg/workflow/frontmatter_extraction_metadata.go

    • Added logger declaration: frontmatterMetadataLog
    • Added logging for tracker ID extraction and validation
    • Added logging for tools timeout extraction with type information
  2. pkg/workflow/safe_outputs_config_messages.go

    • Added logger declaration: safeOutputMessagesLog
    • Added logging for messages configuration parsing
    • Added logging for mentions configuration with type detection
    • Added logging for message config serialization
  3. pkg/workflow/safe_outputs_config_helpers_reflection.go

    • Added logger declaration: safeOutputReflectionLog
    • Added logging for reflection-based safe output detection
    • Added logging for enabled tool name collection
    • Added logging for custom job tool discovery
  4. pkg/workflow/close_entity_helpers.go

    • Enhanced existing logging in parseCloseEntityConfig function
    • Added logging for default max value assignment
    • Added logging for target-repo slug validation failures
  5. pkg/workflow/expression_patterns.go

    • Added logger declaration: expressionPatternsLog
    • Added init function with logging for regex pattern compilation

Logging Guidelines Followed

✅ Logger naming convention: pkg:filename pattern (e.g., workflow:frontmatter_extraction_metadata)
✅ Logger arguments have no side effects
✅ Logging added at function entry for important operations
✅ Logging added for state changes and validation results
✅ Meaningful, helpful logging messages
✅ No duplicate logging with existing logs

Validation

  • ✅ Build successful: make build
  • ✅ Compilation test successful: go run ./cmd/gh-aw compile dev
  • ✅ Debug logs appear correctly when DEBUG=* is set

Example Debug Output

workflow:frontmatter_extraction_metadata Extracting and validating tracker-id
workflow:safe_outputs_config_helpers_reflection Checking if any safe outputs are enabled using reflection
workflow:safe_outputs_config_helpers_reflection Found enabled safe output field: MissingTool
workflow:expression_patterns Initializing expression pattern regex compilation

🤖 Generated with [Claude Code]((claude.com/redacted)

AI generated by Go Logger Enhancement

  • expires on Feb 6, 2026, 7:40 AM UTC

Enhanced 5 Go files in pkg/workflow with debug logging:
- frontmatter_extraction_metadata.go: tracker ID and timeout extraction
- safe_outputs_config_messages.go: message configuration parsing
- safe_outputs_config_helpers_reflection.go: reflection-based checks
- close_entity_helpers.go: entity configuration parsing
- expression_patterns.go: regex pattern initialization

All logging follows project guidelines with proper naming convention
(workflow:filename) and side-effect-free arguments.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions github-actions bot added automation enhancement New feature or request labels Feb 4, 2026
@pelikhan pelikhan merged commit cbab251 into main Feb 4, 2026
@pelikhan pelikhan deleted the main-5e17c62e6f0ab15b branch February 4, 2026 07:42
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.

1 participant