Neil
ca516a4306
test(git): pin FETCH_HEAD lock order in the admission lifetime test ( #17641 )
...
`serializes FETCH_HEAD callers before they enter admission` assumed that two
same-repo fetches join the FETCH_HEAD lock lane in call order. They do not.
`runWithGitFetchHeadLock` first `await`s `fetchLockPath`, which walks the
filesystem (`realpath`, `stat` per parent directory, `readFile` of `commondir`,
`realpath` again) before it calls `runWithGitOperationLock`, and the lane is
registered only after that walk resolves. For a non-existent `/repo` that is
five libuv threadpool round-trips per caller. Two callers issued back to back
run their chains concurrently, so lane order is threadpool completion order,
not call order.
When the `interactive` fetch won that race it entered the lane ahead of the
`background` fetch. On the first caller's release it reached admission
immediately and, being interactive, took the free network headroom slot instead
of queueing, while the background fetch stayed parked on the lock. `queued`
therefore settled at 0 and never reached the asserted 1. Measured inversion
rate for the bare lock-path walk was 54/500 on an idle machine; the test itself
failed 5/20 locally, always at the same assertion, matching the two CI failures
on unrelated PRs (#17530 , #17630 ) at the same line.
Fix the premise rather than the symptom: stub only the key derivation, keeping
the real FIFO `runWithGitOperationLock` that the test actually exercises, so the
lane is registered synchronously with the call. Key derivation keeps its own
coverage in `src/shared/git-fetch-head-lock.test.ts`. This also stops the fetch
tests in this file from sharing one global `/.git/FETCH_HEAD` lane with each
other and from touching the real filesystem.
Verified deterministic: 40/40, then 30/30 clean runs, plus 25/25 with twelve CPU
hogs and a concurrent `src/main/git/command-runner/` run saturating the box.
2026-08-31 00:09:07 -07:00
..
2026-08-30 18:13:36 -07:00
2026-08-30 21:20:53 -07:00
2026-08-30 01:49:05 -07:00
2026-08-15 18:25:37 -07:00
2026-08-26 23:17:34 -07:00
2026-08-11 12:13:16 -07:00
2026-08-29 20:07:46 -07:00
2026-08-13 22:48:24 -07:00
2026-08-22 22:30:11 -07:00
2026-08-30 23:04:55 -07:00
2026-08-28 16:45:58 -07:00
2026-08-29 20:22:33 -07:00
2026-08-29 14:13:35 -07:00
2026-08-29 23:07:36 -07:00
2026-08-30 17:54:13 -07:00
2026-08-29 20:24:24 -07:00
2026-08-24 22:30:04 -07:00
2026-08-15 18:33:33 -07:00
2026-08-27 10:48:53 -07:00
2026-08-22 21:34:39 -07:00
2026-08-26 23:17:34 -07:00
2026-08-29 19:43:23 -07:00
2026-08-27 10:48:53 -07:00
2026-08-30 20:48:45 -07:00
2026-08-26 23:17:34 -07:00
2026-08-26 15:44:11 -07:00
2026-08-27 10:48:53 -07:00
2026-08-30 21:12:34 -07:00
2026-08-27 10:48:53 -07:00
2026-08-20 09:57:55 -07:00
2026-08-31 00:09:07 -07:00
2026-08-13 22:48:24 -07:00
2026-08-30 14:19:05 -07:00
2026-08-30 14:19:05 -07:00
2026-08-27 10:48:53 -07:00
2026-07-30 19:33:05 -07:00
2026-08-15 18:25:37 -07:00
2026-08-28 15:05:24 -07:00
2026-07-29 17:44:41 -07:00
2026-08-30 23:05:37 -07:00
2026-08-30 18:55:40 -07:00
2026-08-27 16:10:51 -07:00
2026-08-26 23:17:34 -07:00
2026-07-23 18:35:31 -07:00
2026-08-27 17:04:48 -07:00
2026-07-27 16:36:39 -07:00
2026-08-30 23:03:59 -07:00
2026-08-13 22:48:24 -07:00
2026-08-23 15:24:25 -07:00
2026-08-11 18:19:43 -07:00
2026-08-30 14:35:53 -07:00
2026-08-30 04:53:20 -04:00
2026-08-30 14:19:05 -07:00
2026-08-24 23:15:01 -07:00
2026-08-29 14:13:35 -07:00
2026-08-29 22:38:59 -07:00
2026-08-30 16:48:43 -07:00
2026-08-30 18:38:25 -07:00
2026-08-30 18:51:24 -07:00
2026-08-28 16:45:58 -07:00
2026-08-27 16:29:05 -07:00
2026-08-30 02:09:05 -07:00
2026-08-27 16:10:51 -07:00
2026-08-30 20:48:45 -07:00
2026-08-30 18:13:36 -07:00
2026-08-29 14:13:35 -07:00
2026-08-30 23:05:24 -07:00
2026-08-27 00:18:51 -07:00
2026-08-29 14:13:35 -07:00
2026-08-30 14:19:05 -07:00
2026-08-29 20:04:04 -07:00
2026-08-26 23:37:16 -07:00
2026-08-28 16:45:58 -07:00
2026-08-15 00:54:20 -07:00
2026-08-29 19:42:56 -07:00
2026-08-18 00:35:50 -07:00
2026-08-22 21:12:23 -07:00
2026-08-28 16:45:58 -07:00
2026-07-24 19:54:25 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-08-30 03:07:20 -04:00
2026-08-29 01:45:20 -07:00
2026-08-30 01:30:25 -07:00
2026-07-20 01:14:17 -07:00
2026-08-01 19:22:39 -07:00
2026-07-23 18:35:31 -07:00
2026-08-13 22:48:24 -07:00
2026-08-26 22:42:37 -07:00
2026-08-26 22:42:37 -07:00
2026-08-09 22:52:11 -07:00
2026-08-09 22:52:11 -07:00
2026-07-23 06:22:56 -07:00
2026-07-23 06:22:56 -07:00
2026-08-26 16:44:55 -07:00
2026-08-26 16:44:55 -07:00
2026-08-24 19:45:47 -07:00
2026-08-24 19:45:47 -07:00
2026-07-24 19:54:25 -07:00
2026-07-24 19:54:25 -07:00
2026-08-16 12:48:53 -07:00
2026-07-29 21:43:45 -07:00
2026-07-29 21:43:45 -07:00
2026-07-26 00:13:48 -07:00
2026-07-26 00:13:48 -07:00
2026-08-28 16:45:58 -07:00
2026-08-01 13:38:45 -07:00
2026-08-15 18:25:37 -07:00
2026-08-14 19:04:54 -04:00
2026-08-14 19:04:55 -04:00
2026-08-13 22:48:24 -07:00
2026-08-14 19:04:55 -04:00
2026-08-14 19:04:55 -04:00
2026-08-13 16:23:22 -07:00
2026-08-14 19:04:55 -04:00
2026-08-14 19:04:54 -04:00
2026-08-14 19:04:55 -04:00
2026-08-14 19:04:55 -04:00
2026-08-13 16:23:21 -07:00
2026-08-13 16:23:21 -07:00
2026-08-25 02:32:21 -07:00
2026-08-01 13:38:45 -07:00
2026-08-01 13:38:45 -07:00
2026-08-16 23:51:53 -07:00
2026-08-17 20:43:29 -07:00
2026-08-13 22:48:24 -07:00
2026-08-02 17:40:58 -07:00
2026-08-02 17:40:58 -07:00
2026-08-29 20:19:09 -07:00
2026-08-15 18:25:37 -07:00
2026-08-15 18:25:37 -07:00
2026-08-15 18:25:37 -07:00
2026-08-29 01:53:31 -07:00
2026-08-15 18:25:37 -07:00
2026-08-29 01:53:31 -07:00
2026-08-15 00:54:20 -07:00
2026-08-22 21:24:18 -07:00
2026-08-29 01:53:31 -07:00
2026-08-30 12:12:04 -07:00
2026-08-30 18:50:56 -07:00
2026-08-22 16:38:00 -07:00
2026-08-15 18:25:37 -07:00
2026-08-01 13:38:45 -07:00
2026-08-30 18:13:36 -07:00
2026-08-30 18:13:36 -07:00
2026-08-02 20:46:49 -07:00
2026-08-13 22:48:24 -07:00
2026-08-02 20:46:49 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-08-02 20:46:49 -07:00
2026-08-13 22:48:24 -07:00
2026-07-18 23:01:29 -07:00
2026-07-23 18:35:31 -07:00
2026-07-23 18:35:31 -07:00
2026-08-30 12:11:21 -07:00
2026-08-19 17:12:17 -07:00
2026-08-30 12:12:04 -07:00
2026-08-30 12:12:04 -07:00
2026-08-29 16:06:15 -07:00
2026-08-29 16:06:15 -07:00
2026-07-15 15:23:35 -07:00
2026-08-13 22:48:24 -07:00
2026-08-29 16:06:15 -07:00
2026-07-31 00:51:39 -07:00
2026-07-31 00:51:39 -07:00
2026-08-27 13:44:03 -07:00
2026-08-27 13:44:03 -07:00
2026-08-27 13:44:03 -07:00
2026-07-31 00:51:39 -07:00
2026-07-31 00:51:39 -07:00
2026-07-28 15:34:52 -07:00
2026-07-28 15:34:52 -07:00
2026-08-22 21:47:46 -07:00
2026-08-27 20:10:17 -07:00
2026-08-15 00:54:20 -07:00
2026-08-28 00:42:07 -04:00
2026-08-17 15:25:25 -07:00
2026-08-22 21:47:46 -07:00
2026-08-13 22:48:24 -07:00
2026-08-15 00:54:20 -07:00
2026-08-15 00:54:20 -07:00
2026-08-15 00:54:20 -07:00
2026-08-21 17:11:17 -07:00
2026-08-17 15:57:07 -07:00
2026-08-29 16:06:15 -07:00
2026-08-15 00:54:20 -07:00
2026-08-17 15:25:25 -07:00
2026-08-29 16:01:20 -07:00
2026-08-24 20:45:53 -07:00
2026-08-17 23:28:38 -07:00
2026-08-29 19:41:01 -07:00
2026-08-22 22:30:11 -07:00
2026-08-22 22:30:11 -07:00
2026-08-22 22:30:11 -07:00
2026-08-15 00:54:20 -07:00
2026-08-29 16:06:15 -07:00
2026-07-27 01:14:33 -07:00
2026-08-15 00:54:20 -07:00
2026-08-15 00:54:20 -07:00
2026-08-29 16:06:15 -07:00
2026-08-22 22:30:11 -07:00
2026-08-15 00:54:20 -07:00
2026-08-15 00:54:20 -07:00
2026-08-28 04:08:15 -07:00
2026-08-26 09:50:12 -07:00
2026-08-15 00:54:20 -07:00
2026-08-15 00:54:20 -07:00
2026-08-15 00:54:20 -07:00
2026-08-24 20:45:53 -07:00
2026-08-22 22:30:11 -07:00
2026-08-29 16:06:15 -07:00
2026-08-26 09:50:12 -07:00
2026-08-26 09:50:12 -07:00
2026-08-24 20:45:53 -07:00
2026-08-15 00:54:20 -07:00
2026-08-15 00:54:20 -07:00
2026-08-15 00:54:20 -07:00
2026-08-15 00:54:20 -07:00
2026-08-15 00:54:20 -07:00
2026-08-17 15:25:25 -07:00
2026-08-22 21:47:46 -07:00
2026-08-15 21:41:01 -07:00
2026-08-15 21:41:01 -07:00
2026-07-31 11:58:46 -07:00
2026-08-13 17:02:28 -07:00
2026-08-13 17:02:28 -07:00
2026-08-30 12:11:21 -07:00
2026-08-30 12:11:21 -07:00
2026-08-22 22:30:11 -07:00
2026-08-22 16:38:00 -07:00
2026-08-14 19:04:55 -04:00
2026-08-27 15:08:40 -07:00
2026-08-28 16:45:58 -07:00
2026-08-21 23:58:48 -07:00
2026-08-28 16:45:58 -07:00
2026-08-28 16:45:58 -07:00
2026-08-21 21:05:24 -07:00
2026-08-21 21:05:24 -07:00
2026-08-26 12:48:52 -07:00
2026-08-26 16:49:31 -07:00
2026-07-23 18:03:43 -07:00
2026-08-26 15:09:22 -07:00
2026-08-01 19:22:39 -07:00
2026-08-04 01:37:25 -07:00
2026-08-22 21:34:39 -07:00
2026-08-22 21:34:39 -07:00
2026-08-16 23:51:53 -07:00
2026-08-16 23:51:53 -07:00
2026-08-17 20:43:06 -07:00
2026-08-17 20:43:06 -07:00
2026-08-17 20:43:06 -07:00
2026-08-17 20:43:06 -07:00
2026-08-17 15:25:25 -07:00
2026-08-17 15:25:25 -07:00
2026-08-16 22:05:46 -07:00
2026-08-16 22:05:46 -07:00
2026-08-16 22:05:46 -07:00
2026-08-16 22:05:46 -07:00
2026-08-29 19:42:56 -07:00
2026-08-29 19:42:56 -07:00
2026-07-20 14:34:53 -07:00
2026-07-23 18:35:31 -07:00
2026-07-23 18:35:31 -07:00
2026-08-15 18:25:37 -07:00
2026-08-15 18:25:37 -07:00
2026-08-12 14:31:42 -07:00
2026-08-12 14:31:42 -07:00
2026-08-12 20:55:29 -07:00
2026-08-30 18:13:36 -07:00
2026-08-30 18:13:36 -07:00
2026-08-12 14:31:42 -07:00
2026-08-12 14:31:42 -07:00
2026-08-18 03:12:47 -07:00
2026-08-12 20:55:29 -07:00
2026-08-12 20:55:29 -07:00
2026-08-30 18:13:36 -07:00
2026-08-18 15:59:17 -07:00
2026-08-18 15:59:17 -07:00
2026-08-18 03:12:47 -07:00
2026-08-30 18:13:36 -07:00
2026-08-13 23:47:20 -07:00
2026-08-27 19:45:49 -07:00
2026-08-13 22:48:24 -07:00
2026-08-30 18:50:56 -07:00
2026-08-30 18:50:56 -07:00
2026-08-21 21:05:24 -07:00
2026-08-21 21:05:24 -07:00
2026-08-05 01:13:13 -07:00
2026-08-05 01:13:13 -07:00
2026-08-05 01:13:13 -07:00
2026-08-05 01:13:13 -07:00
2026-08-22 21:12:23 -07:00
2026-08-16 23:51:53 -07:00
2026-08-16 23:51:53 -07:00
2026-08-16 23:51:53 -07:00
2026-08-16 23:51:53 -07:00
2026-08-22 21:12:23 -07:00
2026-08-22 21:12:23 -07:00
2026-08-22 21:12:23 -07:00
2026-08-18 03:12:47 -07:00
2026-08-13 22:48:24 -07:00
2026-08-22 21:12:23 -07:00
2026-07-23 18:35:31 -07:00
2026-08-13 22:48:24 -07:00
2026-08-02 20:46:49 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-07-17 15:27:39 -07:00
2026-07-17 15:27:39 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-08-30 12:10:11 -07:00
2026-07-23 18:35:31 -07:00
2026-08-30 14:42:07 -07:00
2026-07-28 19:58:58 -07:00
2026-08-30 12:10:11 -07:00
2026-08-30 14:42:07 -07:00
2026-08-19 17:34:27 -07:00
2026-08-19 17:34:27 -07:00
2026-08-30 20:48:45 -07:00
2026-08-19 17:34:27 -07:00
2026-08-30 12:10:11 -07:00
2026-08-15 00:54:20 -07:00
2026-08-15 00:54:20 -07:00
2026-08-13 22:48:24 -07:00
2026-07-22 18:52:37 -07:00
2026-08-04 02:02:53 -07:00
2026-08-23 13:55:20 -07:00
2026-08-15 00:54:20 -07:00
2026-08-15 00:54:20 -07:00
2026-08-15 00:54:20 -07:00
2026-08-24 19:45:47 -07:00
2026-08-29 01:49:02 -07:00
2026-08-24 19:45:47 -07:00
2026-07-29 18:21:26 -07:00
2026-08-15 00:38:13 -07:00
2026-08-15 00:38:13 -07:00
2026-08-24 18:12:42 -07:00
2026-08-24 18:12:42 -07:00
2026-08-10 19:55:29 -07:00
2026-07-24 00:27:40 -07:00
2026-07-24 00:27:40 -07:00
2026-08-28 16:45:58 -07:00
2026-07-25 22:28:07 -07:00
2026-08-13 23:47:20 -07:00
2026-08-13 23:47:20 -07:00
2026-08-13 23:47:20 -07:00
2026-08-13 23:47:20 -07:00
2026-08-13 23:47:20 -07:00
2026-08-13 23:47:20 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 23:47:20 -07:00
2026-08-13 23:47:20 -07:00
2026-08-13 23:47:20 -07:00
2026-08-30 23:05:32 -07:00
2026-08-24 22:44:08 -07:00
2026-08-24 22:44:08 -07:00
2026-08-30 23:05:32 -07:00
2026-08-30 23:05:32 -07:00
2026-08-24 22:44:08 -07:00
2026-08-24 22:44:08 -07:00
2026-08-24 22:44:08 -07:00
2026-08-30 12:12:04 -07:00
2026-08-14 22:18:36 -07:00
2026-08-14 22:18:36 -07:00
2026-08-30 12:12:04 -07:00
2026-08-30 12:12:04 -07:00
2026-08-13 22:48:24 -07:00
2026-08-18 03:12:47 -07:00
2026-08-27 15:08:40 -07:00
2026-08-29 16:06:15 -07:00
2026-08-29 16:06:15 -07:00
2026-08-27 15:08:40 -07:00
2026-08-17 15:57:07 -07:00
2026-08-20 01:45:17 -07:00
2026-08-30 12:11:21 -07:00
2026-07-23 18:35:31 -07:00
2026-08-13 22:48:24 -07:00
2026-08-17 15:57:07 -07:00
2026-08-17 15:57:07 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-08-29 16:06:15 -07:00
2026-08-20 01:45:17 -07:00
2026-08-20 01:45:17 -07:00
2026-08-20 01:45:17 -07:00
2026-08-20 01:45:17 -07:00
2026-08-20 01:45:17 -07:00
2026-08-20 01:45:17 -07:00
2026-08-17 12:23:50 -07:00
2026-08-17 12:23:50 -07:00
2026-08-13 22:48:24 -07:00
2026-08-30 12:11:21 -07:00
2026-08-29 01:53:31 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-08-07 20:35:22 -07:00
2026-08-07 21:59:24 -07:00
2026-08-22 05:45:21 -07:00
2026-08-07 20:35:22 -07:00
2026-07-30 17:49:32 -07:00
2026-07-30 17:49:32 -07:00
2026-07-30 17:49:32 -07:00
2026-07-14 15:23:06 -07:00
2026-08-22 20:35:59 -07:00
2026-08-22 20:35:59 -07:00
2026-08-30 01:49:05 -07:00
2026-08-30 01:49:05 -07:00
2026-08-30 01:49:05 -07:00
2026-08-07 20:35:22 -07:00
2026-08-07 20:35:22 -07:00
2026-08-07 20:35:22 -07:00
2026-08-07 20:35:22 -07:00
2026-08-18 02:12:21 -07:00
2026-08-30 01:49:05 -07:00
2026-08-19 22:37:42 -07:00
2026-08-19 22:37:42 -07:00
2026-08-19 22:37:42 -07:00
2026-08-30 18:13:36 -07:00
2026-08-18 03:12:47 -07:00
2026-08-19 22:37:42 -07:00
2026-08-19 22:37:42 -07:00