The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
Tests: the worker program's recovery checks always run
Adarshb89c11b9f11b
diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.mdindex 5cfc37ac..7ce1398c 100644--- a/docs/DEVELOPMENT.md+++ b/docs/DEVELOPMENT.md@@ -38,9 +38,10 @@ retries and a deploy. Each check asks three things: the result arrives exactly o- `app-process.ts`: a second app process on the same database, as during a deploy.- `run-watch.ts`: every look at a run (a refresh, a second session, the list), checked against the three states.-All of them listen on free high ports. A check that the studio can't pass yet is an `it.fails`, named with its-scenario and the reason. `tests/recovery-worker.test.ts` holds the worker program's own checks. They skip until the-worker program's recovery parts are in the tree.+All of them listen on free high ports. A check of something the studio can't do yet checks what it does today, and its+name says so. The day the studio learns it, that check fails and becomes a check of the new behaviour.+`tests/recovery-worker.test.ts` holds the worker program's own checks. They run the worker program against a stand-in+ComfyUI. Its first check fails when one of the worker program's recovery parts is missing.## Browser checksdiff --git a/tests/recovery-worker.test.ts b/tests/recovery-worker.test.tsindex 504fe82c..d73306c3 100644--- a/tests/recovery-worker.test.ts+++ b/tests/recovery-worker.test.ts@@ -16,11 +16,10 @@ import { tempDir } from "./helpers/temp-dir";* and a stand-in billing service. Each check asks the same three things as tests/recovery-server.test.ts: the output* arrives exactly once, every look shows only "In line", "Working" and the result, and nothing is charged twice.*- * They need the worker program's recovery parts (results kept on its disk until the studio has them, its ComfyUI+ * They use the worker program's recovery parts (results kept on its disk until the studio has them, its ComfyUI* restarted when it stops or hangs, retries with backoff, staying awake, model folders looked at again, and studio jobs- * before local ComfyUI work), and skip until those are in this tree. The skip is never silent: the first check below- * says so in the test output, and it fails when only some of those parts are here (one renamed or left out), so these- * checks can't stay skipped by accident.+ * before local ComfyUI work). The first check below fails when one of those parts is missing (renamed or left out), so+ * the checks after it always run against all of them.** Each job's graph is the stand-in's own (a sampler and the run's save node, with the run's file prefix), so the* worker's node and model checks pass without model files; everything else about the job is the studio's.@@ -29,8 +28,6 @@ import { tempDir } from "./helpers/temp-dir";const ROOT = path.resolve(import.meta.dirname, "..");/** The worker program's recovery parts these checks load. */const PARTS = ["bin/lib/worker/hold.mjs", "bin/lib/worker/turns.mjs", "bin/lib/worker/local-work.mjs", "bin/lib/worker/retry.mjs", "bin/lib/worker/awake.mjs", "scripts/lib/worker-catalog.mjs"];-const HERE = PARTS.filter((f) => fs.existsSync(path.join(ROOT, f)));-const PROGRAM = HERE.length === PARTS.length;vi.mock("next/server", async (importOriginal) => ({ ...(await importOriginal<typeof import("next/server")>()), connection: async () => {} }));vi.setConfig({ testTimeout: 180_000, hookTimeout: 180_000 });@@ -79,14 +76,12 @@ let a1 = "";let b1 = "";describe("the worker program's recovery parts", () => {- it("are all in this tree, or none is yet: the checks below run, or are skipped and said so", () => {- const missing = PARTS.filter((f) => !HERE.includes(f));- expect(HERE.length === 0 || missing.length === 0, `some of the worker program's recovery parts are missing: ${missing.join(", ")}`).toBe(true);- if (!PROGRAM) console.warn(`[tests] recovery-worker: the worker program's recovery checks are skipped: none of ${PARTS.join(", ")} is in this tree yet`);+ it("are all in this tree, so the checks below run against all of them", () => {+ expect(PARTS.filter((f) => !fs.existsSync(path.join(ROOT, f)))).toEqual([]);});});-describe.skipIf(!PROGRAM)("the worker program's recovery (accounts' runs, end to end)", () => {+describe("the worker program's recovery (accounts' runs, end to end)", () => {beforeAll(async () => {const auth = await import("@/server/auth");const { db } = await import("@/server/db");