fix(antigravity): avoid spawning process on probe and isolate temp di… #11657
ClosedVitaCodez(GitHub profile, opens in a new tab)wants to merge 7 commits into
main fromrefs/pull/11657/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- @@ -301,5 +308,4 @@301308 browserCommand.includes(platform === "win32" ? ";" : ":") ||302309 helperExecutable.includes("\r") ||303310 helperExecutable.includes("\n") ||304- helperExecutable.includes("\0") ||305- helperExecutable.includes("%s")311+ helperExecutable.includes("\0")@@ -98,3 +101,4 @@98101 serverConfig.stateDir,99102 instanceId,100103 );104+ yield* cleanOrphanedAntigravityTempDirs(profileDirectory).pipe(
- apps/server/src/provider/antigravityAuthSupport.ts line 217OutdatedResolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -214,3 +214,4 @@214214 : auth.authMethod === "agent-platform" && auth.apiKey215215 ? { GOOGLE_API_KEY: auth.apiKey }216216 : {};217+ const tempDirectory = NodePath.join(profile.acpDirectory, "tmp");
- @@ -43,0 +63,21 @@63+64+ // 1. Clean profile-isolated tmp directory if provided65+ if (profileDirectory) {66+ const acpTmp = path.join(profileDirectory, "antigravity-acp", "tmp");67+ if (yield* fs.exists(acpTmp)) {68+ const entries = yield* fs.readDirectory(acpTmp).pipe(Effect.orElseSucceed(() => []));69+ for (const entry of entries) {70+ if (entry.startsWith("_MEI")) {71+ yield* fs72+ .remove(path.join(acpTmp, entry), { recursive: true, force: true })73+ .pipe(Effect.ignore);74+ }75+ }76+ }77+ }78+79+ // 2. Clean orphaned _MEI folders in system temp directory left by previous Antigravity probes on Windows80+ // On Unix, concurrent processes can have their files deleted without file locking protection,81+ // so system temp sweeping is restricted to Windows where active files are lock-protected.82+ if (process.platform === "win32") {83+ const systemTemp = process.env.TEMP || process.env.TMP;
juliusmarminge closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed