From 1dbc4f237f04d46ec5bf1701f65fbc3d5e4ddb64 Mon Sep 17 00:00:00 2001 From: NekoPunch Date: Sun, 6 Sep 2026 16:50:22 -0700 Subject: [PATCH] test(desktop): force the dist suite runner to exit once its tests finish The desktop dist suite hung its CI job on run 34061414876 with every reported test passing: the vite-workspace-packages test file completed both subtests, but its node:test child process stayed alive for 811s until the workspace runner hit the 900s ceiling and killed the run. The lingering handle is a chokidar fs.watch on the temporary repository root, orphaned by a TOCTOU race between chokidar close() and the in-flight scan of the dev-server restart that the first test triggers (#4940 has the full fs-level attribution). The second test dodged this class in #4748 by dropping its watcher; the first test needs its watcher to assert restart-on-manifest-change, so it cannot. --test-force-exit makes the runner exit once every test has finished, so completed tests still report their real results while post-test lingering handles can no longer hold the workspace run hostage. Fixes #4940 Generated-by: GLM-5.3-Flash (pi) --- apps/desktop/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 6d8cb8e6f8..4ab6340f51 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -43,7 +43,7 @@ "package:linux-deb-arm64": "electron-builder --config electron-builder.config.mjs --linux deb --arm64 --publish never", "typecheck": "tsc -p tsconfig.preload.json --noEmit && tsc -p tsconfig.main.json --noEmit && tsc -p tsconfig.renderer.json --noEmit && tsc -p tsconfig.storybook.json --noEmit", "typecheck:stories": "tsc -p tsconfig.storybook.json --noEmit", - "test:dist": "node --test \"dist/main/**/*.test.js\" scripts/dev-app-runtime.test.mjs scripts/vite-workspace-packages.test.mjs", + "test:dist": "node --test --test-force-exit \"dist/main/**/*.test.js\" scripts/dev-app-runtime.test.mjs scripts/vite-workspace-packages.test.mjs", "e2e": "npm run build:with-deps && playwright test --config e2e/playwright.config.ts", "build:with-deps": "npm run build:workspace-deps && npm run build", "smoke:real-window": "npm run build:with-deps && node ../../scripts/desktop-real-window-smoke.mjs",