Repository navigation
[log] Add error-path debug logging to guard WASM compilation cache - #16816
Conversation
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
🟢 Approval recommended
The review identifies only targeted debug logging around existing WASM cache error paths and reports no active issues.
No open issues 🎉
What changed in this PR
Adds debug logging for previously silent WASM compilation-cache error paths while preserving existing cache lifecycle behavior.
Changes:
- Logs disk-backed cache creation failures with directory and error context.
- Logs replacement-cache creation and previous-cache close failures during reconfiguration.
- Logs failures when closing the global cache.
| File | Description |
|---|---|
| internal/guard/wasm_cache.go | Adds guard:wasm debug logging around compilation-cache creation, replacement, and shutdown errors. |
Review effort: Lite (adaptive)
🔒 mcpg Read-Only Stress — defaultSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE ( No writes leaked. No destructive operations attempted.
|
Adds debug logging to
internal/guard/wasm_cache.go(reusing the existinglogWasmlogger,guard:wasm).New log calls cover error paths that were previously silent:
ConfigureGlobalCompilationCache(the existing cache is kept)CloseGlobalCompilationCacheLog arguments are plain values, with no side effects. The only logic change is that
newCompilationCachenow holds the disk-backed result in a local variable so it can log the error before returning it. Behavior is unchanged.Validation:
go vet ./internal/guardandgo test ./internal/guardpass, andgo buildsucceeds.