Code-first video & image, rendered natively on WebGPU.
fix: surface storage refusals; render hint repeats the planned options
okanasl652cc57bdf01
diff --git a/apps/renderer-service/src/output/sinks.ts b/apps/renderer-service/src/output/sinks.tsindex 2398b5bb..477807ba 100644--- a/apps/renderer-service/src/output/sinks.ts+++ b/apps/renderer-service/src/output/sinks.ts@@ -220,12 +220,14 @@ export async function deliverPresigned((res.status === 403 || res.status === 400) &&/expired|Request has expired|AccessDenied/i.test(text)) {+ // AccessDenied also means keys that may not write the bucket: keep the body.throw new RenderError("UPLOAD_URL_EXPIRED",`The presigned URL was rejected (${res.status}).`,{phase: "upload",- hint: "Sign upload URLs with an expiry at least as long as the job timeout.",+ hint: "Sign upload URLs with an expiry at least as long as the job timeout, with keys that may write the bucket.",+ details: { body: redact(text.slice(0, 500)) },},);}diff --git a/packages/framefields/src/cli/cloud.ts b/packages/framefields/src/cli/cloud.tsindex 5a7fca68..36084383 100644--- a/packages/framefields/src/cli/cloud.ts+++ b/packages/framefields/src/cli/cloud.ts@@ -79,9 +79,7 @@ export async function runCloudRender(return 0;}if (result.status === "planned") {- log(- `Render it: framefields render ${o.entry} --cloud --workers ${o.workers ?? "auto"}`,- );+ log(`Render it: ${renderCommand(o)}`);return 0;}const bytes = result.output?.bytes;@@ -104,6 +102,23 @@ export async function runCloudRender(}}+/** The command that renders what `--plan` just planned: the same options, without `--plan`. */+export function renderCommand(o: CloudCliOptions): string {+ const flags: [string, string | undefined][] = [+ ["--export", o.export],+ ["--select", o.select],+ ["--workers", o.workers ?? "auto"],+ ["--max-workers", o.maxWorkers],+ ["--codec", o.codec],+ ["--quality", o.quality],+ ["--output", o.output],+ ];+ return [+ `framefields render ${o.entry} --cloud`,+ ...flags.filter(([, v]) => v !== undefined).map(([f, v]) => `${f} ${v}`),+ ].join(" ");+}+function parseWorkers(value: string | undefined): number | "auto" | undefined {if (value === undefined) return 1;if (value === "auto") return "auto";diff --git a/packages/framefields/src/cloud/cloud.test.ts b/packages/framefields/src/cloud/cloud.test.tsindex f1e387d5..a4382e92 100644--- a/packages/framefields/src/cloud/cloud.test.ts+++ b/packages/framefields/src/cloud/cloud.test.ts@@ -5,7 +5,13 @@ import type { AddressInfo } from "node:net";import os from "node:os";import path from "node:path";import { afterEach, beforeEach, describe, expect, it } from "vitest";-import { duration, narrator, progressLine, usd } from "../cli/cloud.js";+import {+ duration,+ narrator,+ progressLine,+ renderCommand,+ usd,+} from "../cli/cloud.js";import {CloudRenderError,type CloudRenderStatus,@@ -351,6 +357,15 @@ describe("render --cloud output", () => {]);});+ it("repeats the planned options in the command that renders the plan", () => {+ expect(+ renderCommand({ entry: "src/film.ts", export: "split", workers: "2" }),+ ).toBe("framefields render src/film.ts --cloud --export split --workers 2");+ expect(renderCommand({ entry: "src/film.ts" })).toBe(+ "framefields render src/film.ts --cloud --workers auto",+ );+ });+it("formats durations and money", () => {expect(duration(40)).toBe("40 s");expect(duration(14 * 60)).toBe("14 min");