fix(antigravity): stop health checks from filling the disk with _MEI folders #12008
Mergedt3dotgg(GitHub profile, opens in a new tab)merged 5 commits into
main fromrefs/pull/12008/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- apps/server/src/provider/Drivers/AntigravityDriver.ts lines 317 to 322Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -275,4 +303,17 @@275- }),276- )277- .pipe(Effect.provideService(Scope.Scope, processScope));278- }).pipe(Effect.scoped);303+ if (authConfigIssue !== null) {304+ return yield* new ProviderSetupError({305+ instanceId,306+ operation: "configure",307+ detail: authConfigIssue,308+ });309+ }310+ const executable = yield* installation311+ .resolve(settings.binaryPath, processEnvironment)312+ .pipe(313+ Effect.mapError(314+ (cause) =>315+ new ProviderSetupError({316+ instanceId,317+ operation: "resolve",318+ detail: cause.detail,319+ }),
- apps/server/src/provider/Drivers/AntigravityDriver.ts line 182Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -155,3 +164,17 @@155164 Effect.provideService(Path.Path, path),156165 Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner),157166 );167+ // Each process unpacks into its own directory that dies with the168+ // runtime scope, after the child is killed. A shared directory would169+ // let one session's teardown delete files a sibling still reads.170+ // Removal is best effort: a handle can outlive the kill on Windows,171+ // and the sweep on the next driver start reclaims what is left.172+ const runtimeTempDirectory = yield* Effect.acquireRelease(173+ fileSystem.makeTempDirectory({ directory: profile.tempDirectory, prefix: "run-" }).pipe(174+ Effect.mapError(175+ () =>176+ new ProviderSetupError({177+ instanceId,178+ operation: "start",179+ detail: "Could not create an Antigravity runtime temp directory.",180+ }),
- apps/server/src/provider/Drivers/AntigravityDriver.ts line 182Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -155,3 +164,17 @@155164 Effect.provideService(Path.Path, path),156165 Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner),157166 );167+ // Each process unpacks into its own directory that dies with the168+ // runtime scope, after the child is killed. A shared directory would169+ // let one session's teardown delete files a sibling still reads.170+ // Removal is best effort: a handle can outlive the kill on Windows,171+ // and the sweep on the next driver start reclaims what is left.172+ const runtimeTempDirectory = yield* Effect.acquireRelease(173+ fileSystem.makeTempDirectory({ directory: profile.tempDirectory, prefix: "run-" }).pipe(174+ Effect.mapError(175+ () =>176+ new ProviderSetupError({177+ instanceId,178+ operation: "start",179+ detail: "Could not create an Antigravity runtime temp directory.",180+ }),
- apps/server/src/provider/Drivers/AntigravityDriver.ts line 182Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -155,3 +164,17 @@155164 Effect.provideService(Path.Path, path),156165 Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner),157166 );167+ // Each process unpacks into its own directory that dies with the168+ // runtime scope, after the child is killed. A shared directory would169+ // let one session's teardown delete files a sibling still reads.170+ // Removal is best effort: a handle can outlive the kill on Windows,171+ // and the sweep on the next driver start reclaims what is left.172+ const runtimeTempDirectory = yield* Effect.acquireRelease(173+ fileSystem.makeTempDirectory({ directory: profile.tempDirectory, prefix: "run-" }).pipe(174+ Effect.mapError(175+ () =>176+ new ProviderSetupError({177+ instanceId,178+ operation: "start",179+ detail: "Could not create an Antigravity runtime temp directory.",180+ }),
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
t3dotgg(GitHub profile, opens in a new tab) closed this
- @@ -98,3 +102,8 @@98102 serverConfig.stateDir,99103 instanceId,100104 );105+ // No process of this instance exists yet, so every runtime temp106+ // directory left under the profile is an orphan from a killed server.107+ yield* removeAntigravityRuntimeTempDirs(108+ resolveAntigravityRuntimeTempDirectory(profileDirectory),109+ ).pipe(Effect.provideService(FileSystem.FileSystem, fileSystem));
Sign in to join this conversation.
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Baseline:
935c55b· PR result:f99122d· Source CI: successScenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.