Skip to content

[log] Add debug logging to utility and workflow files#34165

Merged
pelikhan merged 1 commit into
mainfrom
add-debug-logging-utilities-8b079a45cd47c0b6
May 23, 2026
Merged

[log] Add debug logging to utility and workflow files#34165
pelikhan merged 1 commit into
mainfrom
add-debug-logging-utilities-8b079a45cd47c0b6

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

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 — logger jsonutil:json; logs encode failures and marshalled byte count
  • pkg/errorutil/errors.go — logger errorutil:errors; logs when an error is classified as 404/403/410
  • pkg/syncutil/onceloader.go — logger syncutil:onceloader; logs cache miss/hit, loader outcome, reset, and override events
  • pkg/workflow/workflow_inputs_extractor.go — logger workflow:workflow_inputs_extractor; logs YAML/markdown read paths, frontmatter extraction failures, and resolved input counts per trigger
  • pkg/workflow/safe_outputs_workflow_helpers.go — logger workflow:safe_outputs_workflow_helpers; logs tool generation context, required-input counts, and workflow extension resolution branches

Constraints honored

  • Maximum 5 files modified, no test files touched
  • All log arguments are side-effect-free (plain identifiers, lengths, error values)
  • Namespaces follow the pkg:filename convention from AGENTS.md

Test plan

  • make build succeeds with no compilation errors
  • make test-unit (not run in this environment due to sandbox restrictions; package-level builds are green)
  • Verify debug output by running 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)

Generated by 📝 Go Logger Enhancement · ● 44.4M ·

  • expires on May 25, 2026, 4:39 AM UTC

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>
@github-actions github-actions Bot added automation enhancement New feature or request labels May 23, 2026
@pelikhan pelikhan merged commit 5288def into main May 23, 2026
@pelikhan pelikhan deleted the add-debug-logging-utilities-8b079a45cd47c0b6 branch May 23, 2026 05:05
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