Repository navigation
fix(test): exclude browser cache dirs from copyDirIfExists in live test staging - #91908
xzh-icenter wants to merge 1 commit into
Conversation
…st staging used with no filter, blindly copying multi-GB browser cache/profile/recording directories (e.g. from .antigravity-browser-profile) into temp test homes, causing ENOSPC. Add a segment-based exclusion set that skips Cache, Cache_Data, GPUCache, browser_recordings, antigravity-browser-profile, and CacheStorage directories while preserving auth files like .gemini/auth.json. Fixes openclaw#91893
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: this PR targets a valid live-test ENOSPC bug, but an open sibling PR covers the same linked issue with a narrower external-auth-only filter and stronger proof, so keeping both landing candidates open is not useful. Canonical path: Use the scoped external-auth-only filter from #91907, or an equivalent narrow implementation, as the canonical landing path for the linked live-test ENOSPC fix. So I’m closing this here and keeping the remaining discussion on #91907. Review detailsBest possible solution: Use the scoped external-auth-only filter from #91907, or an equivalent narrow implementation, as the canonical landing path for the linked live-test ENOSPC fix. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: current main stages live tests by copying .gemini through an unfiltered recursive fs.cpSync path. I did not run the large-cache ENOSPC scenario because this review is read-only and should not create or copy multi-GB artifacts. Is this the best way to solve the issue? No for this branch as the landing candidate: it fixes the symptom but puts the exclusion in the shared copy helper, which is broader than the reported .gemini live-auth staging problem. The narrower sibling PR is the better solution because it scopes the filter to external auth staging and proves Gemini auth/settings files still copy. Security review: Security review cleared: The diff only changes test staging code and its regression test; it adds no dependency, workflow, package, credential-source, or supply-chain surface, and does not broaden secret access. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 1ec04c6baa99. |
|
ClawSweeper applied the proposed close for this PR.
|
Problem
test/test-env.tscopyDirIfExistsusesfs.cpSyncwith{ recursive: true, force: true }but nofilteroption. When.geminicontains a browser profile (e.g. from the Antigravity browser), the entire multi-GB cache is copied blindly into the temp test home, causing ENOSPC.Fixes #91893
Changes
COPY_EXCLUDE_SEGMENTSset with known cache/recording directory names:Cache,Cache_Data,GPUCache,browser_recordings,antigravity-browser-profile,CacheStoragefiltercallback tofs.cpSyncincopyDirIfExiststhat skips any path containing these segments.gemini/auth.jsoncontinue to be copied normallyReal behavior proof
Behavior or issue addressed:
copyDirIfExistscopies multi-GB browser cache directories during live test staging, causing ENOSPCReal environment tested: Linux (Debian 12 bookworm, WSL2), Node v24.16.0, commit
abf75e1fExact steps or command run after this patch:
cd /root/.openclaw/workspace/openclaw-repo node scripts/run-vitest.mjs run test/test-env.test.tsEvidence after fix:
Observed result after fix: All 5 tests pass, including the new regression test that verifies
antigravity-browser-profile,browser_recordings, andCacheStoragedirectories are excluded from copying while.gemini/auth.jsonis still copied.What was not tested: Live ENOSPC reproduction with actual multi-GB cache directories (would require creating large temp artifacts). The fix is validated through source inspection and unit tests with small fixtures.