Repository navigation
fix(test): exclude browser cache and profile directories from live auth staging (fixes #91893) - #92570
fix(test): exclude browser cache and profile directories from live auth staging (fixes #91893)#92570zenglingbiao wants to merge 1 commit into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 12, 2026, 10:59 PM ET / 02:59 UTC. Summary PR surface: Tests +62. Total +62 across 2 files. Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path. Review metrics: none identified. Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Review detailsBest possible solution: Retry the Codex review after fixing the execution failure. Do we have a high-confidence way to reproduce the issue? Unclear. The review failed before ClawSweeper could establish a reproduction path. Is this the best way to solve the issue? Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against ded3a9305876. Label changesLabel justifications:
Evidence reviewedPR surface: Tests +62. Total +62 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
test/test-env.tscopyDirIfExistsuses unfilteredfs.cpSyncto copyLIVE_EXTERNAL_AUTH_DIRS(which includes.gemini) into a temp home during live test setup. On machines where.geminicontains browser profile data (e.g. Antigravity browser), this copies multi-GB caches and fills/tmpwithENOSPC.copyDirIfExistscallsfs.cpSyncwith{ recursive: true, force: true }but nofilteroption. When.geminicontains browser caches (antigravity-browser-profile,browser_recordings,Service Workerdirectories), the entire multi-GB tree is copied blindly.filtertocopyDirIfExiststhat skips known browser cache and profile directories. Auth files (.gemini/auth.json) and other legitimate config are still copied.test/test-env.ts— newCOPY_EXCLUDE_PATTERNSconstant andfilteroption onfs.cpSynctest/test-env.test.ts— new test case verifying cache directories are excluded from live auth stagingLIVE_EXTERNAL_AUTH_DIRSlist is unchanged —.geminiis still staged.geminicontent (auth tokens, config) is still copied as beforecopyDirIfExists(credentials, external-plugins) are unaffectedReproduction
.gemini/antigravity-browser-profile/Default/Cache/with several GB of dataOPENCLAW_LIVE_TEST=1and run live tests that callstageLiveTestStatefs.cpSyncrecursively copies the entire.geminitree including multi-GB browser cache →ENOSPCon/tmpReal behavior proof
Behavior or issue addressed (91893):
copyDirIfExistsin live test staging copies multi-GB browser cache and profile directories from.gemini, causing ENOSPC on/tmp.Real environment tested: Linux, Node 22 — temp-directory fixture exercising the
stageLiveTestStatecode path throughinstallTestEnv.Exact steps or command run after this patch:
node scripts/run-vitest.mjs test/test-env.test.tsEvidence after fix:
Observed result after fix: The new
excludes browser cache and profile directories from live auth stagingcase confirms thatantigravity-browser-profile,browser_recordings, andService Workerdirectories are fully excluded from the staged temp home, while legitimate auth files (.gemini/auth.json) are still correctly copied. The 4 pre-existing installTestEnv cases continue to exercise config/auth staging without regression.What was not tested: Live ENOSPC reproduction was not driven — that requires a macOS machine with multi-GB
.geminibrowser cache. The source-code path throughfs.cpSyncwith the new filter is verified via the temp-directory test fixture.Repro confirmation: The new test case creates a temp home containing
.geminiwith both auth files and simulated browser cache directories, then verifies the cache directories are absent from the staged output. Before this patch, the same fixture would copy all directories without filtering.Risk / Mitigation
Mitigation: Patterns target names that are specific to browser internals (
antigravity-browser-profile,Service Worker/CacheStorage,GPUCache,Cache_Data). These are extremely unlikely to appear in auth/config paths. The filter only applies to the live test staging path, not production runtime.Mitigation: The patterns are easy to extend. The filter is non-destructive — at worst, a new cache directory would not be excluded until the pattern list is updated.
Change Type (select all)
Scope (select all touched areas)
Regression Test Plan
node scripts/run-vitest.mjs test/test-env.test.tsReview Findings Addressed
N/A (initial submission)
Linked Issue/PR
Fixes #91893