Problem
The wazero compilation cache defaults to <log-dir>/wazero-cache (i.e. /tmp/gh-aw/mcp-logs/wazero-cache/). The gh-aw compiler uploads the entire /tmp/gh-aw/mcp-logs/ directory as part of the unified agent artifact. wazero creates cache files with restrictive permissions (0600), which causes actions/upload-artifact to fail with:
Error: EACCES: permission denied, open '/tmp/gh-aw/mcp-logs/wazero-cache/wazero-v1.11.0-amd64-linux/905c94902e...'
Error: An error has occurred during zip creation for the artifact
This cascades: the agent artifact is never uploaded, so the downstream detection job can't find prompt.txt and fails with "No Safe Outputs Generated".
Example failure: github/gh-aw#32169 (Smoke Gemini detection job)
Root Cause
internal/cmd/wasm_cache.go:defaultWasmCacheDir() returns filepath.Join(logDir, config.DefaultWasmCacheDirName)
- With default
logDir=/tmp/gh-aw/mcp-logs, this resolves to /tmp/gh-aw/mcp-logs/wazero-cache/
- gh-aw's
compiler_yaml_main_job.go uploads /tmp/gh-aw/mcp-logs/ as an artifact glob
- wazero's
NewCompilationCacheWithDir() creates files with 0600 permissions
- The upload action runs as the runner user and can't read these files → zip fails → artifact missing
Proposed Fix
Change defaultWasmCacheDir() to place the cache as a sibling of the log directory rather than inside it:
// Before:
func defaultWasmCacheDir(logDir string) string {
return filepath.Join(logDir, config.DefaultWasmCacheDirName)
}
// After:
func defaultWasmCacheDir(logDir string) string {
if logDir == "" {
return config.DefaultWasmCacheDirName
}
return filepath.Join(filepath.Dir(logDir), config.DefaultWasmCacheDirName)
}
This changes the default from /tmp/gh-aw/mcp-logs/wazero-cache to /tmp/gh-aw/wazero-cache, keeping it out of the artifact upload glob while preserving the same parent directory structure.
Files to change
internal/cmd/wasm_cache.go — update defaultWasmCacheDir()
internal/cmd/flags_logging.go — update help text
internal/cmd/flags_logging_test.go — update TestDefaultWasmCacheDir assertion
Problem
The wazero compilation cache defaults to
<log-dir>/wazero-cache(i.e./tmp/gh-aw/mcp-logs/wazero-cache/). The gh-aw compiler uploads the entire/tmp/gh-aw/mcp-logs/directory as part of the unified agent artifact. wazero creates cache files with restrictive permissions (0600), which causesactions/upload-artifactto fail with:This cascades: the
agentartifact is never uploaded, so the downstreamdetectionjob can't findprompt.txtand fails with "No Safe Outputs Generated".Example failure: github/gh-aw#32169 (Smoke Gemini detection job)
Root Cause
internal/cmd/wasm_cache.go:defaultWasmCacheDir()returnsfilepath.Join(logDir, config.DefaultWasmCacheDirName)logDir=/tmp/gh-aw/mcp-logs, this resolves to/tmp/gh-aw/mcp-logs/wazero-cache/compiler_yaml_main_job.gouploads/tmp/gh-aw/mcp-logs/as an artifact globNewCompilationCacheWithDir()creates files with0600permissionsProposed Fix
Change
defaultWasmCacheDir()to place the cache as a sibling of the log directory rather than inside it:This changes the default from
/tmp/gh-aw/mcp-logs/wazero-cacheto/tmp/gh-aw/wazero-cache, keeping it out of the artifact upload glob while preserving the same parent directory structure.Files to change
internal/cmd/wasm_cache.go— updatedefaultWasmCacheDir()internal/cmd/flags_logging.go— update help textinternal/cmd/flags_logging_test.go— updateTestDefaultWasmCacheDirassertion