fix(engine-tests): eliminate temp-dir leak and raise subprocess guard for concurrent workspace runs

Two engine merger tests created mkdtempSync workspaces directly in tmpdir()
under the tracked `fusion-test-` prefix; under full-suite concurrent load
the post-run check-test-isolation flagged them as leaks. Route both
(`merger-no-op-fix-finalize.test.ts`, `merger-verification-fix-already-on-main.test.ts`)
through FUSION_TEST_WORKER_ROOT like sibling merger tests so they nest
inside the already-tracked worker root.

Bump engine vitest subprocess guard from 60s to 120s and testTimeout to
30s — plain git commands (branch -d, worktree remove) queued behind
system contention during `pnpm -r --workspace-concurrency=2` runs were
timing out. The guard only fires on hangs, so healthy tests pay nothing.

Also bundles in-progress dashboard mobile-breakpoint regex/CSS test
updates and docs index additions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-05-22 20:20:42 -07:00
parent a96e2ab02b
commit f58fb8955a
60 changed files with 138 additions and 95 deletions

View File

@@ -133,7 +133,7 @@ describe("reliability interactions: explicit duplicate marker sweep", () => {
expect(await (fx.manager as any).resolveExplicitDuplicateMarkerTasks()).toBe(10);
const remainingAfterSecond = await fx.store.listTasks({ includeArchived: false });
expect(remainingAfterSecond.filter((task) => ids.includes(task.id))).toHaveLength(0);
});
}, 20_000);
it("fails open when one delete throws and continues processing later tasks", async () => {
const fx = await makeReliabilityFixture();

View File

@@ -718,8 +718,11 @@ describe("FN-5279 reliability interactions: merge reuse task worktree", () => {
expect(orderedFreshAcquireIndex).toBeGreaterThanOrEqual(0);
expect(orderedFreshAcquiredIndex).toBeGreaterThanOrEqual(0);
expect(orderedFallbackIndex).toBeGreaterThanOrEqual(0);
expect(orderedFreshAcquireIndex).toBeLessThan(orderedFreshAcquiredIndex);
expect(orderedFreshAcquiredIndex).toBeLessThan(orderedFallbackIndex);
// getRunAuditEvents() returns newest-first (timestamp DESC, rowid DESC), so the
// later-emitted fallback event should appear before fresh-acquired, which should
// appear before the earlier fresh-acquire marker.
expect(orderedFallbackIndex).toBeLessThan(orderedFreshAcquiredIndex);
expect(orderedFreshAcquiredIndex).toBeLessThan(orderedFreshAcquireIndex);
} finally {
await fixture.cleanup();
}