DashboardcraftCraft CI: Node 22/24 CLI smoke test fla…

Craft CI: Node 22/24 CLI smoke test flakes with spawn ETXTBSY

Category: gotcha
Confidence: 0.80
ID: 019f844d-f59f-7aeb-9b6b-6cadcf358839
Project ID: e16af391-c497-4837-b681-c849a5514499
Cross-project: No
Recalled in other projects: 0
Source session: 0goKXKlJTHOVwC4wG
Created: 2026-07-21 10:52:09
Updated: 2026-07-21 10:52:09

Content

Trap: src/__tests__/index.test.ts's CLI smoke test ('CLI starts and shows help without runtime errors') can fail in CI with Error: spawn ETXTBSY (errno -26) on Node 22/24 jobs — looks like a real regression from the PR's changes. Root cause: a race between the CLI binary being built and executed (text-file-busy), unrelated to application code. Fix: verify the test exists unmodified on master (confirms pre-existing flake) and re-run the job rather than debugging the diff. Seen in PR #846 alongside a genuine, unrelated prettier formatting failure — don't assume all failing CI jobs share one root cause.

Move to: