From 41b7aeeafb99dba664f32b7ac0a8b0af5b7b75f1 Mon Sep 17 00:00:00 2001 From: WaterrrForever Date: Fri, 6 Nov 2026 07:50:22 +0000 Subject: [PATCH] fix(cli): cloud render logs a line a minute while a job holds its status (#7262) * fix(cli): cloud render logs a line a minute while a job holds its status Outside a terminal, `cloud render` printed one line per status change, so a 3D shot that renders for 20 minutes showed "rendering 2.1s" and nothing else. Agents read that as a hang and killed jobs that later completed. The log now repeats the status with its elapsed time once a minute, and the style-sampling remix guide says the cloud gives no frame count and how to check a job the client stopped waiting for. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy * chore(skills): regenerate the skills manifest Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy * refactor(cli): keep the still-running interval module-private Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy --------- Co-authored-by: Claude Opus 5.5 --- packages/cli/src/commands/cloud/render.test.ts | 10 ++++++++++ packages/cli/src/commands/cloud/render.ts | 16 ++++++++++++++-- skills-manifest.json | 2 +- skills/style-sampling/references/remix.md | 2 +- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/packages/cli/src/commands/cloud/render.test.ts b/packages/cli/src/commands/cloud/render.test.ts index 694aafcd6f..fa3f36da96 100644 --- a/packages/cli/src/commands/cloud/render.test.ts +++ b/packages/cli/src/commands/cloud/render.test.ts @@ -7,6 +7,7 @@ import { fileURLToPath } from "node:url"; import { assertArchiveFits, + logsTick, resolveCloudFpsArg, parseAspectRatioFlag, resolveAspectRatioForSubmit, @@ -61,6 +62,15 @@ describe("resolveCloudFpsArg", () => { }); }); +describe("logsTick", () => { + it("logs a long render once a minute while its status holds, so a slow render does not read as a hang", () => { + const logged = { status: "rendering", at: 2_000 }; + expect(logsTick("rendering", 30_000, logged)).toBe(false); + expect(logsTick("rendering", 62_000, logged)).toBe(true); + expect(logsTick("completed", 3_000, logged)).toBe(true); + }); +}); + describe("validateDryRunSource", () => { it("accepts a local directory and rejects already-uploaded sources", () => { expect(() => validateDryRunSource({ kind: "dir", dir: "." }, true)).not.toThrow(); diff --git a/packages/cli/src/commands/cloud/render.ts b/packages/cli/src/commands/cloud/render.ts index b7127244c9..f1657b9cd5 100644 --- a/packages/cli/src/commands/cloud/render.ts +++ b/packages/cli/src/commands/cloud/render.ts @@ -978,6 +978,7 @@ async function pollWithProgress( // mode stays silent altogether. const interactive = !asJson && process.stdout.isTTY === true; let lastStatus = ""; + let logged = { status: "", at: 0 }; try { return await pollUntilTerminal(client, renderId, { intervalMs: poll.intervalMs, @@ -993,10 +994,11 @@ async function pollWithProgress( process.stdout.write(` ${formatTickLine(detail, elapsedMs)}`); lastStatus = detail.status; } - } else if (detail.status !== lastStatus) { - // Non-TTY: one line per status transition, no carriage returns. + } else if (logsTick(detail.status, elapsedMs, logged)) { + // Non-TTY: a line per status change and one a minute while it holds, no carriage returns. console.log(` ${formatTickLine(detail, elapsedMs)}`); lastStatus = detail.status; + logged = { status: detail.status, at: elapsedMs }; } }, }); @@ -1018,6 +1020,16 @@ async function pollWithProgress( } } +const STILL_RUNNING_EVERY_MS = 60_000; + +export function logsTick( + status: string, + elapsedMs: number, + logged: { status: string; at: number }, +): boolean { + return status !== logged.status || elapsedMs - logged.at >= STILL_RUNNING_EVERY_MS; +} + function formatTickLine(detail: HyperframesRenderDetail, elapsedMs: number): string { const status = colorStatus(detail.status); return `${status} ${c.dim(formatDuration(elapsedMs))}`; diff --git a/skills-manifest.json b/skills-manifest.json index 23724a20d2..10be9ab490 100644 --- a/skills-manifest.json +++ b/skills-manifest.json @@ -34,7 +34,7 @@ "files": 2 }, "style-sampling": { - "hash": "58192cff7fc8f7ce", + "hash": "e54aca29ef95de2e", "files": 2 } } diff --git a/skills/style-sampling/references/remix.md b/skills/style-sampling/references/remix.md index f6cacb03d1..c4891aad5b 100644 --- a/skills/style-sampling/references/remix.md +++ b/skills/style-sampling/references/remix.md @@ -53,7 +53,7 @@ The person's message carries what it carries. Ask once, together, only what is s ## 7. Checks, stop 2, render - One heavy job at a time (renders, long ffmpeg, transcription): renders with `--workers 1`, ffmpeg with `-threads 2 -nostdin`. For a change, render only that window. -- Before a render likely to run past 20 minutes (3D at full quality, a long cut), say roughly how long it takes; while it runs, report its progress from the log rather than only that it has not finished. +- Before a render likely to run past 20 minutes (3D at full quality, a long cut), say roughly how long it takes; while it runs, report the elapsed time the log prints each minute. The cloud gives no frame count, so a 3D shot can sit at `rendering` for 20 minutes and still finish; don't kill it for that, and check a job you stopped waiting for with `npx hyperframes cloud get `. - Run REMIX.md's checks. Report each of our numbers beside the series' own: cuts a minute, pause density, longest hold, loudness, sound effects on picture changes, the script fingerprint. Name every check that failed. - **Stop 2:** ask once on the draft: a contact sheet and `npx hyperframes preview --background --no-open` (add `--port ` when 3002 is taken), with what is still a stand-in. - Then the one full render REMIX.md's delivery calls for. A render over 10 minutes starts detached and is watched through its log, because a render stops when the shell that started it exits: `bash -c 'set -m; HYPERFRAMES_RENDER_DETACHED=1 npx hyperframes render -o < /dev/null > render.log 2>&1 &'`.