Skip to content

[log] Add namespace loggers to three workflow files#33453

Merged
pelikhan merged 1 commit into
mainfrom
log-add-error-recovery-and-setup-c00916b679032232
May 20, 2026
Merged

[log] Add namespace loggers to three workflow files#33453
pelikhan merged 1 commit into
mainfrom
log-add-error-recovery-and-setup-c00916b679032232

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 20, 2026

PR Description: [log] Add namespace loggers to three workflow files

PR Number: #33453
Repository: github/gh-aw
Type: observability
Breaking: false

Summary

Added structured logging instrumentation to three workflow package files (command_dispatch_validation.go, error_recovery.go, gh_aw_setup_steps.go) to improve observability of workflow compilation and validation processes. All changes are purely additive—no logic, APIs, or behavior modified.

Changes by File

pkg/workflow/command_dispatch_validation.go

  • Change Type: modified
  • Impact: medium
  • Description: Added namespace logger workflow:command_dispatch_validation and logging statements to trace workflow_dispatch input validation decisions
  • Key Additions:
    • Module-scoped logger: commandDispatchValidationLog = logger.New("workflow:command_dispatch_validation")
    • Log statement tracking validation triggers (slash_command, label_command presence)
    • Log statements for required input detection and validation outcomes

pkg/workflow/error_recovery.go

  • Change Type: modified
  • Impact: medium
  • Description: Added namespace logger workflow:error_recovery and logging throughout the error recovery pipeline
  • Key Additions:
    • Module-scoped logger: errorRecoveryLog = logger.New("workflow:error_recovery")
    • Logging for error message expansion, prioritization, truncation decisions
    • Logging for critical syntax error detection patterns

pkg/workflow/gh_aw_setup_steps.go

  • Change Type: modified
  • Impact: medium
  • Description: Added namespace logger workflow:gh_aw_setup_steps and logging for setup step generation logic
  • Key Additions:
    • Module-scoped logger: ghAwSetupLog = logger.New("workflow:gh_aw_setup_steps")
    • Logging for action mode selection (dev vs. production)
    • Logging for action reference resolution, pinning logic, and fallback paths
    • Parameter tracking (action_mode, action_repo, cli_version, with_field_count)

Impact Assessment

  • Functionality: No functional changes—all additions are observability instrumentation
  • Performance: Negligible—logging calls are conditional and structured
  • Debugging: Significantly improved—enables tracing of validation, error recovery, and setup step generation decisions
  • Maintenance: Positive—structured namespaces (workflow:*) enable targeted log filtering

Testing Considerations

  • Existing tests remain valid (no behavior changes)
  • Log output can be verified manually or through integration tests
  • No new test coverage required for observability-only changes

Dependencies

  • Uses existing github.com/github/gh-aw/pkg/logger package
  • No new dependencies introduced

Rollout Risk

Low — Changes are additive and non-breaking. Logging infrastructure already exists in codebase.


Commit: eccb345cb — "Add namespace loggers to three workflow files"

Generated by PR Description Updater for issue #33453 · ● 3.7M ·

Adds debug loggers and entry/decision-point logging to:
- pkg/workflow/error_recovery.go (workflow:error_recovery)
- pkg/workflow/gh_aw_setup_steps.go (workflow:gh_aw_setup_steps)
- pkg/workflow/command_dispatch_validation.go (workflow:command_dispatch_validation)

These files previously had no logging despite implementing non-trivial
logic (error classification, action ref resolution with fallbacks,
workflow_dispatch input validation). Logging follows the pkg:filename
convention from AGENTS.md and only emits work when the namespace is
enabled via the DEBUG environment variable.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added automation enhancement New feature or request labels May 20, 2026
@pelikhan pelikhan merged commit b248fe4 into main May 20, 2026
@pelikhan pelikhan deleted the log-add-error-recovery-and-setup-c00916b679032232 branch May 20, 2026 04:53
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