[log] Add debug logging to files with minimal or no existing coverage - #52624
Open
github-actions[bot] wants to merge 1 commit into
Open
[log] Add debug logging to files with minimal or no existing coverage#52624github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
Adds pkg:filename-namespaced loggers and log.Print/Printf calls at decision points in five files that had zero or minimal debug logging: - pkg/workflow/memory_validation_config.go: legacy field usage, deprecated field rejection, default timeout application - pkg/workflow/enclaves.go: validation entry, network-isolation and bounded-queries rejection paths, built config count - pkg/typeutil/lookup.go: LookupStringPath step failures - pkg/workflow/mcp_renderer_guard.go: guard-policies JSON/TOML render entry - pkg/workflow/dismiss_pull_request_review.go: legacy alias key usage, invalid target rejection, non-map fallback Co-Authored-By: Claude Sonnet 5 <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 pkg:filename-namespaced pkg/logger debug logging to 5 Go files in pkg/ that had zero or minimal existing debug logging, per the Go Logger Enhancement mission.
Files changed
All new log arguments are simple field/length reads (no side effects or expensive computation). No existing log calls were duplicated.
Selection process note
The pre-flight manifest.json files_needing_logger list proved unreliable as a direct source of truth - it flags files lacking their own local logger.New(...) call even when they already have extensive logging via a shared or parameter-passed logger. Several of its top entries (e.g. pkg/parser/import_topological.go, pkg/workflow/action_resolver.go) were already thoroughly logged and were rejected after reading their contents. Candidates here were instead selected by directly verifying each files actual logging coverage against its logic complexity.
Validation
make build / make fmt could not be run to completion in this environment: the repos go.mod requires go >= 1.26.5, but the go binary resolved by make in this sandbox is 1.24.13 with GOTOOLCHAIN=local, so the toolchain check fails before compiling anything (pre-existing environment issue, unrelated to this diff, and already present at the base commit). Direct invocation of go/gofmt binaries (including ones at other installed toolchain paths available on disk) is also blocked by the sandbox in this non-interactive run. All five diffs were manually re-read for syntax correctness, import-cycle safety (confirmed pkg/logger does not depend on pkg/typeutil or pkg/workflow), matching indentation/brace structure, and absence of duplicate variable names in their packages.
Generated with automated Go Logger Enhancement workflow.