mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-03 13:52:09 +03:00
Two unit tests flaked under CI parallelism (reproduced locally under CPU contention, both RED → GREEN after the fix): - db-backup-extended "creates manual backups": waited only for the backup FILE to exist, but backupDbFile() fires db.backup() fire-and-forget and better-sqlite3 creates the destination at copy START → listDbBackups() read a partial backup as connectionCount 0 != 12. Now waits for the real completion condition (backup contains the seeded rows); 30s ceiling only bounds the failure case, green path returns sub-second. - chatcore-translation-paths "streaming without buffering": raced the invocation against a fixed 1000ms budget; a starved event loop made the legitimate (non-buffering) early return exceed 1s -> false "blocked". Widened the ceiling to 10s (matches the file's existing waitFor pattern); the buffering-regression detection is unchanged. Repro: concurrent copies under CPU burners -> both RED; after fix both GREEN at realistic (8+8 copies) and extreme (12+12 copies + 14 burners) contention. Test-only change; no production code touched. (The pre-commit prettier --write also normalized one pre-existing non-conforming region in chatcore-translation-paths.test.ts.)