Skip to content

fix: move default wazero cache outside mcp-logs artifact path#5698

Merged
lpcox merged 2 commits into
mainfrom
copilot/fix-move-wazero-cache
May 14, 2026
Merged

fix: move default wazero cache outside mcp-logs artifact path#5698
lpcox merged 2 commits into
mainfrom
copilot/fix-move-wazero-cache

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 14, 2026

The wazero compilation cache was defaulting under mcp-logs, and cache files created with restrictive permissions caused artifact zipping to fail (EACCES), which then cascaded into downstream detection failures due to missing agent artifacts. This change relocates the default cache path to avoid inclusion in the mcp-logs artifact glob.

  • Cache path resolution

    • Updated defaultWasmCacheDir(logDir) to place wazero-cache as a sibling of logDir instead of a child directory.
    • Effective default changes from /tmp/gh-aw/mcp-logs/wazero-cache to /tmp/gh-aw/wazero-cache.
  • CLI/help text alignment

    • Updated --wasm-cache-dir help text in both root logging flags and proxy command to reflect the new default semantics.
  • Behavioral test updates

    • Updated cache-default assertions and wording in command tests to match sibling-path behavior.
  • Post-release risk check

    • Reviewed merged PRs since the latest release for new writes under mcp-logs with restrictive permissions; no additional cases were identified.
func defaultWasmCacheDir(logDir string) string {
    if logDir == "" {
        return config.DefaultWasmCacheDirName
    }
    return filepath.Join(filepath.Dir(logDir), config.DefaultWasmCacheDirName)
}

Copilot AI changed the title [WIP] Fix move wazero cache outside mcp-logs to prevent artifact upload EACCES failures fix: move default wazero cache outside mcp-logs artifact path May 14, 2026
@lpcox lpcox marked this pull request as ready for review May 14, 2026 17:48
Copilot AI review requested due to automatic review settings May 14, 2026 17:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Relocates the default wazero compilation cache from inside <log-dir> to a sibling directory, avoiding inclusion in the mcp-logs artifact glob (which was causing EACCES zip failures due to restrictive cache file perms).

Changes:

  • defaultWasmCacheDir now returns filepath.Dir(logDir)/wazero-cache (sibling), with an empty-logDir fallback to the bare name.
  • Updated --wasm-cache-dir help text in both root logging flags and proxy command.
  • Updated tests and comments to reflect sibling-path semantics.
Show a summary per file
File Description
internal/cmd/wasm_cache.go Compute cache dir as sibling of logDir; handle empty logDir.
internal/cmd/proxy.go Help text updated to describe sibling default.
internal/cmd/proxy_test.go Comment/message updated to reflect sibling behavior.
internal/cmd/flags_logging.go Help text updated to describe sibling default.
internal/cmd/flags_logging_test.go Test expectation updated to sibling path; wording adjusted.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 5/5 changed files
  • Comments generated: 0

@lpcox lpcox merged commit 956ca88 into main May 14, 2026
26 checks passed
@lpcox lpcox deleted the copilot/fix-move-wazero-cache branch May 14, 2026 17:50
Copilot finished work on behalf of lpcox May 14, 2026 17:54
Copilot AI requested a review from lpcox May 14, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: move wazero cache outside mcp-logs to prevent artifact upload EACCES failures

3 participants