import { rangeResponse, resolveClip, segmentFor } from "@/lib/report/serve.mjs"; export const dynamic = "force-dynamic"; // The BUILT segment for one clip — the mp4 with the header and the QR burned in. // // /api/report/raw serves the raw source window, which is what you edit against. // This serves what the renderer made of it, which is the only way to see the // attribution line as it will actually appear: the header is drawn by ffmpeg // from a text file, and no amount of HTML can promise it wrapped the same way. // // Names, never paths. A project id and a clip id, both members of the server's // own scan, and the file name is built from the id the timeline vouched for. // // A re-render writes the SAME path, so the client passes the mtime it was told // about as `v`. When it matches, the file is immutable for as long as that // number holds and may be cached hard; when it does not, the client is looking // at a stale idea of the file and the answer must not be cached at all. That is // what makes "re-render, then watch it" show the new cut rather than the old. // // Range support is not optional: without a 206 the