[log] Add debug logging to 5 pkg files#18401
Merged
Conversation
Adds meaningful debug log calls to key functions in: - pkg/workflow/checkout_manager.go: log CheckoutManager creation, default/additional checkout step generation, and config parsing - pkg/workflow/frontmatter_extraction_yaml.go: log workflow_run annotation, permissions extraction, and command config parsing - pkg/parser/schedule_parser.go: log entry to interval and base schedule parsing methods - pkg/cli/logs_orchestrator.go: log safe-output type checks and final run processing summary - pkg/workflow/claude_logs.go: log result payload extraction and parsed JSON log metrics Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds additional DEBUG-gated logging (via the existing pkg/logger namespace loggers) to improve troubleshooting and observability across workflow compilation, schedule parsing, log processing, and Claude log metric extraction.
Changes:
- Added debug logs in workflow frontmatter YAML processing for key decision points (zizmor annotation, permissions presence, slash command config parsing).
- Added debug logs in checkout manager creation/step generation and checkout frontmatter parsing.
- Added debug logs in schedule parsing, logs orchestration, and Claude log metrics extraction/parsing summaries.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/checkout_manager.go | Logs checkout manager lifecycle events and parsing/type context for checkout frontmatter. |
| pkg/workflow/frontmatter_extraction_yaml.go | Logs key frontmatter extraction/control-flow decisions for easier diagnosis of YAML/frontmatter handling. |
| pkg/parser/schedule_parser.go | Logs token context when parsing interval/base schedules to aid debugging parse failures. |
| pkg/cli/logs_orchestrator.go | Logs orchestration milestones (building logs data) and safe-output type filtering checks. |
| pkg/workflow/claude_logs.go | Logs entry/summary points for Claude metrics extraction and parsed log-entry summaries. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Adds meaningful
debuglog calls to key functions across 5 files using their existing logger variables. Each log statement helps troubleshoot runtime behavior without side effects.Files changed
pkg/workflow/checkout_manager.gocheckoutManagerLogpkg/workflow/frontmatter_extraction_yaml.gofrontmatterLogpkg/parser/schedule_parser.goscheduleLogpkg/cli/logs_orchestrator.gologsOrchestratorLogpkg/workflow/claude_logs.goclaudeLogsLogWhat was logged
workflow_runzizmor annotation, missing/present permissions field, command name resolution (shorthand and object forms)parseIntervalandparseBasewith token context for diagnosing schedule parsing issuesextractClaudeResultMetrics, extracted token/cost/turns summary from result payloads, and per-log-file parsed entry summaryValidation
make buildpasses with no errorsgo vet ./pkg/workflow/... ./pkg/parser/... ./pkg/cli/...passesTestCheckout*,TestClaude*, parser package) pass