Skip to content

[log] Add debug logging to NVX, AWF model policy, work-queue, checkout-ref warning, and grader loader - #75592

Merged
pelikhan merged 1 commit into
mainfrom
go-logger-enhancement-20261107-330fbb56946df1bf
Nov 7, 2026
Merged

pelikhan merged 1 commit into
mainfrom
go-logger-enhancement-20261107-330fbb56946df1bf

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Warning

Threat detection engine error

Threat detection could not complete its analysis due to a tooling error. This is not a security finding.

What happened

The threat detection results could not be parsed.

Review the workflow run logs to troubleshoot the error.

Summary

Adds pkg/logger debug logging to five files in pkg/workflow that had no logging at all. All output is gated by DEBUG, and none of the log arguments call functions or have side effects.

File Logger What is logged
pkg/workflow/nvx.go workflow:nvx Start of NVX validation, the effective resource limits, and decisions about generating setup steps
pkg/workflow/awf_config_policy.go workflow:awf_config_policy Model-policy inputs (env overrides on or off) and the resolved allowed/blocked counts
pkg/workflow/work_queue_repo_config.go workflow:work_queue_repo_config Whether aw.json work_queue.issues is applied, the legacy policy path, and the number of discovered worker profiles
pkg/workflow/checkout_ref_warning.go workflow:checkout_ref_warning Skip decisions, YAML parse failures, and refs treated as untrusted because their expressions could not be extracted
pkg/workflow/gradershell/load.go gradershell:load The resolved grader source path, rejected file mode or size, a missing shebang, and the loaded byte count

Notes

  • The first entries in the pre-flight manifest (actionpins, agentdrain) already had loggers and were processed in earlier runs. I verified the files with grep instead and picked ones with no logging.
  • No test files were modified.

Validation

  • make build && make fmt passed (exit code 0).

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

Generated by 📝 Go Logger Enhancement · claude · routed: opus55 medium · ~95 AIC · ⌖ ~2 AIC · ⊞ 3.7K · ◷

  • expires on Nov 8, 2026, 7:25 PM UTC-08:00

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The review found no active approval-blocking issues, with the remaining debug-log exposure concerns identified as moderate and non-blocking.

No open issues 🎉

What changed in this PR

Adds DEBUG-gated, namespace-specific logging to five workflow and grader-loading components without changing normal runtime behavior.

Changes:

  • Logs NVX validation, resource limits, and setup-step decisions.
  • Logs model-policy resolution, work-queue configuration, and worker-profile discovery.
  • Logs checkout-reference analysis and shell-grader loading diagnostics.
  • Two moderate issues remain: checkout YAML parse errors and missing-shebang diagnostics may expose substantial workflow or grader source content in debug logs; these should be sanitized or truncated.
File Summary
pkg/​workflow/​work_queue_repo_config.go Logs work-queue configuration paths and discovered worker profiles.
pkg/​workflow/​nvx.go Logs NVX validation, resource limits, and setup-step generation decisions.
pkg/​workflow/​gradershell/​load.go Logs grader source resolution and validation outcomes. Moderate finding: the missing-shebang log may include up to 64 KiB of source content.
pkg/​workflow/​checkout_ref_warning.go Logs checkout warning checks and parsing decisions. Moderate finding: raw YAML parse errors may include workflow-provided content.
pkg/​workflow/​awf_config_policy.go Logs model-policy inputs and resolved rule counts.

Review effort: Lite (auto)

@pelikhan
pelikhan merged commit 8c8a697 into main Nov 7, 2026
58 checks passed
@pelikhan
pelikhan deleted the go-logger-enhancement-20261107-330fbb56946df1bf branch November 7, 2026 04:48
@github-actions

Copy link
Copy Markdown
Contributor Author

🎉 This pull request is included in a new release.

Release: v1.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants