Merge branch 'main' into fix/web-stop-nexus-ai-1615

This commit is contained in:
Gergő Magyar 2026-05-26 15:43:06 +01:00 • committed by GitHub
commit 66edcd3b37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View file

@ -21,6 +21,9 @@ const cleanupBackoffMs = (attempt: number): number => 100 * (attempt + 1);
const shouldSwallowCleanupError = (err: unknown): boolean => {
const code = (err as NodeJS.ErrnoException | undefined)?.code;
// ENOTEMPTY can race on any platform (macOS node-gyp cache, Linux
// parallel test teardown) — swallow after retries are exhausted.
if (code === 'ENOTEMPTY') return true;
return process.platform === 'win32' && WINDOWS_NATIVE_LOCK_CODES.has(code ?? '');
};

View file

@ -20,6 +20,7 @@ import { spawnSync } from 'child_process';
import fs from 'fs';
import fsp from 'fs/promises';
import path from 'path';
import { cleanupTempDir, cleanupTempDirSync } from '../helpers/test-db.js';
import os from 'os';
import { runHook, parseHookOutput } from '../utils/hook-test-helpers.js';
import { setupCommand } from '../../src/cli/setup.js';
@ -84,8 +85,8 @@ beforeAll(async () => {
afterAll(async () => {
process.env.HOME = originalHome;
process.env.USERPROFILE = originalUserProfile;
if (tempHome) await fsp.rm(tempHome, { recursive: true, force: true });
if (tmpDir) fs.rmSync(tmpDir, { recursive: true, force: true });
if (tempHome) await cleanupTempDir(tempHome);
if (tmpDir) cleanupTempDirSync(tmpDir);
});
describe('antigravity hook adapter e2e', () => {
@ -402,7 +403,7 @@ describe('antigravity hook adapter e2e', () => {
});
afterAll(() => {
fs.rmSync(cleanupRoot, { recursive: true, force: true });
cleanupTempDirSync(cleanupRoot);
});
it('ignores AfterTool when no .gitnexus exists in cwd or any ancestor', () => {