[log] Add debug logging to enclavegithub route matching - #12129
Conversation
Add logRoute logger (enclavegithub:route namespace) to MatchRoute, logging path matching attempts, unmatched routes, repository normalization failures, rejected query parameters, and successful route matches. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The new logger should follow the repository’s logger.ForFile() convention.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds debug logging for enclave GitHub route matching and rejection paths.
Changes:
- Adds route-level logging for entry, rejection, normalization, and success.
- Introduces a dedicated logger namespace.
File summaries
| File | Description |
|---|---|
internal/enclavegithub/route.go |
Adds route-matching diagnostics. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
🔒 mcpg Read-Only Stress — default AWFSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE
No writes leaked. No issues, comments, branches, files, PRs, reactions, or stars were created. References: §33321775234
|
🔒 mcpg Read-Only Stress — gvisorSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE
No writes leaked. Reads succeeded on both MCP and CLI surfaces. References: §33321775284
|
🔒 mcpg Read-Only Stress — docker-sbxSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE
No writes succeeded. No FAIL conditions detected. References: §33321775250
|
Summary
Adds debug logging to
internal/enclavegithub/route.go, a file that previously had no logger.Changes
var logRoute = logger.New("enclavegithub:route")following thepkg:filenamenaming convention.logRoute.Printfcalls insideMatchRoute:Validation
go build -o awmg .— succeedsgo vet ./internal/enclavegithub/...— cleango test ./internal/enclavegithub/... -v— all tests pass (includingTestMatchRouteandTestMatchRouteRejectsBroadSurface)gofmt -l— no formatting issuesSingle-file, focused change with no side effects introduced in log arguments.