test(heartbeat): use test-only signal setup and inspect saved stdout

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-30 16:42:27 -05:00
1 parent 098111c2ca
commit 50217ad02a
2 files changed
+5 -4

No files matched your search

@@ -1,9 +1,9 @@
import { PgDialect } from "drizzle-orm/pg-core";
import { afterEach, describe, expect, it, vi } from "vitest";
import { installDatabaseWorkSignals } from "@paperclipai/db";
import { createDeliveryWorkCoordinator } from "../delivery-work-coordinator.js";
import { notifyRunDispatch } from "../run-dispatch-notifications.js";
import { registerRunDispatchWork } from "./dispatch-work.js";
import { installDatabaseWorkSignals } from "../../../packages/db/src/work-signals.js";
import { createDeliveryWorkCoordinator } from "../services/delivery-work-coordinator.js";
import { notifyRunDispatch } from "../services/run-dispatch-notifications.js";
import { registerRunDispatchWork } from "../services/heartbeat/dispatch-work.js";
const cleanup: Array<() => Promise<void>> = [];
afterEach(async () => {
@@ -78,6 +78,7 @@ describe.skipIf(!support.supported)("run dispatch production wiring (controlled
async function completed(id: string) {
await vi.waitFor(async () => expect((await status(id))?.status).toBe("succeeded"), { timeout: 10_000 });
await heartbeat.drainActiveRunExecutions();
expect((await status(id)).stdoutExcerpt).toContain("dispatch-proof");
}
it("keeps fresh empty, configured idle and retained terminal history quiet", async () => {
await start(); await quiet();