Skip to content

[log] Add debug logging to AWF config, MCP validation, and experiment/chain metrics#29677

Merged
pelikhan merged 1 commit intomainfrom
log/add-debug-logging-awf-config-mcp-experiments-69f632ffff152a49
May 2, 2026
Merged

[log] Add debug logging to AWF config, MCP validation, and experiment/chain metrics#29677
pelikhan merged 1 commit intomainfrom
log/add-debug-logging-awf-config-mcp-experiments-69f632ffff152a49

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 2, 2026

Summary

Adds debug logging to 5 files that previously had no log output, following the pkg:filename naming convention from AGENTS.md.

Files changed

  • pkg/workflow/awf_config.go — New workflow:awf_config logger. Logs BuildAWFConfigJSON entry (engine name, allowed domains), network allow/block domain counts, each custom API proxy target added (openai/anthropic/copilot/gemini), container image tag, and final JSON byte count.

  • pkg/cli/mcp_argument_validation.go — New cli:mcp_argument_validation logger. Logs when the middleware intercepts an unknown-parameter error (tool name + params), when findSimilarParam starts searching, and whether a match was found above the 0.7 threshold.

  • pkg/cli/audit_report_experiments.go — New cli:audit_report_experiments logger. Logs experiment data extraction start, state file discovery (or absence), experiment count, and per-experiment variant selection.

  • pkg/cli/logs_safe_output_chains.go — New cli:logs_safe_output_chains logger. Logs when no artifacts are present (early return), manifest entry count, temporary ID map status and mapping count, and the final chain metrics (chained targets, followup actions, delegated, closed).

  • pkg/workflow/safe_outputs_needs_validation.go — Enhances the existing workflow:safe_outputs_needs_validation logger (1 call → 4 calls). Adds logging for the declared needs count, available custom jobs count, and per-need validation failures (reserved name / unknown job).

Test plan

  • make build — validates compilation (currently blocked by pre-existing Go toolchain version mismatch: go.mod requires 1.25.8, CI has 1.24.13)
  • make test-unit — runs unit tests
  • DEBUG=workflow:awf_config,cli:mcp_argument_validation,cli:audit_report_experiments,cli:logs_safe_output_chains,workflow:safe_outputs_needs_validation ./gh-aw compile dev — validates debug output appears

🤖 Generated with [Claude Code]((claude.com/redacted)

Generated by Go Logger Enhancement · ● 1.8M ·

  • expires on May 4, 2026, 4:30 AM UTC

… metrics

Add debug logging to 5 files that previously had no log output:

- pkg/workflow/awf_config.go: log BuildAWFConfigJSON entry, network domains,
  API proxy targets, container image tag, and output size
- pkg/cli/mcp_argument_validation.go: log intercepted unknown param errors,
  similarity search start, and match/no-match outcomes
- pkg/cli/audit_report_experiments.go: log experiment state file discovery,
  extraction progress, and per-experiment variant selection
- pkg/cli/logs_safe_output_chains.go: log artifact presence check, manifest
  entry count, temporary ID map status, and computed chain metrics
- pkg/workflow/safe_outputs_needs_validation.go: log needs count, available
  custom jobs, and validation failure reasons

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added automation enhancement New feature or request labels May 2, 2026
@pelikhan pelikhan merged commit f084519 into main May 2, 2026
@pelikhan pelikhan deleted the log/add-debug-logging-awf-config-mcp-experiments-69f632ffff152a49 branch May 2, 2026 04:58
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