Skip to content

fix(server): reclaim leftover Antigravity _MEI temp dirs - #8

Draft
macodev00 wants to merge 6 commits into
mainfrom
cursor/antigravity-mei-orphan-sweep-9d0e
Draft

macodev00 wants to merge 6 commits into
mainfrom
cursor/antigravity-mei-orphan-sweep-9d0e

Conversation

@macodev00

Copy link
Copy Markdown
Owner

What Changed

On Windows, Antigravity driver start now does a one-shot sweep of host TEMP/TMP for leftover PyInstaller _MEI* directories created by pre-pingdotgg#12008 health probes.

A directory is deleted only when all of these hold:

  • name starts with _MEI
  • it contains an Antigravity marker (agy_acp_licenses.txt, localharness, or google3/third_party/jetski_prod/localharness)
  • it is older than two days
  • remove does not fail with a lock (EBUSY/EPERM are ignored)

Unmarked _MEI* dirs, young marked dirs, and google3 alone are left alone. The real system temp is never listed in tests; the directory is injected.

Profile-owned runtime temp cleanup from pingdotgg#12008 is unchanged. The health probe still does not spawn.

Why

pingdotgg#12008 stopped the probe from spawning and isolated new session extracts under the profile. Anyone who already had tens of GB of %TEMP%\_MEI* leftovers kept them forever. This reclaim is the remaining work from pingdotgg#12239.

This is a small reliability fix only. No feature work, no docs, no .github/pr-assets/.

UI Changes

Not applicable.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes
Open in Web Open in Cursor 

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Sep 22, 2026
@cursor
cursor Bot force-pushed the cursor/antigravity-mei-orphan-sweep-9d0e branch 2 times, most recently from 65efebc to 52b89d3 Compare September 25, 2026 06:22
@github-actions github-actions Bot added size:XXL and removed size:M labels Sep 25, 2026
t3dotgg and others added 6 commits September 30, 2026 23:40
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nup (pingdotgg#14553)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Pre-pingdotgg#12008 health probes unpacked agy_acp_server.exe into %TEMP%\_MEI*
and were killed before PyInstaller cleaned up. Profile isolation stopped
new leaks but never deleted those leftovers.

On Windows driver start, sweep host TEMP/TMP once: delete only _MEI*
directories that have Antigravity markers, are older than two days, and
are not locked. Unmarked dirs, dirs at or under the two-day cutoff, and
locked dirs are left alone.
A marked extract older than two days was deleted as soon as the sweep
started. On Windows that recursive remove unlinks unlocked data files
before a locked executable returns EBUSY, so a long-running Antigravity
process could lose its unpack.

The sweep now skips a directory when a live process still has it as
_MEIPASS, its cwd, or an open file. On Windows, renaming the directory
aside is the open-handle check, and a failed rename leaves every file
in place.

Verification: from the repo root,
vp test run apps/server/src/provider/acp/AntigravitySessionFiles.test.ts apps/server/src/provider/Drivers/AntigravityDriver.test.ts
Result: Test Files 2 passed (2), Tests 19 passed (19). The new test holds
payload.bin open in a stale marked extract and checks the unopened sibling
and nested files stay byte-for-byte intact while an unreferenced orphan is
removed.

vp run typecheck (apps/server) exited 0.

Checked on Linux x64 with Node 24.13.1. Not run against a Windows %TEMP%
directory or a real agy_acp_server.exe.

Co-authored-by: maco <macodev00@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/antigravity-mei-orphan-sweep-9d0e branch from 027e7b2 to d500a00 Compare October 1, 2026 08:47

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants