[log] Add debug logging to internal/jqutil/secure.go - #10645
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds debug logging around shared gojq parsing and compiler-option construction.
Changes:
- Adds a jqutil debug logger.
- Logs parse-error details and variable counts.
Show a summary per file
| File | Description |
|---|---|
internal/jqutil/secure.go |
Adds diagnostic logging to jq utilities. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
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.
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: PASS Notes:
|
🔒 mcpg Read-Only Stress — gVisorSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: PASS Part B write tools absent from gateway-filtered tool set — MCP error References: §30916987072
|
🔒 mcpg Read-Only Stress — docker-sbxSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: PASS ✅ Run: §30916988670
|
Summary
Adds a debug logger to
internal/jqutil/secure.go, a leaf utility package (no existing logger) that centralizes shared gojq compiler options and parse-error formatting used by bothinternal/configandinternal/middleware.Changes
var log = logger.New("jqutil:secure")ParseErrorDetails: logs whether the error wraps a*gojq.ParseError, and logs the resolved offset/token on successCompileOptsWithVariables: logs the number of variables used to build compiler optionsValidation
go build ./...— passesgo vet ./internal/jqutil/...— passesgo test ./internal/jqutil/...— all 8 tests passgo test ./internal/config/... ./internal/middleware/...(dependents) — passgofmt -l— no issuesNo unrelated files were modified.