diff --git a/packages/engine/src/__tests__/backlog-pressure-reporter.test.ts b/packages/engine/src/__tests__/backlog-pressure-reporter.test.ts index 9ad91940fa..3385c26f6d 100644 --- a/packages/engine/src/__tests__/backlog-pressure-reporter.test.ts +++ b/packages/engine/src/__tests__/backlog-pressure-reporter.test.ts @@ -2,6 +2,13 @@ import { describe, expect, it, vi, beforeEach } from "vitest"; import type { Task, TaskStore } from "@fusion/core"; import { BacklogPressureReporter } from "../backlog-pressure-reporter.js"; +/* +FNXC:PgMigrationQuarantine 2026-07-18-04:15: +VAL-REMOVAL-005 reporters await the PostgreSQL-shaped insight-store contract. +Keep mock reads promise-based so cooldown and payload assertions exercise the +same asynchronous collaborator boundary as production. +*/ + function createTask(overrides: Partial = {}): Task { return { id: "FN-1", @@ -86,7 +93,7 @@ describe("BacklogPressureReporter", () => { createTask({ id: "FN-5" }), ]; const allTasks = [...todoFull, createTask({ id: "FN-0", column: "todo" })]; - const store = createStore({ todoSlim, inProgressSlim, todoFull, allTasks, insightStore: { upsertInsight: vi.fn(), listInsights: vi.fn().mockReturnValue([]) } }); + const store = createStore({ todoSlim, inProgressSlim, todoFull, allTasks, insightStore: { upsertInsight: vi.fn(), listInsights: vi.fn().mockResolvedValue([]) } }); const reporter = new BacklogPressureReporter({ store, projectId: "/tmp/project", logger }); await expect(reporter.report()).resolves.toEqual({ alerted: false, reason: "insufficient-candidates" }); }); @@ -109,7 +116,7 @@ describe("BacklogPressureReporter", () => { createTask({ id: "FN-DEP-TODO", column: "todo" }), createTask({ id: "FN-DEP-DONE", column: "done" }), ]; - const insightStore = { upsertInsight: vi.fn(), listInsights: vi.fn().mockReturnValue([]) }; + const insightStore = { upsertInsight: vi.fn(), listInsights: vi.fn().mockResolvedValue([]) }; const reporter = new BacklogPressureReporter({ store: createStore({ todoSlim, inProgressSlim, todoFull, allTasks, insightStore }), projectId: "/tmp/project", @@ -136,7 +143,7 @@ describe("BacklogPressureReporter", () => { const todoSlim = Array.from({ length: 44 }, (_, i) => createTask({ id: `FN-T${i}` })); const inProgressSlim = [createTask({ id: "FN-P1", column: "in-progress" }), createTask({ id: "FN-P2", column: "in-progress" }), createTask({ id: "FN-P3", column: "in-progress" })]; const todoFull = Array.from({ length: 8 }, (_, i) => createTask({ id: `FN-C${i}`, title: `Candidate ${i}`, priority: i === 0 ? "urgent" : "normal" })); - const insightStore = { upsertInsight: vi.fn(), listInsights: vi.fn().mockReturnValue([]) }; + const insightStore = { upsertInsight: vi.fn(), listInsights: vi.fn().mockResolvedValue([]) }; const store = createStore({ todoSlim, inProgressSlim, todoFull, allTasks: todoFull, insightStore }); const reporter = new BacklogPressureReporter({ store, projectId: "/tmp/project", logger, now: () => now }); @@ -162,7 +169,7 @@ describe("BacklogPressureReporter", () => { const todoFull = Array.from({ length: 5 }, (_, i) => createTask({ id: `FN-C${i}` })); const insightStore = { upsertInsight: vi.fn(), - listInsights: vi.fn().mockReturnValue([]), + listInsights: vi.fn().mockResolvedValue([]), }; const store = createStore({ todoSlim, inProgressSlim, todoFull, allTasks: todoFull, insightStore, settings: { backlogPressureAlertCooldownMs: 60_000 } }); const reporter = new BacklogPressureReporter({ store, projectId: "/tmp/project", logger, now: () => Date.now() }); @@ -170,14 +177,14 @@ describe("BacklogPressureReporter", () => { await reporter.report(); expect(insightStore.upsertInsight).toHaveBeenCalledTimes(1); - insightStore.listInsights.mockReturnValue([ + insightStore.listInsights.mockResolvedValue([ { title: "Backlog pressure detected 2026-05-18", updatedAt: new Date(Date.now()).toISOString() }, ]); await expect(reporter.report()).resolves.toEqual({ alerted: false, reason: "under-threshold" }); expect(insightStore.upsertInsight).toHaveBeenCalledTimes(1); vi.advanceTimersByTime(61_000); - insightStore.listInsights.mockReturnValue([ + insightStore.listInsights.mockResolvedValue([ { title: "Backlog pressure detected 2026-05-18", updatedAt: new Date(baseNow).toISOString() }, ]); await reporter.report(); diff --git a/packages/engine/src/__tests__/dependency-blocked-todo-reporter.test.ts b/packages/engine/src/__tests__/dependency-blocked-todo-reporter.test.ts index e3ce40c9a7..49cc614a82 100644 --- a/packages/engine/src/__tests__/dependency-blocked-todo-reporter.test.ts +++ b/packages/engine/src/__tests__/dependency-blocked-todo-reporter.test.ts @@ -5,6 +5,13 @@ import { DEPENDENCY_BLOCKED_TODO_TITLE_PREFIX, } from "../dependency-blocked-todo-reporter.js"; +/* +FNXC:PgMigrationQuarantine 2026-07-18-04:15: +VAL-REMOVAL-005 reporters await the PostgreSQL-shaped insight-store contract. +Keep mock reads promise-based so cooldown and payload assertions exercise the +same asynchronous collaborator boundary as production. +*/ + function createTask(overrides: Partial = {}): Task { return { id: "FN-1", @@ -85,7 +92,7 @@ describe("DependencyBlockedTodoReporter", () => { createTask({ id: "FN-5085", dependencies: ["FN-5090"] }), createTask({ id: "FN-5089", dependencies: ["FN-5090"] }), ]; - const insightStore = { upsertInsight: vi.fn(), listInsights: vi.fn().mockReturnValue([]) }; + const insightStore = { upsertInsight: vi.fn(), listInsights: vi.fn().mockResolvedValue([]) }; const store = createStore({ tasks, insightStore }); const reporter = new DependencyBlockedTodoReporter({ store, projectId: "/tmp/project", logger, now: () => now }); @@ -110,7 +117,7 @@ describe("DependencyBlockedTodoReporter", () => { ]; const insightStore = { upsertInsight: vi.fn(), - listInsights: vi.fn().mockReturnValue([{ title: `${DEPENDENCY_BLOCKED_TODO_TITLE_PREFIX} 2026-05-18`, updatedAt: "2026-05-18T11:59:30.000Z" }]), + listInsights: vi.fn().mockResolvedValue([{ title: `${DEPENDENCY_BLOCKED_TODO_TITLE_PREFIX} 2026-05-18`, updatedAt: "2026-05-18T11:59:30.000Z" }]), }; const store = createStore({ tasks, insightStore, settings: { dependencyBlockedTodoReportCooldownMs: 60_000 } }); const reporter = new DependencyBlockedTodoReporter({ store, projectId: "/tmp/project", logger, now: () => now }); @@ -126,7 +133,7 @@ describe("DependencyBlockedTodoReporter", () => { ]; const insightStore = { upsertInsight: vi.fn(), - listInsights: vi.fn().mockReturnValue([{ title: `${DEPENDENCY_BLOCKED_TODO_TITLE_PREFIX} 2026-05-17`, updatedAt: "2026-05-18T11:58:00.000Z" }]), + listInsights: vi.fn().mockResolvedValue([{ title: `${DEPENDENCY_BLOCKED_TODO_TITLE_PREFIX} 2026-05-17`, updatedAt: "2026-05-18T11:58:00.000Z" }]), }; const store = createStore({ tasks, insightStore, settings: { dependencyBlockedTodoReportCooldownMs: 60_000 } }); const reporter = new DependencyBlockedTodoReporter({ store, projectId: "/tmp/project", logger, now: () => now }); @@ -156,7 +163,7 @@ describe("DependencyBlockedTodoReporter", () => { createTask({ id: "FN-5085", dependencies: ["FN-5090"] }), createTask({ id: "FN-5089", dependencies: ["FN-5090"] }), ]; - const insightStore = { upsertInsight: vi.fn(), listInsights: vi.fn().mockReturnValue([]) }; + const insightStore = { upsertInsight: vi.fn(), listInsights: vi.fn().mockResolvedValue([]) }; const store = createStore({ tasks, insightStore }); const reporter = new DependencyBlockedTodoReporter({ store, projectId: "/tmp/project", logger, now: () => Date.parse("2026-05-18T12:00:00.000Z") }); await reporter.report(); diff --git a/packages/engine/src/__tests__/goal-injection-diagnostics-wiring.test.ts b/packages/engine/src/__tests__/goal-injection-diagnostics-wiring.test.ts index 72524ca029..b3fbbd4b87 100644 --- a/packages/engine/src/__tests__/goal-injection-diagnostics-wiring.test.ts +++ b/packages/engine/src/__tests__/goal-injection-diagnostics-wiring.test.ts @@ -6,6 +6,13 @@ import { resolveGoalContextForDiagnostics, } from "../goal-injection-diagnostics.js"; +/* +FNXC:PgMigrationQuarantine 2026-07-18-04:15: +Goal injection awaits GoalStore listGoals under the PostgreSQL backend. These +wiring mocks return promises to preserve diagnostic and audit assertions at +the production-shaped async collaborator boundary. +*/ + function goal(id: string, title: string, createdAt: string): Goal { return { id, @@ -21,7 +28,7 @@ describe("goal injection diagnostics wiring seam", () => { it("resolveAndEmitGoalContext emits applied diagnostics and audit for planning lane", async () => { const goals = [goal("G-1", "one", "2026-01-01T00:00:00.000Z")]; const store = { - getGoalStore: () => ({ listGoals: () => goals }), + getGoalStore: () => ({ listGoals: async () => goals }), logEntry: vi.fn().mockResolvedValue(undefined), recordRunAuditEvent: vi.fn().mockResolvedValue(undefined), } as any; @@ -42,7 +49,7 @@ describe("goal injection diagnostics wiring seam", () => { it("resolveAndEmitGoalContext emits no-goals semantics when goal store is empty", async () => { const store = { - getGoalStore: () => ({ listGoals: () => [] }), + getGoalStore: () => ({ listGoals: async () => [] }), logEntry: vi.fn().mockResolvedValue(undefined), recordRunAuditEvent: vi.fn().mockResolvedValue(undefined), } as any; @@ -68,7 +75,7 @@ describe("goal injection diagnostics wiring seam", () => { const lanes = ["heartbeat", "executor", "planning"] as const; for (const lane of lanes) { const store = { - getGoalStore: () => ({ listGoals: () => [goal("G-1", "one", "2026-01-01T00:00:00.000Z")] }), + getGoalStore: () => ({ listGoals: async () => [goal("G-1", "one", "2026-01-01T00:00:00.000Z")] }), getMissionStore: () => ({ listGoalIdsForTask: () => ["G-PROV-1", "G-PROV-2"] }), logEntry: vi.fn().mockResolvedValue(undefined), recordRunAuditEvent: vi.fn().mockResolvedValue(undefined), @@ -160,7 +167,7 @@ describe("goal injection diagnostics wiring seam", () => { it("fails soft when provenance resolution throws", async () => { const store = { - getGoalStore: () => ({ listGoals: () => [goal("G-1", "one", "2026-01-01T00:00:00.000Z")] }), + getGoalStore: () => ({ listGoals: async () => [goal("G-1", "one", "2026-01-01T00:00:00.000Z")] }), getMissionStore: () => ({ listGoalIdsForTask: () => { throw new Error("boom"); diff --git a/packages/engine/src/__tests__/merger-cwd-fallback-removed.test.ts b/packages/engine/src/__tests__/merger-cwd-fallback-removed.test.ts index 2f414cce54..b1191707b1 100644 --- a/packages/engine/src/__tests__/merger-cwd-fallback-removed.test.ts +++ b/packages/engine/src/__tests__/merger-cwd-fallback-removed.test.ts @@ -17,7 +17,12 @@ vi.mock("../pi.js", () => ({ import { aiMergeTask } from "../merger.js"; import { mergerLog } from "../logger.js"; import { resolveMergeIntegrationRoot } from "../merger-integration-worktree.js"; -// FNXC:SqliteRemoval 2026-07-14: hasPg guard added — makeReliabilityFixture requires PG after SQLite removal (VAL-REMOVAL-005). +/* +FNXC:PgMigrationQuarantine 2026-07-18-04:10: +VAL-REMOVAL-005 reliability fixtures use PostgreSQL AsyncDataLayer storage. Read +run audits through getRunAuditEventsAsync so each assertion observes committed +backend events rather than the removed synchronous SQLite read surface. +*/ import { git, hasGit, hasPg, makeReliabilityFixture } from "./reliability-interactions/_helpers.js"; describe("FN-5348 cwd integration fallback removed", () => { @@ -55,7 +60,7 @@ describe("FN-5348 cwd integration fallback removed", () => { await aiMergeTask(store, rootDir, task.id).catch(() => undefined); - const autostashEvents = store.getRunAuditEvents({ taskId: task.id }) + const autostashEvents = (await store.getRunAuditEventsAsync({ taskId: task.id })) .filter((event) => event.mutationType === "merge:reuse-handoff-autostash"); expect(autostashEvents.length).toBeGreaterThanOrEqual(1); const meta = autostashEvents[0]?.metadata ?? {}; @@ -64,7 +69,7 @@ describe("FN-5348 cwd integration fallback removed", () => { expect((meta.stashSha as string).length).toBeGreaterThan(0); // FN-5348 invariant preserved: no cwd-main fallback path was taken. - const refused = store.getRunAuditEvents({ taskId: task.id }) + const refused = (await store.getRunAuditEventsAsync({ taskId: task.id })) .filter((event) => event.mutationType === "merge:cwd-integration-fallback-refused"); expect(refused).toHaveLength(0); @@ -115,7 +120,7 @@ describe("FN-5348 cwd integration fallback removed", () => { const result = await aiMergeTask(store, rootDir, task.id); expect(result.merged).toBe(true); expect(warnSpy).toHaveBeenCalledWith(expect.stringContaining("mergeIntegrationWorktree=cwd-integration-branch is explicit opt-in")); - const auditTypes = store.getRunAuditEvents({ taskId: task.id }).map((event) => event.mutationType); + const auditTypes = (await store.getRunAuditEventsAsync({ taskId: task.id })).map((event) => event.mutationType); expect(auditTypes).not.toContain("merge:cwd-integration-fallback-removed"); } finally { await fixture.cleanup(); diff --git a/packages/engine/src/__tests__/reliability-interactions/integration-worktree-state.test.ts b/packages/engine/src/__tests__/reliability-interactions/integration-worktree-state.test.ts index c0ba2246ff..750a278f19 100644 --- a/packages/engine/src/__tests__/reliability-interactions/integration-worktree-state.test.ts +++ b/packages/engine/src/__tests__/reliability-interactions/integration-worktree-state.test.ts @@ -16,7 +16,12 @@ vi.mock("../../pi.js", () => ({ })); import { aiMergeTask } from "../../merger.js"; -// FNXC:SqliteRemoval 2026-07-14: hasPg guard added — makeReliabilityFixture requires PG after SQLite removal (VAL-REMOVAL-005). +/* +FNXC:PgMigrationQuarantine 2026-07-18-04:10: +VAL-REMOVAL-005 reliability fixtures use PostgreSQL AsyncDataLayer storage. Read +run audits through getRunAuditEventsAsync so each assertion observes committed +backend events rather than the removed synchronous SQLite read surface. +*/ import { git, hasGit, hasPg, makeReliabilityFixture } from "./_helpers.js"; async function setupReuseTask(taskId: string, baseBranch: "main" | "master") { @@ -68,7 +73,7 @@ describe("reliability interaction: integration-worktree-state telemetry", () => expect(result.merged).toBe(true); expect((await store.getTask(task.id))?.column).toBe("done"); - const audits = store.getRunAuditEvents({ taskId: task.id }); + const audits = await store.getRunAuditEventsAsync({ taskId: task.id }); const state = audits.find((event) => event.mutationType === "merge:integration-worktree-state"); expect(state?.metadata).toMatchObject({ integrationMode: "reuse-task-worktree", @@ -93,7 +98,7 @@ describe("reliability interaction: integration-worktree-state telemetry", () => git(worktreePath, "sh -c 'printf dirty > DIRTY.txt'"); await aiMergeTask(store, rootDir, task.id).catch(() => undefined); - const audits = store.getRunAuditEvents({ taskId: task.id }); + const audits = await store.getRunAuditEventsAsync({ taskId: task.id }); const autostash = audits.find((event) => event.mutationType === "merge:reuse-handoff-autostash"); expect(autostash?.metadata).toMatchObject({ worktreePath }); expect(typeof autostash?.metadata?.stashSha).toBe("string"); @@ -118,7 +123,7 @@ describe("reliability interaction: integration-worktree-state telemetry", () => const result = await aiMergeTask(store, rootDir, task.id); expect(result.merged).toBe(true); - const audits = store.getRunAuditEvents({ taskId: task.id }).filter((event) => + const audits = (await store.getRunAuditEventsAsync({ taskId: task.id })).filter((event) => ["merge:integration-worktree-state", "merge:cwd-integration-fallback-refused", "merge:integration-ref-advance"].includes(event.mutationType), ); const state = audits.find((event) => event.mutationType === "merge:integration-worktree-state"); diff --git a/packages/engine/src/__tests__/reliability-interactions/merge-runner-spawn-enoent-prevention.test.ts b/packages/engine/src/__tests__/reliability-interactions/merge-runner-spawn-enoent-prevention.test.ts index 58141e0c8c..2b8ef60ad4 100644 --- a/packages/engine/src/__tests__/reliability-interactions/merge-runner-spawn-enoent-prevention.test.ts +++ b/packages/engine/src/__tests__/reliability-interactions/merge-runner-spawn-enoent-prevention.test.ts @@ -19,7 +19,12 @@ vi.mock("../../pi.js", () => ({ import type { Settings } from "@fusion/core"; import { activeSessionRegistry, executingTaskLock } from "../../active-session-registry.js"; import { aiMergeTask } from "../../merger.js"; -// FNXC:SqliteRemoval 2026-07-14: hasPg guard added — makeReliabilityFixture requires PG after SQLite removal (VAL-REMOVAL-005). +/* +FNXC:PgMigrationQuarantine 2026-07-18-04:10: +VAL-REMOVAL-005 reliability fixtures use PostgreSQL AsyncDataLayer storage. Read +run audits through getRunAuditEventsAsync so each assertion observes committed +backend events rather than the removed synchronous SQLite read surface. +*/ import { git, hasGit, hasPg, makeReliabilityFixture } from "./_helpers.js"; const RM = { recursive: true, force: true, maxRetries: 5, retryDelay: 50 } as const; @@ -129,7 +134,7 @@ describe("FN-6278 reliability interactions: merge runner cwd preflight", () => { const result = await aiMergeTask(store, rootDir, taskId); const taskAfter = await store.getTask(taskId); - const audits = store.getRunAuditEvents({ taskId }); + const audits = await store.getRunAuditEventsAsync({ taskId }); const auditTypes = audits.map((event) => event.mutationType); expect(result.merged).toBe(true); @@ -181,7 +186,7 @@ describe("FN-6278 reliability interactions: merge runner cwd preflight", () => { const result = await aiMergeTask(store, rootDir, taskId); const taskAfter = await store.getTask(taskId); - const audits = store.getRunAuditEvents({ taskId }); + const audits = await store.getRunAuditEventsAsync({ taskId }); const auditTypes = audits.map((event) => event.mutationType); expect(result.merged).toBe(true); @@ -218,7 +223,7 @@ describe("FN-6278 reliability interactions: merge runner cwd preflight", () => { try { const result = await aiMergeTask(store, rootDir, taskId); const taskAfter = await store.getTask(taskId); - const audits = store.getRunAuditEvents({ taskId }); + const audits = await store.getRunAuditEventsAsync({ taskId }); const auditTypes = audits.map((event) => event.mutationType); expect(result.merged).toBe(true); @@ -248,7 +253,7 @@ describe("FN-6278 reliability interactions: merge runner cwd preflight", () => { gate: "active-session-binding", }); const taskAfter = await store.getTask(taskId); - const audits = store.getRunAuditEvents({ taskId }); + const audits = await store.getRunAuditEventsAsync({ taskId }); const auditTypes = audits.map((event) => event.mutationType); expect(taskAfter?.column).toBe("in-review"); diff --git a/packages/engine/src/__tests__/reliability-interactions/meta-chain-auto-close.test.ts b/packages/engine/src/__tests__/reliability-interactions/meta-chain-auto-close.test.ts index 75951e5479..989a949527 100644 --- a/packages/engine/src/__tests__/reliability-interactions/meta-chain-auto-close.test.ts +++ b/packages/engine/src/__tests__/reliability-interactions/meta-chain-auto-close.test.ts @@ -1,5 +1,10 @@ import { describe, expect, it } from "vitest"; -// FNXC:SqliteRemoval 2026-07-14: hasPg guard added — makeReliabilityFixture requires PG after SQLite removal (VAL-REMOVAL-005). +/* +FNXC:PgMigrationQuarantine 2026-07-18-04:10: +VAL-REMOVAL-005 reliability fixtures use PostgreSQL AsyncDataLayer storage. Read +run audits through getRunAuditEventsAsync so each assertion observes committed +backend events rather than the removed synchronous SQLite read surface. +*/ import { hasGit, hasPg, makeReliabilityFixture } from "./_helpers.js"; const canRun = hasGit && hasPg; @@ -73,7 +78,7 @@ const canRun = hasGit && hasPg; [meta4.id]: "archived", }); - const runAudits = fixture.store.getRunAuditEvents({ limit: 200 }); + const runAudits = await fixture.store.getRunAuditEventsAsync({ limit: 200 }); const decayAudits = runAudits.filter((event) => event.mutationType === "task:auto-rebound-paused-scope-decay"); const metaResolvedAudits = runAudits.filter((event) => event.mutationType === "task:auto-archived-meta-resolved"); expect(decayAudits.length).toBeGreaterThanOrEqual(1); diff --git a/packages/engine/vitest.config.ts b/packages/engine/vitest.config.ts index 8119d7db69..d7821030bd 100644 --- a/packages/engine/vitest.config.ts +++ b/packages/engine/vitest.config.ts @@ -295,17 +295,8 @@ export default defineConfig({ // SQLite-path gate test evicted + quarantined (see engine-core comment + ledger). "node_modules/**", "dist/**", - // FNXC:PgMigrationQuarantine 2026-07-18-02:10: FN-8258 rescued the ten remaining VAL-REMOVAL-005 holdouts through PostgreSQL harnesses and production-shaped async contracts; retain only unresolved paired quarantines. - // FNXC:PgMigrationQuarantine 2026-07-14-08:00: + // FNXC:PgMigrationQuarantine 2026-07-18-04:30: FN-8270 rescued the final seven VAL-REMOVAL-005 holdouts by awaiting PG audit reads and modeling async collaborators. Their paired ledger entries and excludes were removed only after targeted green runs. // FNXC:WorkflowStepInstancePersistence 2026-07-16-20:35: FN-8157 restores this PG-backed foreach suite through async store persistence, so it must execute in engine-default. - // VAL-REMOVAL-005 deleted the SQLite Database class. These engine-default files fail - // because they construct SQLite-backed stores or use sync APIs (getRunAuditEvents, - // getDatabase, walCheckpoint) that throw/return-empty in backend mode, or have mock - // drift from the async-satellite cutover. Quarantined on sight per AGENTS.md. - "src/__tests__/backlog-pressure-reporter.test.ts", - "src/__tests__/dependency-blocked-todo-reporter.test.ts", - "src/__tests__/goal-injection-diagnostics-wiring.test.ts", - "src/__tests__/merger-cwd-fallback-removed.test.ts", /* FNXC:EngineTests 2026-07-18-08:15: heartbeat-error-recovery timed out at 30s on full-suite shard 1 @@ -363,11 +354,7 @@ export default defineConfig({ Database class being deleted. Quarantined on sight per AGENTS.md; mirrored in scripts/lib/test-quarantine.json. */ -// FNXC:PgMigrationQuarantine 2026-07-14-08:00: - // VAL-REMOVAL-005 deleted the SQLite Database class. These files use makeReliabilityFixture - // (now PG-backed) but fail on sync SQLite APIs (getRunAuditEvents, getDatabase) that - // return [] / throw in backend mode, or on mock drift from the async-satellite cutover. - // Quarantined on sight per AGENTS.md; mirrored in scripts/lib/test-quarantine.json. + // FNXC:PgMigrationQuarantine 2026-07-18-04:30: FN-8270 restored the final VAL-REMOVAL-005 reliability suites with awaited PostgreSQL audit reads. Keep the project partition below while allowing these tests to execute under engine-reliability. // FNXC:PgMigrationQuarantine 2026-07-16-04:59: // FN-8044 migrated dependency-reconcile suites to the PG corrupt-row seeding seam, so // they are deliberately absent from this quarantine list and ledger. @@ -381,9 +368,6 @@ export default defineConfig({ // FN-8111 restored meta-archive guard composition with PG-authoritative audits and canonical fixture ids, and fixed completed stale continuations so the in-memory wedge suite is intentionally unquarantined. // FNXC:PgMigrationQuarantine 2026-07-16-12:30: // FN-8118 verified the already-landed post-done continuation rescue: this pure in-memory suite has no PG fixture and passed its serialized reliability lane three times. Keep it absent from this quarantine list while preserving the engine-default reliability partition exclusion. - "src/__tests__/reliability-interactions/integration-worktree-state.test.ts", - "src/__tests__/reliability-interactions/merge-runner-spawn-enoent-prevention.test.ts", - "src/__tests__/reliability-interactions/meta-chain-auto-close.test.ts", ], // These tests assert event ordering across real worktrees. Parallel // execution under merger load caused subprocess-guard timeouts and diff --git a/scripts/lib/test-quarantine.json b/scripts/lib/test-quarantine.json index 6eaf6f2d77..8a6dc53618 100644 --- a/scripts/lib/test-quarantine.json +++ b/scripts/lib/test-quarantine.json @@ -1,41 +1,6 @@ { - "$comment": "Flaky-test quarantine ledger (deletion ratchet \u2014 see AGENTS.md 'Flaky tests: quarantine on sight' and docs/testing.md 'Quarantine ledger and the deletion ratchet'). A test observed failing without a corresponding real bug is quarantined ON SIGHT: add an entry here AND a matching one-line `exclude` entry in that package's vitest config, in the same commit. Every entry needs a non-empty `reason` (link the failing run) and a `quarantinedAt` date \u2014 the entry expires 14 days later, at which point the test file is DELETED unless someone rescues it with evidence it catches real regressions plus a root-cause fix (never appeasement). There is deliberately no loader module and no automation around this file: it is a dated record, the vitest config is the enforcement.", + "$comment": "Flaky-test quarantine ledger (deletion ratchet — see AGENTS.md 'Flaky tests: quarantine on sight' and docs/testing.md 'Quarantine ledger and the deletion ratchet'). A test observed failing without a corresponding real bug is quarantined ON SIGHT: add an entry here AND a matching one-line `exclude` entry in that package's vitest config, in the same commit. Every entry needs a non-empty `reason` (link the failing run) and a `quarantinedAt` date — the entry expires 14 days later, at which point the test file is DELETED unless someone rescues it with evidence it catches real regressions plus a root-cause fix (never appeasement). There is deliberately no loader module and no automation around this file: it is a dated record, the vitest config is the enforcement.", "entries": [ - { - "file": "packages/engine/src/__tests__/backlog-pressure-reporter.test.ts", - "reason": "VAL-REMOVAL-005 PG migration: fails due to SQLite removal or sync API incompatibility in backend mode. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29344576232. Mirrored in packages/engine/vitest.config.ts.", - "quarantinedAt": "2026-07-14" - }, - { - "file": "packages/engine/src/__tests__/dependency-blocked-todo-reporter.test.ts", - "reason": "VAL-REMOVAL-005 PG migration: fails due to SQLite removal or sync API incompatibility in backend mode. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29344576232. Mirrored in packages/engine/vitest.config.ts.", - "quarantinedAt": "2026-07-14" - }, - { - "file": "packages/engine/src/__tests__/goal-injection-diagnostics-wiring.test.ts", - "reason": "VAL-REMOVAL-005 PG migration: fails due to SQLite removal or sync API incompatibility in backend mode. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29344576232. Mirrored in packages/engine/vitest.config.ts.", - "quarantinedAt": "2026-07-14" - }, - { - "file": "packages/engine/src/__tests__/merger-cwd-fallback-removed.test.ts", - "reason": "VAL-REMOVAL-005 PG migration: fails due to SQLite removal or sync API incompatibility in backend mode. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29344576232. Mirrored in packages/engine/vitest.config.ts.", - "quarantinedAt": "2026-07-14" - }, - { - "file": "packages/engine/src/__tests__/reliability-interactions/integration-worktree-state.test.ts", - "reason": "VAL-REMOVAL-005 PG migration: reliability fixture uses PG-backed store but sync APIs (getRunAuditEvents, getDatabase) fail in backend mode. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29344576232. Mirrored in packages/engine/vitest.config.ts.", - "quarantinedAt": "2026-07-14" - }, - { - "file": "packages/engine/src/__tests__/reliability-interactions/merge-runner-spawn-enoent-prevention.test.ts", - "reason": "VAL-REMOVAL-005 PG migration: reliability fixture uses PG-backed store but sync APIs (getRunAuditEvents, getDatabase) fail in backend mode. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29344576232. Mirrored in packages/engine/vitest.config.ts.", - "quarantinedAt": "2026-07-14" - }, - { - "file": "packages/engine/src/__tests__/reliability-interactions/meta-chain-auto-close.test.ts", - "reason": "VAL-REMOVAL-005 PG migration: reliability fixture uses PG-backed store but sync APIs (getRunAuditEvents, getDatabase) fail in backend mode. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29344576232. Mirrored in packages/engine/vitest.config.ts.", - "quarantinedAt": "2026-07-14" - }, { "file": "packages/engine/src/__tests__/heartbeat-error-recovery.test.ts", "reason": "Full-suite shard 1 timeout (30s) on rotation-shaped 401 recovery under load without product bug evidence. Failing run: https://github.com/Runfusion/Fusion/actions/runs/29636550951. Mirrored in packages/engine/vitest.config.ts.",