FN-8683: remove unreachable SQLite task polling replica
Document PostgreSQL task-deletion observation and remove the obsolete SQLite polling path. - Remove polling state, replica emissions, and activity-log suppression from TaskStore. - Retain backend-aware cache warming while documenting the transactional-outbox follow-up. - Add tombstone and soft-delete abort coverage across core and engine lanes. Files changed: docs/architecture.md | 3 +- ...tgres-cross-process-task-deleted-observation.md | 128 ++++++++++++++++ docs/storage.md | 3 +- .../task-delete-nonblocking-cleanup.test.ts | 54 +++++++ .../task-deleted-polling-replica-tombstone.test.ts | 57 +++++++ .../task-updated-lanes-emit-surfaces.test.ts | 26 ---- packages/core/src/store.ts | 13 +- packages/core/src/task-store/lifecycle-ops.ts | 168 ++------------------- packages/core/src/task-store/task-artifacts-ops.ts | 4 - .../__tests__/executor-soft-delete-abort.test.ts | 15 ++ .../src/__tests__/triage-soft-delete-abort.test.ts | 14 ++ 11 files changed, 284 insertions(+), 201 deletions(-) Fusion-Task-Id: FN-8683 Fusion-Task-Lineage: a052db0c-b6fc-4b05-b6b2-f8217b56ded0 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
This commit is contained in:
@@ -124,6 +124,21 @@ describe("TaskExecutor soft-delete aborts", () => {
|
||||
expect((executor as any).activeSubagentSessions.has("FN-TEST-4")).toBe(false);
|
||||
});
|
||||
|
||||
it("receives the unchanged TaskStore delete payload when metadata is present", async () => {
|
||||
const { store, emit } = createEventedStore();
|
||||
const executor = new TaskExecutor(store, "/tmp/test");
|
||||
const abort = vi.fn().mockResolvedValue(undefined);
|
||||
|
||||
(executor as any).activeSessions.set("FN-TEST-META", {
|
||||
session: { abort, dispose: vi.fn() },
|
||||
seenSteeringIds: new Set<string>(),
|
||||
});
|
||||
emit("task:deleted", { ...makeTask("FN-TEST-META"), deletedAt: "2026-08-01T09:59:00.000Z" }, { githubIssueAction: "auto" });
|
||||
await (executor as any).pendingTaskDisposals.get("FN-TEST-META");
|
||||
|
||||
expect(abort).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it("is a silent no-op when the deleted task has no active surfaces", () => {
|
||||
const { store, emit } = createEventedStore();
|
||||
const executor = new TaskExecutor(store, "/tmp/test");
|
||||
|
||||
@@ -73,6 +73,20 @@ describe("TriageProcessor soft-delete aborts", () => {
|
||||
processor.stop();
|
||||
});
|
||||
|
||||
it("receives the unchanged TaskStore delete payload when metadata is present", async () => {
|
||||
const { store, emit } = createEventedStore();
|
||||
const processor = new TriageProcessor(store, "/tmp/root");
|
||||
const abort = vi.fn().mockResolvedValue(undefined);
|
||||
|
||||
processor.start();
|
||||
(processor as any).activeSessions.set("FN-TEST-META", { abort, dispose: vi.fn() });
|
||||
emit("task:deleted", { id: "FN-TEST-META", deletedAt: "2026-08-01T09:59:00.000Z" }, { githubIssueAction: "auto" });
|
||||
await Promise.resolve();
|
||||
|
||||
expect(abort).toHaveBeenCalledTimes(1);
|
||||
processor.stop();
|
||||
});
|
||||
|
||||
it("is a no-op for unknown soft-deleted ids", () => {
|
||||
const { store, emit } = createEventedStore();
|
||||
const processor = new TriageProcessor(store, "/tmp/root");
|
||||
|
||||
Reference in New Issue
Block a user