Skip to content

[log] Add error-path debug logging to guard WASM compilation cache - #16816

Merged
lpcox merged 1 commit into
mainfrom
log/guard-wasm-cache-logging-07c1473ff7f1b7a5
Nov 19, 2026
Merged

lpcox merged 1 commit into
mainfrom
log/guard-wasm-cache-logging-07c1473ff7f1b7a5

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Adds debug logging to internal/guard/wasm_cache.go (reusing the existing logWasm logger, guard:wasm).

New log calls cover error paths that were previously silent:

  • Disk-backed compilation cache creation failure
  • Replacement cache creation failure in ConfigureGlobalCompilationCache (the existing cache is kept)
  • Failure closing the previous cache, so the replacement is discarded
  • Failure closing the global cache in CloseGlobalCompilationCache

Log arguments are plain values, with no side effects. The only logic change is that newCompilationCache now 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/guard and go test ./internal/guard pass, and go build succeeds.

Generated by Go Logger Enhancement · copilot · routed: sonnet55 high · ~27 AIC · ⊞ 5.9K · ◷

@github-actions github-actions Bot added automation enhancement New feature or request labels Nov 18, 2026
@lpcox
lpcox marked this pull request as ready for review November 19, 2026 01:43
Copilot AI adaptive review requested due to automatic review settings November 19, 2026 01:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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)

@github-actions

Copy link
Copy Markdown
Contributor Author

🔒 mcpg Read-Only Stress — default

Surface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Isolation runtime: default (normal container isolation)

Part Surface Op Result Expected Status
A MCP reads data returned ALLOWED ✅
B MCP writes (add_issue_comment/star_repository/issue_write/create_branch/create_or_update_file/create_pull_request) all 7 tools absent from 23-tool catalog BLOCKED ⚠️
C CLI reads data returned ALLOWED ✅
D CLI REST writes (reaction/star/issue/comment) gh CLI unauthenticated, not executed BLOCKED ⚠️
E CLI GraphQL mutations (addReaction/addStar/createIssue) gh CLI unauthenticated, not executed BLOCKED ⚠️

Overall: INCONCLUSIVE

(⚠️ Part B: none of the 7 targeted write tools appear in the gateway-exposed catalog (only 23 read-only tools: get_commit, get_file_contents, get_label, get_latest_release, get_release_by_tag, get_tag, issue_read, list_branches, list_commits, list_issue_fields, list_issue_types, list_issues, list_pull_requests, list_releases, list_repository_collaborators, list_starred_repositories, list_tags, pull_request_read, search_code, search_commits, search_issues, search_pull_requests, search_repositories) — absence proves backend/toolset config, not gateway-level DIFC enforcement, per the test methodology note.
⚠️ Parts D/E: gh auth status reported 'not logged into any GitHub hosts', so REST/GraphQL write attempts could not be executed in this run — reported as a methodology gap, not a pass.)

No writes leaked. No destructive operations attempted.

🔒 mcpg read-only stress (default AWF runtime) by Read-Only Stress: default runtime

@lpcox
lpcox merged commit 09545a0 into main Nov 19, 2026
28 checks passed
@lpcox
lpcox deleted the log/guard-wasm-cache-logging-07c1473ff7f1b7a5 branch November 19, 2026 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants