Repository navigation
[log] Add debug logging to WASM guard discovery - #17272
github-actions[bot] wants to merge 1 commit into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The discovery fallback reports all stat failures as “not found,” masking permission or I/O errors instead of preserving or distinguishing the underlying cause.
1 open issue
What changed in this PR
Adds debug-level observability to WASM guard discovery without changing discovery behavior or error handling.
Changes:
- Logs entry into
FindGuardFileand fallback from the baked-in guard. - Logs skipped directory entries during guard discovery.
- Logs guard-directory read failures before returning the existing error.
| File | Description |
|---|---|
| internal/guard/wasm_discovery.go | Adds four logWasm debug messages around WASM guard discovery, fallback behavior, skipped entries, and directory-read failures. |
Review effort: Lite (adaptive)
| logWasm.Printf("Found baked-in container guard: %s", ContainerGuardWasmPath) | ||
| return ContainerGuardWasmPath, true, nil | ||
| } | ||
| logWasm.Printf("Baked-in container guard not found, falling back to guards directory: serverID=%s", serverID) |
🔒 mcpg Read-Only Stress — defaultSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE
No writes were attempted (per safety rules) since neither precondition for a meaningful write-refusal test was present. Part A/C reads fully succeeded, confirming the read surface works correctly under the default runtime.
|

Adds four debug log calls to
internal/guard/wasm_discovery.go, reusing the existinglogWasmlogger:FindGuardFileentry (serverID)Log arguments are plain values with no side effects.
go vet ./internal/guard,go test ./internal/guardandgo buildpass.