[log] Add debug logging to utility and workflow files#34165
Merged
Conversation
Adds namespaced debug loggers and meaningful log calls to five previously unlogged files in pkg/errorutil, pkg/jsonutil, pkg/syncutil, and pkg/workflow. Each file gets a package-level logger.New(\"pkg:filename\") declaration plus 2-4 log calls at entry points, branches, and error paths. Side-effect-free arguments only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Adds namespaced debug loggers and meaningful log calls to five previously unlogged files following the project's logging guidelines in AGENTS.md. Each file declares a package-level logger via
logger.New("pkg:filename")and emits 2-4 log calls at function entry, branch decisions, and error paths.Files modified
pkg/jsonutil/json.go— loggerjsonutil:json; logs encode failures and marshalled byte countpkg/errorutil/errors.go— loggererrorutil:errors; logs when an error is classified as 404/403/410pkg/syncutil/onceloader.go— loggersyncutil:onceloader; logs cache miss/hit, loader outcome, reset, and override eventspkg/workflow/workflow_inputs_extractor.go— loggerworkflow:workflow_inputs_extractor; logs YAML/markdown read paths, frontmatter extraction failures, and resolved input counts per triggerpkg/workflow/safe_outputs_workflow_helpers.go— loggerworkflow:safe_outputs_workflow_helpers; logs tool generation context, required-input counts, and workflow extension resolution branchesConstraints honored
pkg:filenameconvention fromAGENTS.mdTest plan
make buildsucceeds with no compilation errorsmake test-unit(not run in this environment due to sandbox restrictions; package-level builds are green)DEBUG=workflow:workflow_inputs_extractor,jsonutil:*,errorutil:*,syncutil:*,workflow:safe_outputs_workflow_helpers ./gh-aw compile <workflow>and confirming the new log lines appear🤖 Generated with [Claude Code]((claude.com/redacted)