[log] Add debug logging to 5 workflow-related files#15338
Merged
Conversation
Enhanced debug logging across critical workflow compilation files for better troubleshooting. Added meaningful logging calls at key execution points. Files enhanced: - pkg/workflow/safe_outputs_config.go: Config extraction and handler setup - pkg/workflow/concurrency_validation.go: Expression validation progress - pkg/workflow/expression_builder.go: Condition tree construction - pkg/workflow/redact_secrets.go: Secret scanning and masking - pkg/workflow/markdown_security_scanner.go: Security category scans All logging follows guidelines: no side effects, meaningful messages, and proper use of log.Enabled() for expensive operations. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Contributor
6 tasks
* Initial plan * Remove redundant if log.Enabled() checks in workflow files Removed unnecessary `if log.Enabled()` conditionals from 8 files in pkg/workflow/. The logger package already checks enabled state internally, making these extra conditionals redundant. None of the logging operations were expensive enough to warrant the conditional check (just counting lengths, time calculations). Files updated: - safe_outputs_config.go - redact_secrets.go - concurrency_validation.go - expression_builder.go (2 instances) - markdown_security_scanner.go (2 instances) - claude_tools.go - compiler.go Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
pelikhan
approved these changes
Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR enhances debug logging across 5 critical workflow compilation files to improve troubleshooting and development visibility. All files already had logger declarations, so this change adds meaningful logging calls at key execution points.
Files Enhanced
1.
pkg/workflow/safe_outputs_config.goAdded logging for safe-outputs configuration extraction:
2.
pkg/workflow/concurrency_validation.goAdded logging for concurrency group expression validation:
3.
pkg/workflow/expression_builder.goAdded logging for GitHub Actions expression tree construction:
4.
pkg/workflow/redact_secrets.goAdded logging for secret masking operations:
5.
pkg/workflow/markdown_security_scanner.goAdded logging for security scanning:
countCategories()for summary loggingQuality Guidelines Followed
✅ No side effects - All log arguments are simple values or pre-computed
✅ Meaningful messages - Each log provides context about what's happening
✅ Proper logger naming - All files already used correct
pkg:filenamepattern✅ Efficient logging - Used
log.Enabled()check for expensive debug info✅ No test files - Only modified production code
✅ Build validated - Ran
make buildsuccessfullyTesting
Cache Updated
Updated workflow cache to track these 5 newly-enhanced files, bringing total tracked files to 19.
🤖 Generated with Claude Code