commit fc8756b746eb012264cb65a19f7817790f5dcf45
parent cab3e31ec1e61f10f8598d0d3c05a08c343d37da
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Sat, 17 Oct 2026 12:45:18 -0400
umtool: e2e — review-player and stored-url own their fixture data. The deck's first card cites its own source (vid9, vid1's first cues, its project's cached vid9_0.00-9.00.mp4): on vid1 it played the wider corpus window clip-bench's after-only fetch leaves (0.00-14.00). stored-url's no-stored-URL project is its own (stored-url-plain-fixture, one unfetched clip on vid10, which nothing fetches): editor-fetch-many-fixture's clips are fetched by report-fetch-via-editor first, so its "Fetch N unfetched clips" was gone
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
4 files changed, 59 insertions(+), 10 deletions(-)
diff --git a/umtool/e2e/fixtures/make-fixture.mjs b/umtool/e2e/fixtures/make-fixture.mjs
@@ -1077,6 +1077,36 @@ writeProject(
{ type: "clip", id: "s01", video: "odv1", start: 3.0, end: 6.0, cite: 3, section: 0, lock: true, quote: "its file address is on record" },
]),
);
+// ITS PLAIN TWIN: one unfetched clip on a source whose record stores no media
+// URL, for "a project whose records store none offers nothing". Its own project
+// and its own source (vid10), nobody else's: the spec used to borrow
+// editor-fetch-many-fixture, whose clips report-fetch-via-editor fetches first,
+// so the "Fetch N unfetched clips" button it looks beside was already gone.
+// Nothing ever fetches this one.
+{
+ const dir = path.join(CHANNELS, "testchan", "data", "vid10");
+ mkdirSync(dir, { recursive: true });
+ writeFileSync(
+ path.join(dir, "transcript.cues.json"),
+ JSON.stringify({
+ title: "Fixture source vid10",
+ uploadDate: "20250101",
+ channel: "Fixture Channel",
+ webpageUrl: "https://example.invalid/watch?v=vid10",
+ duration: 6,
+ cues: [
+ { start: 0, end: 3, text: "The plain fixture stores no file address." },
+ { start: 3, end: 6, text: "So no stored URL is offered." },
+ ],
+ }) + "\n",
+ );
+}
+writeProject(
+ "stored-url-plain-fixture",
+ manifest("stored-url-plain-fixture", "The Stored URL Plain Fixture", { siteOrigin: "https://archive.example" }, [
+ { type: "clip", id: "n01", video: "vid10", start: 0.0, end: 3.0, cite: 0, section: 0, lock: true, quote: "the plain fixture stores no file address" },
+ ]),
+);
// -- THE TAG FIXTURE ----------------------------------------------------------
//
diff --git a/umtool/e2e/fixtures/review-player-fixture.mjs b/umtool/e2e/fixtures/review-player-fixture.mjs
@@ -1,11 +1,14 @@
// What review-player.spec.ts walks (release 32 R1): the drafts review's
// audition deck over a cut whose first cited window is on disk and whose
-// second is not. Its own project and its own source (vid8), so a fetch here
-// never makes another spec's window "already cached".
+// second is not. Its own project and its own TWO sources (vid9, vid8): a
+// window in the corpus is keyed by video and shared by every project, so a
+// card on vid1 played whichever wider window another spec had fetched there
+// first (clip-bench's after-only fetch leaves vid1's 0.00-14.00), and a fetch
+// here must never make another spec's window "already cached".
//
// reports/review-player-fixture/
-// p01 on-screen text DRAFTED over vid1 3-6 s: the project's cached window
-// (out/clips-raw/vid1_0.00-9.00.mp4) plays it
+// p01 on-screen text DRAFTED over vid9 3-6 s: the project's cached window
+// (out/clips-raw/vid9_0.00-9.00.mp4, a copy of vid1's) plays it
// p02 on-screen text DRAFTED over vid8 3-6 s: nothing on disk until Fetch
// clip asks the editor stub, which writes the window into the corpus
// k01 a chapter card whose narration was DRAFTED: no clip, edited on the card
@@ -26,6 +29,21 @@ const write = (dir, name, doc) => {
* @param {{ reports: string, channels: string, manifest: Function, cachedWindow: string }} o
*/
export function makeReviewPlayerFixture({ reports, channels, manifest, cachedWindow }) {
+ // vid9: the first card's source, nobody else's. Its cues are vid1's first
+ // three, so the run-on quote at 3-6 s is the same seven words.
+ write(path.join(channels, "testchan", "data", "vid9"), "transcript.cues.json", {
+ title: "Fixture source vid9",
+ uploadDate: "20250101",
+ channel: "Fixture Channel",
+ webpageUrl: "https://example.invalid/watch?v=vid9",
+ duration: 9,
+ cues: [
+ { start: 0, end: 3, text: "This is a complete sentence." },
+ { start: 3, end: 6, text: "And this one runs on and because" },
+ { start: 6, end: 9, text: "of that it finishes here." },
+ ],
+ });
+
const rows = [
[0, 3, "The review fixture opens."],
[3, 6, "This is the sentence the second card cites."],
@@ -46,7 +64,7 @@ export function makeReviewPlayerFixture({ reports, channels, manifest, cachedWin
"video.manifest.json",
manifest("review-player-fixture", "The Review Player Fixture", { siteOrigin: "https://archive.example" }, [
{
- type: "clip", id: "p01", video: "vid1", start: 3.0, end: 6.0, cite: 3, section: 0, lock: true, quote: "And this one runs on and because",
+ type: "clip", id: "p01", video: "vid9", start: 3.0, end: 6.0, cite: 3, section: 0, lock: true, quote: "And this one runs on and because",
onscreen: { title: "On disk title" }, drafted: { onscreen: P("onscreen") },
},
{
@@ -60,6 +78,6 @@ export function makeReviewPlayerFixture({ reports, channels, manifest, cachedWin
]),
);
mkdirSync(path.join(dir, "out", "clips-raw"), { recursive: true });
- copyFileSync(cachedWindow, path.join(dir, "out", "clips-raw", path.basename(cachedWindow)));
+ copyFileSync(cachedWindow, path.join(dir, "out", "clips-raw", "vid9_0.00-9.00.mp4"));
return { dir };
}
diff --git a/umtool/e2e/review-player.spec.ts b/umtool/e2e/review-player.spec.ts
@@ -47,7 +47,7 @@ test("the audition deck: play the span, keep, fetch a missing clip, cut, undo, e
// Video first: the project's cached window, served with ranges.
await expect(card.locator("[data-play]")).toHaveAttribute("data-play", "window", { timeout: 15_000 });
const video = card.locator("video[data-player]");
- await expect(video).toHaveAttribute("src", /\/api\/report\/raw\?.*file=vid1_0\.00-9\.00\.mp4/);
+ await expect(video).toHaveAttribute("src", /\/api\/report\/raw\?.*file=vid9_0\.00-9\.00\.mp4/);
const res = await request.get((await video.getAttribute("src"))!, { headers: { range: "bytes=0-99" } });
expect(res.status()).toBe(206);
// The lit line: the quote, word by word.
diff --git a/umtool/e2e/stored-url.spec.ts b/umtool/e2e/stored-url.spec.ts
@@ -10,13 +10,14 @@ import * as urls from "./urls";
// cut from (an Odysee record's CDN file: e2e/fixtures/make-fixture.mjs,
// stored-url-fixture on testchan-odysee/odv1), off by default, and ticked it
// rides to the editor as `storedUrl: "fallback"` (the editor stub records it).
-// A project whose records store none offers nothing.
+// A project whose records store none offers nothing (stored-url-plain-fixture
+// on vid10: its own project and source, which nothing fetches).
// ---------------------------------------------------------------------------
const HERE = path.dirname(fileURLToPath(import.meta.url));
const FIXTURE = path.join(HERE, "..", ".e2e-song");
const STORED = "reports/stored-url-fixture";
-const PLAIN = "reports/editor-fetch-many-fixture";
+const PLAIN = "reports/stored-url-plain-fixture";
const STUB_LOG = path.join(FIXTURE, "editor-stub.requests.json");
const asked = (): Record<string, unknown>[] => {
try {
@@ -31,7 +32,7 @@ test("the stored-URL answer: a record that stores its CDN file, one that does no
expect(await yes.json()).toEqual({ stored: true, host: "player.odycdn.com", platform: "odysee" });
const clip = await request.get(`${baseURL}/api/cited/stored?project=${encodeURIComponent(STORED)}&clip=s01`);
expect((await clip.json()).stored).toBe(true);
- const no = await request.get(`${baseURL}/api/cited/stored?channel=testchan&video=vid4`);
+ const no = await request.get(`${baseURL}/api/cited/stored?channel=testchan&video=vid10`);
expect(await no.json()).toEqual({ stored: false });
});