Repository navigation
[log] Add debug logging to config/guard_policy_public.go - #17109
Conversation
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
🟢 Approval recommended
The reviewed change is limited to adding debug observability around existing public-repository policy paths, with no active review issues identified.
No open issues 🎉
What changed in this PR
Adds debug logging to internal/config/guard_policy_public.go to make public-repository policy decisions and early-return paths observable without changing policy behavior.
Changes:
- Initializes the
config:guard_policy_publicfile-scoped logger. - Logs nil, write-sink-only, policy creation, map handling, and canonical key injection paths.
- Logs public-repository enforcement decisions while preserving existing policy transformations.
| File | Description |
|---|---|
| internal/config/guard_policy_public.go | Adds debug logging around ForcePublicRepos and ForcePublicReposInMap policy decisions and mutation paths. |
Review effort: Lite (adaptive)
mcpg Read-Only Stress - defaultSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE Part B: the gh-aw tools.github wrapper forces GITHUB_READ_ONLY=1 on the backend, so write tools are structurally never registered - this proves backend/toolset config, not mcpg's own gateway-level block, hence INCONCLUSIVE rather than PASS. No write succeeded; no artifact was created or leaked in any part of this test.
|
Adds debug logging (
config:guard_policy_public, vialogger.ForFile()) tointernal/config/guard_policy_public.go.Logged: early-return paths (nil / write-sink-only policy, nil raw map), allow-only creation, forcing
repos=public, inapplicable map policies, and canonical allow-only key injection. Log arguments have no side effects.Validation:
go vet ./internal/config,go test ./internal/config, andgo build -o awmgall pass.