Repository navigation
[log] Add debug logging to cmd/flags_logging.go - #16060
Conversation
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
An active finding remains in internal/cmd/flags_logging.go because it uses logger.New instead of the repository’s preferred file-derived logger.ForFile constructor.
1 open issue
What changed in this PR
Adds debug logging to the logging-related CLI flag registration path in internal/cmd/flags_logging.go, exposing registration timing and resolved default values through the cmd:flags_logging namespace.
Changes:
- Adds a dedicated
cmd:flags_logginglogger. - Logs when logging flags are registered.
- Logs defaults for log, payload, WASM cache, payload threshold, and URL-domain auditing settings.
Review note: The logger should use the file-derived constructor rather than logger.New to match repository conventions and remain aligned if the file is renamed. (Nit, 2 votes.)
| File | Description |
|---|---|
internal/cmd/flags_logging.go |
Defines the logging namespace and emits registration/default-value debug messages. |
Review effort: Lite (auto)
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
🔒 mcpg Read-Only Stress — defaultSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE Part B: all 7 targeted write tools were absent from the backend's exposed catalog (23 read-only tools only), consistent with gh-aw's GITHUB_READ_ONLY=1 always-on backend config. This proves backend/toolset configuration blocks the call before it reaches the gateway - it does NOT independently confirm mcpg's own gateway-level write-blocking layer (DIFC/guards), since no write tool ever reached a write-capable backend to be refused at call-time. Parts D/E: gh auth status reported 'not logged into any GitHub hosts' - the proxied-CLI token-scope boundary could not be exercised this run. No write leaked through any surface in this run. Full detail saved to /tmp/gh-aw/agent/readonly-stress-42239927023.txt on the runner.
|

Adds a
cmd:flags_loggingdebug logger tointernal/cmd/flags_logging.go, with two calls: one when the logging flags are registered, and one reporting the default flag values (log-dir, payload-dir, wasm-cache-dir, payload-size-threshold, url-domain-audit).The log arguments only read existing package variables and have no side effects.
Validation:
go vet ./internal/cmd,go test ./internal/cmdandgo buildall pass.