commit 57dde30d95aa7d1bd00b892f8cf5e088b3156182
parent 0744a701b1082118b5eecba00fee0d25d02b016b
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 11 Nov 2026 10:50:54 -0500
umtool e2e: the editor stub answers a held window of another fixture's channel as cached (demo epic D1 item 7)
Draft everything's new cut-windows step asks the editor for the drafted
cut's windows; media-surfaces' msurf cut cites testchan/vid1, whose 0-14 s
window the fixture holds, and the stub 404'd every channel outside the
montage-ops set -- the chain stopped at cut-windows (both Draft everything
tests, the whole umtool run at 0744a701). A body whose other channels' windows
are all on disk is now answered cached, as the editor answers it; anything
else is a 404 as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat:
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/umtool/e2e/fixtures/editor-stub-fetch-windows.mjs b/umtool/e2e/fixtures/editor-stub-fetch-windows.mjs
@@ -8,7 +8,8 @@
// GET /api/jobs/<id>/log the job's log (ungated, as the editor's is): one line per window,
// ` ✗ <slug>/<id> <from>–<to> (<clipId>): network — … 403 …` for a refused one
//
-// Only the montage-ops fixture's channels are served (FETCH_WINDOWS_CHANNELS); any other body is a 404.
+// Only the montage-ops fixture's channels are served (FETCH_WINDOWS_CHANNELS); any other body is a 404,
+// unless each of its other channels' windows is already on disk (answered cached).
// A window already on disk (<CHANNELS_DIR>/<slug>/data/<id>/clips/<from>-<to>.mp4, or one that holds
// it) is cached. A video id starting `vrefuse` is the Rumble embed lookup answering 403: its window
// fails. Every other window is written (a real mp4, the stub's writeWindow) when its job finishes.
@@ -55,7 +56,11 @@ export function fetchWindowsRoute(req, res, url, { channels, json, readBody, wri
if (req.method === "POST" && url.pathname === "/api/ops/fetch-windows") {
readBody(req, (body) => {
record({ route: "fetch-windows", ...(body ?? {}) });
- if (Array.isArray(body?.items) && body.items.some((it) => !FETCH_WINDOWS_CHANNELS.has(String(it?.slug)))) {
+ // A channel of another fixture is a 404 -- unless every window asked of
+ // it is already on disk, which is answered cached as the editor answers
+ // it (demo epic D1: Draft everything's cut-windows step asks for the
+ // drafted cut's windows, and the msurf cut's are held).
+ if (Array.isArray(body?.items) && body.items.some((it) => !FETCH_WINDOWS_CHANNELS.has(String(it?.slug)) && !onDisk(channels, it))) {
return json(res, 404, { ok: false, error: "not found" });
}
if (!body?.requestedBy || !Array.isArray(body.items) || !body.items.length) return json(res, 400, { ok: false, error: "items and requestedBy are required" });