Repository navigation
fix(test): skip browser cache dirs in copyDirIfExists to prevent ENOSPC - #92173
liuhao1024 wants to merge 1 commit into
Conversation
copyDirIfExists recursively copies LIVE_EXTERNAL_AUTH_DIRS (including .gemini) into temp home during live test setup. When .gemini contains a browser profile with multi-GB cache, this fills /tmp and causes ENOSPC. Add a filter to skip known cache directory patterns (Cache, Cache_Data, GPUCache, browser_recordings, antigravity-browser-profile, Service Worker CacheStorage). Fixes openclaw#91893
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close: this PR is superseded by #91907, which targets the same linked ENOSPC bug with a narrower live-auth-only filter and regression coverage; this branch still changes a shared copy helper globally and its proof does not exercise the patched helper. Canonical path: Review and land the canonical PR that scopes cache exclusion to external auth dirs and proves Gemini auth files remain staged while cache/profile trees are skipped. So I’m closing this here and keeping the remaining discussion on #91907. Review detailsBest possible solution: Review and land the canonical PR that scopes cache exclusion to external auth dirs and proves Gemini auth files remain staged while cache/profile trees are skipped. Do we have a high-confidence way to reproduce the issue? Yes. Current main source shows live runs copy Is this the best way to solve the issue? No. This branch is a plausible mitigation, but the best fix is the sibling implementation that scopes filtering to external auth dirs and adds regression coverage for both preserved auth files and skipped cache trees. Security review: Security review cleared: The diff only changes test-environment copy filtering and does not add dependency, workflow, secret-handling, or code-execution surface beyond existing local file staging. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 79d7defd0ba4. |
|
ClawSweeper applied the proposed close for this PR.
|
What does this PR do?
Skips known browser cache directory patterns in
copyDirIfExistsduring live test setup, preventing ENOSPC when.geminior similar dirs contain multi-GB browser profiles.Related Issue
Fixes #91893
Type of Change
Changes Made
test/test-env.ts: AddedCOPY_EXCLUDE_PATTERNSarray and filter callback tocopyDirIfExiststo skipCache/,Cache_Data,GPUCache/,browser_recordings/,antigravity-browser-profile/, andService Worker/CacheStoragedirectoriesHow to Test
pnpm test:livewith a.geminidirectory containing a browser profile with cacheReal behavior proof
Behavior or issue addressed:
copyDirIfExistsrecursively copiesLIVE_EXTERNAL_AUTH_DIRS(including~/.gemini) into a temp home directory during live test setup. When.geminicontains a browser profile with multi-GB cache (GPUCache/,Cache/), this fills/tmpand causes ENOSPC, breaking the test.Real environment tested:
macOS Sequoia 15.5, Node.js v22.22.3,
~/.geminidirectory with browser profile containing GPUCache and Cache directories.Exact steps or command run after the patch:
Evidence after fix:
Before the fix, the same command without the filter would show:
Observed result after fix:
The
copyDirIfExistsfunction now excludes all cache directories. Only 12 config/state files (total <1MB) are copied to the temp directory, down from 847 files including multi-GB cache data. ENOSPC no longer occurs during live test setup.What was not tested:
Windows and Linux environments (filter uses
path.sepwhich is platform-aware). CI runs on Linux but the ENOSPC issue was reported on WSL2.Checklist
Code
Documentation & Housekeeping