From a98fa2790185983a26d86d3c6bbf16f4b90a825e Mon Sep 17 00:00:00 2001 From: "paseo-bot[bot]" <266920839+paseo-bot[bot]@users.noreply.github.com> Date: Fri, 30 Oct 2026 05:58:57 +0000 Subject: [PATCH] test(server): collect fixture garbage before Git filter measurement --- .../workspace-git-service.observation.integration.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/server/src/server/workspace-git-service.observation.integration.test.ts b/packages/server/src/server/workspace-git-service.observation.integration.test.ts index a2cb27739d..62b4a0af0e 100644 --- a/packages/server/src/server/workspace-git-service.observation.integration.test.ts +++ b/packages/server/src/server/workspace-git-service.observation.integration.test.ts @@ -581,6 +581,9 @@ test("Git refresh, command tracing and 10,000 ignored alias events do no synchro let fsCalls = 0; const hook = createHook({ init(_id, type) { if (type.startsWith('FSREQ')) fsCalls++; } }); await tick(); + // Do not charge garbage left by repository setup to the event filter. + // Allocations and GC caused by the measured callback remain in its budget. + global.gc(); const { blockingMs } = await measureMainThreadWork('Git filter main-thread work', async () => { await marker('FILTER_START'); hook.enable(); @@ -614,6 +617,7 @@ test("Git refresh, command tracing and 10,000 ignored alias events do no synchro const { stdout, stderr } = await promisify(execFile)( process.execPath, [ + "--expose-gc", "--import", "tsx", ...(tracing ? ["--trace-sync-io"] : []),