Boot-smoke's post-verdict temp-dir cleanup could throw ENOTEMPTY on macOS when async writers (fsevents/Spotlight, the just-killed child) still touched the throwaway HOME/project dirs, turning an already-decided PASS into a pnpm verify:fast failure. - Add removeTempDir() helper in scripts/boot-smoke.mjs: wraps rmSync with maxRetries/retryDelay and swallows any residual error (never throws) since cleanup always runs after the smoke verdict is decided/printed - Replace both isolatedHome/isolatedProject rmSync call sites (exit handler and EADDRINUSE retry-port branch) with removeTempDir() - Guard main() behind an import.meta.url === pathToFileURL(process.argv[1]) check so requiring boot-smoke.mjs from tests doesn't spawn a real server - Add scripts/__tests__/boot-smoke.test.mjs covering ENOTEMPTY tolerance, always-failing rm, retry/backoff params, and the no-boot-on-import guard Files changed: scripts/__tests__/boot-smoke.test.mjs | 77 +++++++++++++++++++++++++++++++++++ scripts/boot-smoke.mjs | 44 +++++++++++++++++--- 2 files changed, 115 insertions(+), 6 deletions(-) Fusion-Task-Id: FN-7662 Fusion-Task-Lineage: 3288d055-4f70-4487-8462-933563214ce5 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
11 KiB
11 KiB