Skip to content

[log] Add debug logging to import processing, safe outputs PR compilation, and analysis functions#7353

Merged
pelikhan merged 1 commit into
mainfrom
main-5d19dcccbdaff3a4
Dec 23, 2025
Merged

[log] Add debug logging to import processing, safe outputs PR compilation, and analysis functions#7353
pelikhan merged 1 commit into
mainfrom
main-5d19dcccbdaff3a4

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Summary

This PR enhances debug logging across 5 Go files following the project's logging guidelines from AGENTS.md:

  • pkg/parser/import_processor.go - Added logging to import processing functions for better debugging of import resolution, duplicate detection, and agent file handling
  • pkg/workflow/compiler_safe_outputs_prs.go - Added logger declaration and logging to pull request step configuration functions to track draft settings, if-no-changes behavior, and pre-step builds
  • pkg/cli/audit_report_analysis.go - Enhanced performance metrics generation with cost efficiency and tool usage logging
  • pkg/parser/frontmatter_content.go - Added logging to frontmatter extraction functions to track content processing
  • pkg/cli/tokens_bootstrap.go - Added logging to token bootstrap process to track engine-specific checks and missing token detection

All logging follows project guidelines:

  • Logger declarations use correct pkg:filename naming convention
  • Log statements have no side effects in arguments
  • Logging is meaningful and helps with troubleshooting
  • Added logging at function entry points and important control flow decisions

Changes

Files Enhanced

  1. pkg/workflow/compiler_safe_outputs_prs.go (304 lines)

    • Added logger declaration: prSafeOutputsLog = logger.New("workflow:compiler_safe_outputs_prs")
    • Added logging in buildCreatePullRequestStepConfig for draft and if-no-changes settings
    • Added logging in buildUpdatePullRequestStepConfig for update operations
    • Added logging in buildCreatePullRequestPreStepsConsolidated for app configuration and trial mode detection
  2. pkg/parser/import_processor.go (447 lines)

    • Added logging in ProcessImportsFromFrontmatter with base directory parameter
    • Added duplicate import detection logging
    • Added multiple agent files detection logging
  3. pkg/cli/audit_report_analysis.go (364 lines)

    • Added cost efficiency calculation logging
    • Added most used tool identification logging with call counts
  4. pkg/parser/frontmatter_content.go (301 lines)

    • Added logging in ExtractFrontmatterString to track content size
    • Added empty frontmatter fields detection logging
  5. pkg/cli/tokens_bootstrap.go (283 lines)

    • Added logging in runTokensBootstrap with engine, owner, and repo parameters
    • Added engine-specific token checking logging with counts
    • Added missing tokens detection logging

Validation

  • Built successfully with make build
  • Tested with DEBUG=* ./gh-aw compile dev - logging output appears correctly
  • No compilation errors
  • No test files modified

Cache Update

Updated persistent cache to track these 5 files as processed, bringing the total enhanced files count to 24 across sessions 21-26.

AI generated by Go Logger Enhancement

…and analysis functions

Enhanced debug logging across 5 Go files following project guidelines:
- pkg/parser/import_processor.go: Import resolution and duplicate detection
- pkg/workflow/compiler_safe_outputs_prs.go: PR step configuration and pre-steps
- pkg/cli/audit_report_analysis.go: Performance metrics and cost efficiency
- pkg/parser/frontmatter_content.go: Frontmatter extraction
- pkg/cli/tokens_bootstrap.go: Token bootstrap and engine-specific checks

All logging follows project guidelines with no side effects in arguments.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions github-actions Bot added automation enhancement New feature or request labels Dec 23, 2025
@pelikhan pelikhan merged commit 2026f01 into main Dec 23, 2025
4 checks passed
@pelikhan pelikhan deleted the main-5d19dcccbdaff3a4 branch December 23, 2025 06:41
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