Skip to content

fix(test): use retry cleanup in antigravity e2e to prevent ENOTEMPTY flake#1838

Merged
magyargergo merged 2 commits into
mainfrom
fix/antigravity-test-cleanup
May 26, 2026
Merged

fix(test): use retry cleanup in antigravity e2e to prevent ENOTEMPTY flake#1838
magyargergo merged 2 commits into
mainfrom
fix/antigravity-test-cleanup

Conversation

@magyargergo

Copy link
Copy Markdown
Collaborator

Replace bare fsp.rm / fs.rmSync in antigravity-hook-e2e.test.ts afterAll with the existing cleanupTempDir / cleanupTempDirSync helpers from test/helpers/test-db.ts which retry with exponential backoff on transient filesystem errors.

Also extend shouldSwallowCleanupError to swallow ENOTEMPTY on all platforms (was Windows-only). The CI failure on macOS was ENOTEMPTY on a deeply nested node-gyp cache directory inside the temp HOME — a cleanup-time race that retries usually resolve, but the final attempt must not crash the test suite if the race persists.

Changes

  • antigravity-hook-e2e.test.ts: import and use cleanupTempDir/cleanupTempDirSync instead of bare fsp.rm/fs.rmSync
  • test/helpers/test-db.ts: swallow ENOTEMPTY on all platforms after retry exhaustion

Test plan

  • Existing antigravity e2e tests still pass locally
  • The ENOTEMPTY error from CI run would be retried then swallowed

…flake

Replace bare `fsp.rm` / `fs.rmSync` in antigravity-hook-e2e.test.ts
afterAll with `cleanupTempDir` / `cleanupTempDirSync` from test-db.ts
which retry with backoff on transient filesystem errors.

Also make `shouldSwallowCleanupError` swallow ENOTEMPTY on all
platforms (was Windows-only). The CI failure on macOS was ENOTEMPTY
on a deeply nested node-gyp cache directory inside the temp HOME —
a cleanup-time race that retries usually resolve, but the final
attempt must not crash the test suite if the race persists.
@vercel

vercel Bot commented May 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
gitnexus Ready Ready Preview, Comment May 26, 2026 2:13pm

Request Review

@github-actions

github-actions Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

CI Report

All checks passed

Pipeline Status

Stage Status Details
✅ Typecheck success tsc --noEmit
✅ Tests success unit tests, 3 platforms
✅ E2E success gitnexus-web changes only

Test Results

Tests Passed Failed Skipped Duration
9886 9883 0 3 614s

✅ All 9883 tests passed

3 test(s) skipped — expand for details
  • PHP pipeline benchmark > scales with file count (workers enabled)
  • Rust pipeline benchmark > scales with file count (workers enabled)
  • buildTypeEnv > known limitations (documented skip tests) > Ruby block parameter: users.each { |user| } — closure param inference, different feature

Code Coverage

Tests

Metric Coverage Covered Base Delta Status
Statements 79.87% 34057/42639 N/A% 🟢 ███████████████░░░░░
Branches 68.46% 21781/31814 N/A% 🟢 █████████████░░░░░░░
Functions 84.81% 3524/4155 N/A% 🟢 ████████████████░░░░
Lines 83.34% 30676/36805 N/A% 🟢 ████████████████░░░░

📋 View full run · Generated by CI

@magyargergo magyargergo merged commit d5b2edd into main May 26, 2026
27 checks passed
@magyargergo magyargergo deleted the fix/antigravity-test-cleanup branch May 26, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant