From da9cb93e93cfc4f6beb9b7ed77e9f805cf5b6d7e Mon Sep 17 00:00:00 2001 From: 777genius Date: Fri, 17 Apr 2026 23:12:01 +0300 Subject: [PATCH] test(ci): stabilize file watcher first-read timing --- test/main/services/infrastructure/FileWatcher.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/main/services/infrastructure/FileWatcher.test.ts b/test/main/services/infrastructure/FileWatcher.test.ts index ef0dd4c4..bc7984e5 100644 --- a/test/main/services/infrastructure/FileWatcher.test.ts +++ b/test/main/services/infrastructure/FileWatcher.test.ts @@ -765,8 +765,13 @@ describe('FileWatcher', () => { filePath: string ) => Promise; lastProcessedLineCount: Map; + instanceCreatedAt: number; }; + // Make the "new file after startup" case deterministic across filesystems + // whose birthtime precision can differ on CI runners. + watcherAny.instanceCreatedAt = 0; + // First read of a NEW file should detect errors (not baseline-skip) await watcherAny.detectErrorsInSessionFile('test-project', 'session-new', filePath);