From 625b766a4ad0161b21567562dc3bac17c4a8c777 Mon Sep 17 00:00:00 2001 From: ework-agent Date: Mon, 12 Oct 2026 18:04:18 +0800 Subject: [PATCH 1/2] fix(tests): extend tmp-rm EBUSY retry budget for c=4 Windows teardown load (#2908) #2816's c=4 concurrent test scheduling raised per-runner load so a transient Windows AV/indexer lock on sessions/index.db can outlast the old ~3.2s rmrf window (win-latest leg of PR #2890: EBUSY unlink index.db). A probe confirmed the golden harness holds no self-handle at rmrf time (flushAllSessions closes the store's shadow first), so this re-sizes the external-lock budget rather than masking an in-process leak. Ladder 25..1600ms (~3.2s/8 attempts) -> 25..3200ms (~7.6s/10 attempts); only paid when a race actually happens. --- tests/tmp-rm.test.ts | 4 ++-- tests/tmp-rm.ts | 13 ++++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/tests/tmp-rm.test.ts b/tests/tmp-rm.test.ts index 1faa4ea9cc..033fde6b5e 100644 --- a/tests/tmp-rm.test.ts +++ b/tests/tmp-rm.test.ts @@ -73,8 +73,8 @@ test("rmrf: a transient storm past the budget throws after the full ladder", () } finally { _setRmImplForTest(); } - assert.equal(calls, 8, "one attempt + all seven backoffs, then give up"); - assert.ok(Date.now() - t0 >= 3100, "paid the 25..1600ms ladder (~3.2s)"); + assert.equal(calls, 10, "one attempt + all nine backoffs, then give up"); + assert.ok(Date.now() - t0 >= 7400, "paid the 25..3200ms ladder (~7.6s)"); }); test("rmrf: non-transient errors throw at once, no backoff", () => { diff --git a/tests/tmp-rm.ts b/tests/tmp-rm.ts index fa79772147..019dbcbb82 100644 --- a/tests/tmp-rm.ts +++ b/tests/tmp-rm.ts @@ -9,9 +9,16 @@ import { rmSync } from "node:fs"; // ubuntu-22 release-gate leg — the failing suite's late debounced session // flush (5ms debounce recreating //) kept the tree alive past // every retry under full-suite load. Escalate with exponential backoff so -// teardown can always outlive a bounded writer burst; the full window is -// ~3.2s and is only paid when a race actually happens. -const RETRY_DELAYS_MS = [25, 50, 100, 200, 400, 800, 1600] as const; +// teardown can always outlive a bounded writer burst; the ladder below sums +// the full window and is only paid when a race actually happens. +// +// #2908: #2816's c=4 concurrent test scheduling raised per-runner load, and a +// win-latest leg then lost the race on EBUSY unlinking sessions/index.db — a +// transient Windows AV/indexer lock outlasting the old ~3.2s window (#2799 +// family). A probe confirmed the harness holds NO self-handle at rmrf time +// (flushAllSessions closes the store's shadow first), so this is not masking +// an in-process leak: it re-sizes the external-lock budget to the c=4 reality. +const RETRY_DELAYS_MS = [25, 50, 100, 200, 400, 800, 1600, 3200, 3200] as const; /** Sync sleep that is legal on any thread in Node (blocks the event loop — * exactly what a teardown-path retry wants; no pending I/O ordering to keep). */ From c3dafdb68e15d120b46f576f7179510467e1763e Mon Sep 17 00:00:00 2001 From: ework-agent Date: Mon, 12 Oct 2026 18:17:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(tests):=20correct=20tmp-rm=20ladder=20t?= =?UTF-8?q?otal=20in=20golden=20pin=20=E2=80=94=209575ms=20(~9.6s),=20not?= =?UTF-8?q?=20~7.6s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The #2908 disclosure under-stated the new budget: [25..1600,3200,3200] sums to 9575ms. Tighten the storm-case pin from >=7400 to >=9400 so a dropped rung (e.g. the 1600 step: 7975ms) can no longer slip through. --- tests/tmp-rm.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tmp-rm.test.ts b/tests/tmp-rm.test.ts index 033fde6b5e..80c0d52fe0 100644 --- a/tests/tmp-rm.test.ts +++ b/tests/tmp-rm.test.ts @@ -74,7 +74,7 @@ test("rmrf: a transient storm past the budget throws after the full ladder", () _setRmImplForTest(); } assert.equal(calls, 10, "one attempt + all nine backoffs, then give up"); - assert.ok(Date.now() - t0 >= 7400, "paid the 25..3200ms ladder (~7.6s)"); + assert.ok(Date.now() - t0 >= 9400, "paid the 25..3200ms ladder (~9.6s)"); }); test("rmrf: non-transient errors throw at once, no backoff", () => {