// What draft-review.spec.ts reviews (release 28, M0): two report projects whose // fields carry drafted marks, so the badges, the review page, "Use this" and // the final build's refusal have something to act on. Their own, so the other // specs' projects are never touched. // // reports/draft-review-fixture/ writable, deck off, never built: // c01 on-screen text written BY HAND (the operator's), and an // alternative for it in onscreen-draft.json (a draft that was not // allowed to replace it) // c02 on-screen text DRAFTED by qwen3:8b // k01 a chapter card whose narration was DRAFTED // t01 a teaser whose lines were DRAFTED by claude-sonnet-5-5 // reports/draft-review-build-fixture/ two clips over the cached window, c02's // on-screen text DRAFTED: a final build refuses it until approved // // Synthetic, like every fixture. import { copyFileSync, mkdirSync, writeFileSync } from "node:fs"; import path from "node:path"; const AT = "2026-10-13T10:00:00.000Z"; const P = (task, model = "qwen3:8b") => ({ task, model, at: AT, iteration: 1, attempt: 1 }); const write = (dir, name, doc) => { mkdirSync(dir, { recursive: true }); writeFileSync(path.join(dir, name), JSON.stringify(doc, null, 2) + "\n"); }; /** * @param {{ reports: string, manifest: Function, cachedWindow: string }} o * `manifest` is make-fixture's manifest(slug, title, provenance, timeline); * `cachedWindow` the vid1 0-9 s window the build fixtures share. */ export function makeDraftReviewFixture({ reports, manifest, cachedWindow }) { const ui = path.join(reports, "draft-review-fixture"); write( ui, "video.manifest.json", manifest("draft-review-fixture", "The Draft Review Fixture", { siteOrigin: "https://archive.example" }, [ { type: "clip", id: "c01", video: "vid1", start: 3.0, end: 6.0, cite: 3, section: 0, lock: true, quote: "and because", onscreen: { title: "Hand title" } }, { type: "clip", id: "c02", video: "vid1", start: 9.0, end: 12.0, cite: 9, section: 0, lock: true, quote: "another whole sentence", onscreen: { title: "Drafted title" }, drafted: { onscreen: P("onscreen") }, }, { type: "card", id: "k01", style: "chapter", seconds: "auto", heading: "The county", narration: { text: "Half a year on, the county said yes." }, drafted: { narration: P("narrate") }, }, { type: "teaser", id: "t01", lines: ["Next Season", "The lease", "Spring 2027"], drafted: { lines: P("teaser", "claude-sonnet-5-5") }, }, ]), ); write(ui, "onscreen-draft.json", { task: "onscreen", model: "qwen3:8b", at: AT, article: "draft-review", iteration: 1, units: {}, checks: [], alternatives: [{ target: { entry: "c01", field: "onscreen" }, value: { title: "Kept aside title" }, provenance: P("onscreen"), reason: "operator" }], }); const build = path.join(reports, "draft-review-build-fixture"); write( build, "video.manifest.json", manifest("draft-review-build-fixture", "The Draft Review Build Fixture", { siteOrigin: "https://archive.example" }, [ { type: "clip", id: "c01", video: "vid1", start: 3.0, end: 6.0, cite: 3, section: 0, lock: true, quote: "and because" }, { type: "clip", id: "c02", video: "vid1", start: 9.0, end: 12.0, cite: 9, section: 0, lock: true, quote: "another whole sentence", onscreen: { title: "Drafted title" }, drafted: { onscreen: P("onscreen") }, }, ]), ); mkdirSync(path.join(build, "out", "clips-raw"), { recursive: true }); copyFileSync(cachedWindow, path.join(build, "out", "clips-raw", path.basename(cachedWindow))); return { ui, build }; }