From bdf813654e62abf999b7d0448933336653fd81a1 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Thu, 11 Jun 2026 12:24:16 -0700 Subject: [PATCH] fix: resolve botched stash-pop conflict from 245e1280e - scripts/lib/test-quarantine.json: remove stray <<<<<<< / ======= / >>>>>>> stash markers that broke JSON parsing - packages/core/src/__test-utils__/vitest-setup.ts: restore \r?\n regex and \n template escapes; drop stray extra brace --- packages/core/src/__test-utils__/vitest-setup.ts | 11 +++-------- scripts/lib/test-quarantine.json | 4 ---- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/packages/core/src/__test-utils__/vitest-setup.ts b/packages/core/src/__test-utils__/vitest-setup.ts index 74681d3ee2..57665958ac 100644 --- a/packages/core/src/__test-utils__/vitest-setup.ts +++ b/packages/core/src/__test-utils__/vitest-setup.ts @@ -211,8 +211,7 @@ function sweepDeadTmpdirRedirectSinks(): void { try { ownerPids = Array.from(new Set( readFileSync(TMPDIR_REDIRECT_REGISTRY, "utf8") - .split(/ ? -/) + .split(/\r?\n/) .map((line) => Number.parseInt(line, 10)) .filter((pid) => Number.isInteger(pid) && pid > 0), )); @@ -249,9 +248,7 @@ function sweepDeadTmpdirRedirectSinks(): void { } try { - writeFileSync(TMPDIR_REDIRECT_REGISTRY, liveOwnerPids.length > 0 ? `${liveOwnerPids.join(" -")} -` : ""); + writeFileSync(TMPDIR_REDIRECT_REGISTRY, liveOwnerPids.length > 0 ? `${liveOwnerPids.join("\n")}\n` : ""); } catch { // Best-effort only; stale entries are harmless and swept by future workers. } @@ -264,8 +261,7 @@ function ensureTmpdirRedirectSink(): string { const sink = join(WORKER_ROOT, `redir-${process.pid}`); mkdirSync(sink, { recursive: true }); try { - appendFileSync(TMPDIR_REDIRECT_REGISTRY, `${process.pid} -`); + appendFileSync(TMPDIR_REDIRECT_REGISTRY, `${process.pid}\n`); } catch { // Best-effort only; the process exit hook and global teardown still clean up. } @@ -298,7 +294,6 @@ function redirectTmpdirPrefix(prefix: T): T { return join(ensureTmpdirRedirectSink(), basename(prefix)) as T; } -} function ensureIsolatedHome(): void { const existingHome = process.env.HOME ?? process.env.USERPROFILE; diff --git a/scripts/lib/test-quarantine.json b/scripts/lib/test-quarantine.json index 756921e1c0..c8f1c06d6d 100644 --- a/scripts/lib/test-quarantine.json +++ b/scripts/lib/test-quarantine.json @@ -11,10 +11,6 @@ "reason": "Flake: vi.mock('node:child_process') occasionally doesn't take under workspace-concurrent runs, letting real git binary leak and report staged files unrelated to test scope (trips FileScopeViolationError). Same logic covered by real-git fixture tests in reliability-interactions/workflow-and-file-scope. FN-6206.", "quarantinedAt": "2026-06-10" }, -<<<<<<< Updated upstream -======= - ->>>>>>> Stashed changes { "file": "packages/engine/src/__tests__/merger-ai-cleanup.test.ts", "reason": "Flake observed during FN-6206 verification: `pruneExistingAiMergeWorktrees skips active-session paths` failed in full `pnpm --filter @fusion/engine test` runs while the file passed standalone, indicating suite-order/concurrency sensitivity. Follow-up FN-6207.",