From 31aaf615425b3a9fc5d5d3e346c470e4a3d3c014 Mon Sep 17 00:00:00 2001 From: ualtinok <94532+ualtinok@users.noreply.github.com> Date: Mon, 23 Nov 2026 18:54:30 +0100 Subject: [PATCH] Test: settings fence tests never ask the OS about their fake pids The fixture's clock is fixed in January 2026, but the reused-pid check fell back to the real process table. On a machine where pid 200 is a real process (it started after the fixture's timestamps), five tests saw a live fake writer as a reused pid and the fence opened. Inject the start-time lookup like layout-fence.test.ts does. --- packages/core/src/tests/settings-move-fence.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/core/src/tests/settings-move-fence.test.ts b/packages/core/src/tests/settings-move-fence.test.ts index 5864648f..ca4fb4aa 100644 --- a/packages/core/src/tests/settings-move-fence.test.ts +++ b/packages/core/src/tests/settings-move-fence.test.ts @@ -40,6 +40,11 @@ const liveness: HolderLiveness = { pid === self.pid ? self.incarnation : 'peer-start', now: () => NOW, uptime: () => 3_600, + // The fake pids (200 and others) may be real processes on the test machine. + // Without this, the reused-pid check asks the OS when such a pid started, and + // a real process started after the fixture's timestamps would make a live + // fake writer look like a reused pid. + processStartedAtMs: async () => null, } function holder(overrides: Partial = {}): HolderEntry {