A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
Decision videos, phase 2: the Illustration switch and 11 silent clips (refs #434) (#454)
Eyal Golan673005467075
diff --git a/ASSETS.yaml b/ASSETS.yamlindex 1e0368fe5..6c0492bc3 100644--- a/ASSETS.yaml+++ b/ASSETS.yaml@@ -212,6 +212,81 @@ rules:licence: Copernicus-DEMsource: "tools/terrain_bake.py from the Copernicus DEM GLO-30-derived heightmap (unity/Assets/StreamingAssets/map/heightmap.*): AO, curvature, sky-view (Map/terrain_bake.png), coast distance (Map/coast.png) and the AO copy (Map/ao.png); the terrain water's mesh samples (Map/terrain_water.bytes, Editor TerrainWaterBake from the same heightmap); attribution in NOTICE"status: verified+ # --- Decision-card illustration loops: silent AI clips behind the Illustration switch (docs/event-videos.md; owner ruling D-V) ---+ # Made by tools/encode_event_videos.py from promo shots that are not in the repository (path and SHA-256 per row in+ # unity/Assets/Resources/EventVideos/event-videos.yaml). Rights: owner ruling D-V, 2026-10-13 (docs/oss/DECISIONS.md, merged in #449):+ # "no need to check, just use them"; it covers free, commercial and paid builds and accepts the Dreamina restriction (D-D).+ - glob: "unity/Assets/StreamingAssets/video/latrun_proposal.mp4"+ licence: CC0-1.0+ ai_generated: true+ source: "Veo 3.1 (ElevenLabs), from a GPT Image 2.5 still, generated 2026-10-12 (promo shot L14, promo/demo2/clips-v2/L14.mp4, not in the repository; sha256 f1e6c57c01ee4665c4e3948172c749973a2d335f83c65f8d8522f6f72706751b); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed"+ status: verified+ note: "Decision D1: AI-only output CC0 / no rights claimed. Owner ruling D-V (2026-10-13): the generator terms were not checked, by the owner's choice. Shown on the latrun_proposal card behind the Illustration switch, labelled 'AI-generated illustration', never in place of the archival photograph. No identifiable real person (frames checked 2026-10-14)."+ - glob: "unity/Assets/StreamingAssets/video/first_truce.mp4"+ licence: CC0-1.0+ ai_generated: true+ source: "Veo 3.1 Fast (ElevenLabs), generated 2026-10-12 (promo shot K03a, promo/demo3/clips/K03a.mp4, not in the repository; sha256 75156139ee81c1d6962d593e3f55a4f9233d9d2a0955b1d1dff5e7dc62431dcd); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed"+ status: verified+ note: "Decision D1: AI-only output CC0 / no rights claimed. Owner ruling D-V (2026-10-13): the generator terms were not checked, by the owner's choice. Shown on the first_truce card behind the Illustration switch, labelled 'AI-generated illustration', never in place of the archival photograph. No identifiable real person (frames checked 2026-10-14)."+ - glob: "unity/Assets/StreamingAssets/video/jerusalem_ceasefire.mp4"+ licence: CC0-1.0+ ai_generated: true+ source: "Veo 3.1 Fast (ElevenLabs), generated 2026-10-12 (promo shot K03b, promo/demo3/clips/K03b.mp4, not in the repository; sha256 a6a63909bd06e13a263de2d340552f6e5ee66d7b1f567335df7bc469c152f691); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed"+ status: verified+ note: "Decision D1: AI-only output CC0 / no rights claimed. Owner ruling D-V (2026-10-13): the generator terms were not checked, by the owner's choice. Shown on the jerusalem_ceasefire card behind the Illustration switch, labelled 'AI-generated illustration', never in place of the archival photograph. No identifiable real person (frames checked 2026-10-14)."+ - glob: "unity/Assets/StreamingAssets/video/operation_yoav.mp4"+ licence: CC0-1.0+ ai_generated: true+ source: "Veo 3.1 Fast (ElevenLabs), generated 2026-10-12 (promo shot W04a, promo/demo3/clips/W04a.mp4, not in the repository; sha256 26bf28dae5b96170057a5b4b894eff2d80c5f81503d53f4affad228055393d91); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed"+ status: verified+ note: "Decision D1: AI-only output CC0 / no rights claimed. Owner ruling D-V (2026-10-13): the generator terms were not checked, by the owner's choice. Shown on the operation_yoav card behind the Illustration switch, labelled 'AI-generated illustration', never in place of the archival photograph. No identifiable real person (frames checked 2026-10-14). SENSITIVE: the clip needs the owner's sensitivity review before a shareable build may carry it (sensitivity_reviewed in event-videos.yaml; Build.cs -shareable refuses until then)."+ - glob: "unity/Assets/StreamingAssets/video/maabarot_policy.mp4"+ licence: CC0-1.0+ ai_generated: true+ source: "Veo 3.1 Fast (ElevenLabs), generated 2026-10-12 (promo shot W05a, promo/demo3/clips/W05a.mp4, not in the repository; sha256 b3cd6cf07004c80ee89bf679ac89608ae6edd594a172b36b566a239e983bfecc); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed"+ status: verified+ note: "Decision D1: AI-only output CC0 / no rights claimed. Owner ruling D-V (2026-10-13): the generator terms were not checked, by the owner's choice. Shown on the maabarot_policy card behind the Illustration switch, labelled 'AI-generated illustration', never in place of the archival photograph. No identifiable real person (frames checked 2026-10-14)."+ - glob: "unity/Assets/StreamingAssets/video/frumkin_commission.mp4"+ licence: CC0-1.0+ ai_generated: true+ source: "Veo 3.1 Fast (ElevenLabs), generated 2026-10-12 (promo shot W05b, promo/demo3/clips/W05b.mp4, not in the repository; sha256 ea1b9fdce8f9499dec68a3d3cc61195e5ccea0156229e8fcd51f5abc44354461); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed"+ status: verified+ note: "Decision D1: AI-only output CC0 / no rights claimed. Owner ruling D-V (2026-10-13): the generator terms were not checked, by the owner's choice. Shown on the frumkin_commission card behind the Illustration switch, labelled 'AI-generated illustration', never in place of the archival photograph. No identifiable real person (frames checked 2026-10-14)."+ - glob: "unity/Assets/StreamingAssets/video/law_of_return.mp4"+ licence: CC0-1.0+ ai_generated: true+ source: "Veo 3.1 Fast (ElevenLabs), generated 2026-10-12 (promo shot K04a, promo/demo3/clips/K04a.mp4, not in the repository; sha256 5bb6e584eb57771bef155f4dcf2be847d1a8f50302b8dbffd30723806ab4a2b9); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed"+ status: verified+ note: "Decision D1: AI-only output CC0 / no rights claimed. Owner ruling D-V (2026-10-13): the generator terms were not checked, by the owner's choice. Shown on the law_of_return card behind the Illustration switch, labelled 'AI-generated illustration', never in place of the archival photograph. No identifiable real person (frames checked 2026-10-14)."+ - glob: "unity/Assets/StreamingAssets/video/hula_drainage.mp4"+ licence: CC0-1.0+ ai_generated: true+ source: "Veo 3.1 Fast (ElevenLabs), generated 2026-10-12 (promo shot W06, promo/demo3/clips/W06.mp4, not in the repository; sha256 39ea857ef8927780bb6fa874df72ef38450bb7f11e1b9b786f5db20cbecce379); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed"+ status: verified+ note: "Decision D1: AI-only output CC0 / no rights claimed. Owner ruling D-V (2026-10-13): the generator terms were not checked, by the owner's choice. Shown on the hula_drainage card behind the Illustration switch, labelled 'AI-generated illustration', never in place of the archival photograph. No identifiable real person (frames checked 2026-10-14)."+ - glob: "unity/Assets/StreamingAssets/video/austerity_1949.mp4"+ licence: CC0-1.0+ ai_generated: true+ source: "Seedance 2.0 (Dreamina); the Dreamina AI badge is kept, generated 2026-10-12 (promo shot A09, promo/demo2/clips/A09.mp4, not in the repository; sha256 79ab0b07145177d9899e1c39136e5e04c3f7ca8f0a310a7c905042fab1dc6cd2); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed"+ status: verified+ note: "Decision D1: AI-only output CC0 / no rights claimed. Owner ruling D-V (2026-10-13): the generator terms were not checked, by the owner's choice. Shown on the austerity_1949 card behind the Illustration switch, labelled 'AI-generated illustration', never in place of the archival photograph. No identifiable real person (frames checked 2026-10-14)."+ - glob: "unity/Assets/StreamingAssets/video/iraqi_exodus.mp4"+ licence: CC0-1.0+ ai_generated: true+ source: "Seedance 2.0 (Dreamina); the Dreamina AI badge is kept, generated 2026-10-12 (promo shot A07, promo/demo2/clips/A07.mp4, not in the repository; sha256 8b3fc06d8a7836e82896a9fd09a3b874dbfdd7f9eca9e7be63f70202630af783); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed"+ status: verified+ note: "Decision D1: AI-only output CC0 / no rights claimed. Owner ruling D-V (2026-10-13): the generator terms were not checked, by the owner's choice. Shown on the iraqi_exodus card behind the Illustration switch, labelled 'AI-generated illustration', never in place of the archival photograph. No identifiable real person (frames checked 2026-10-14)."+ - glob: "unity/Assets/StreamingAssets/video/ten_days.mp4"+ licence: CC0-1.0+ ai_generated: true+ source: "Veo 3.1 (ElevenLabs), from a GPT Image 2.5 still, generated 2026-10-13 (promo shot J09, promo/demo2/clips-v2/J09.mp4, not in the repository; sha256 7a1242da163d3fae432889643a64abf7fd9eff73d700cad978d30c0c32b6c571); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed"+ status: verified+ note: "Decision D1: AI-only output CC0 / no rights claimed. Owner ruling D-V (2026-10-13): the generator terms were not checked, by the owner's choice. Shown on the ten_days card behind the Illustration switch, labelled 'AI-generated illustration', never in place of the archival photograph. No identifiable real person (frames checked 2026-10-14). SENSITIVE: the clip needs the owner's sensitivity review before a shareable build may carry it (sensitivity_reviewed in event-videos.yaml; Build.cs -shareable refuses until then)."+ - glob: "tools/event_videos/ai-bug.png"+ licence: CC-BY-4.0+ ai_generated: true+ source: "The burned-in label 'AI-generated · נוצר בבינה מלאכותית' of the decision-card clips, rendered by tools/encode_event_videos.py --make-bug in Chrome for Testing from HTML written by an AI coding agent on 2026-10-14, set in EB Garamond and Frank Ruhl Libre (OFL, unity/Assets/UI/Fonts)"+ status: verified# --- Event-card header photographs: real archival photos, never AI (docs/event-images.md; owner rulings 2026-10-11) ---# Licences and artists re-read from each Commons file page on 2026-10-11; CC BY 4.0 credits are the licensor's credit# line from the page's licence template. The mapping and alt texts: unity/Assets/UI/EventImages/event-images.yaml.diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 8bda38be7..315a798e6 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -8,6 +8,12 @@ adds a line under **Unreleased**; CI's `Changelog` job checks this (see `CONTRIB## [Unreleased]### Added+- Decision videos, phase 2 (#434 follow-up). On 11 decision cards an Illustration switch over the photograph plays a+ short, silent AI-generated loop. It is labelled "AI-generated illustration" in place of the credit and carries a small+ burned-in bilingual label. The photograph always shows first; nothing plays until the player asks, and the choice holds+ for the session. Clips stream from StreamingAssets only when asked for, so boot is unchanged, and video is off in every+ automated run. A clip that fails puts the photograph back. Deport never gets any video. The two clips on war-casualty+ events wait for the owner's sensitivity review before a shareable build. Presentation only: no golden moves.- Portrait for Dov Yosef (refs #6): a Meitar Collection photograph (Benno Rothenberg, National Library of Israel, 1949) under CC BY 4.0, cropped, with its credit in `NOTICE`, on the extended `commons_licences.py` path from #30. Likeness check and the NLI confirmation before a paid release stay with the maintainer. Unity not run.- Portraits for Remez and Levin (refs #30): Government Press Office photographs, which Commons marks PD-Israel only, are replaced by Meitar Collection photographs (National Library of Israel, 1950 and 1949) under CC BY 4.0, cropped, with per-photo credits in `NOTICE`. `scripts/oss/commons_licences.py` now records an explicit Cc-by-4.0 file as `CC-BY-4.0` and marks it verified only with a named artist and a `NOTICE` entry; public domain, CC0 and the PD-Israel-only refusal are unchanged. Likeness check and the NLI confirmation before a paid release stay with the maintainer. Unity not run.- The website (`site/`, refs #393): a static Astro site in English (`/en/`) and Hebrew (`/he/`, right to left) with Home, Play, History, Sources, Media, Devlog, Contributors, How we make it, Press, Contribute and Privacy. Every image and video carries a visible label (in-engine capture with build and date, AI-generated concept art, or AI cinematic promo, not gameplay); the History and Sources pages show the events and sources from `content/` as they are. The in-engine images are the README's screenshots, read from `docs/images/build-*.jpg` and described in `docs/images/captures.yaml`, so retaking them updates the site. The cinematic trailer is hosted as one 720p H.264 encode, shown behind a click with captions in its own labelled section after the gameplay; a real gameplay clip listed in `captures.yaml` becomes the home page's muted hero loop, with a pause button. Self-hosted fonts and images, no analytics, no cookies and nothing loaded from another site. A `Site` workflow builds and checks it on pull requests; deploying to GitHub Pages waits for the owner.diff --git a/README.md b/README.mdindex 9c9da43bc..9316243d7 100644--- a/README.md+++ b/README.md@@ -138,7 +138,7 @@ You need Unity **6000.3.25f1 (6.3 LTS)** with Web Build Support; the exact versiThis project is built with heavy AI assistance, disclosed here using itch.io's categories:- **Code:** written with AI coding agents and reviewed through tests and review gates.-- **Graphics:** the concept and promo images in `promo/` are AI-generated, as is the start screen's painting, and the web page's tab icon was drawn with AI help. The game's terrain comes from real elevation data. The portraits are public-domain or CC0 photographs, and the event cards use archival photographs.+- **Graphics:** the concept and promo images in `promo/` are AI-generated, as is the start screen's painting, and the web page's tab icon was drawn with AI help. The game's terrain comes from real elevation data. The portraits are public-domain or CC0 photographs, and the event cards use archival photographs; on some cards an Illustration switch plays a short, silent AI-generated loop, labelled as such.- **Text:** event and content text was drafted with AI, and every fact is checked against the cited source.- **Sound:** none yet.diff --git a/docs/ai-disclosure.md b/docs/ai-disclosure.mdindex ca2a76d6e..bacecad25 100644--- a/docs/ai-disclosure.md+++ b/docs/ai-disclosure.md@@ -16,6 +16,7 @@ This is not a licence clearance or a completed store content survey. owner-verif| promo/start-screen/declaration-hall-option-*.png | ASSETS.yaml | Dreamina (dreamina.capcut.com), model GPT Image 2.5, 2026-10-12, 1536x864 as downloaded, with promo/final/03-gameplay-1936.png as the style reference; prompts in promo/start-screen/prompt-b.txt and -c.txt | owner-verify || site/public/favicon.svg | ASSETS.yaml | Original geometric drawing for the website's tab icon (a gold hexagon with a cream serif I on navy, after the game's own tab icon), written as SVG by an AI coding agent on 2026-10-13 | verified || site/src/assets/media/cinematic-trailer-1-poster.jpg | ASSETS.yaml | The frame at 3 s of the cinematic trailer published in README.md (the GitHub-hosted 1:23 video, the same cut as site/public/media/promo-trailer-720p.mp4; local file sha256 36322b1baca2df5248cb30dc3a36853566f7d8ef02d0d7cd07251fa0d6bffe4e), scaled to 1280 px with ffmpeg; the trailer was made with AI video tools from promo/final concept art | owner-verify |+| tools/event_videos/ai-bug.png | ASSETS.yaml | The burned-in label 'AI-generated · נוצר בבינה מלאכותית' of the decision-card clips, rendered by tools/encode_event_videos.py --make-bug in Chrome for Testing from HTML written by an AI coding agent on 2026-10-14, set in EB Garamond and Frank Ruhl Libre (OFL, unity/Assets/UI/Fonts) | verified || unity/Assets/UI/StartScreen/declaration-hall.jpg | ASSETS.yaml | ElevenLabs Image API (Pro plan, decision D5), model GPT Image 2.5 Sunburst (gpt-image-2.5-sunburst), 2K, quality high, 2026-10-12 (#268); the start screen's painting, native 2048x1152, saved as JPEG (quality 90), no upscale. Take 1: prompt promo/start-screen/prompt-d.txt, with the previous painting (this file as merged in #255: Dreamina option C, resized to 1920x1080) as the composition reference and promo/final/03-gameplay-1936.png as the style reference. Take 2 (used): prompt promo/start-screen/prompt-d-edit.txt, an edit of take 1 that changes only the row of figures at the table. The previous painting (Dreamina, #255) showed sunbeams through the windows | owner-verify || unity/Assets/WebGLTemplates/Statecraft/favicon.ico | ASSETS.yaml | Original geometric drawing for the WebGL page's tab icon (issue #47): a gold hexagon with a cream serif I on navy, in the loading page's colours; 16, 32 and 48 px; made 2026-10-11 for PR #169 | verified |@@ -24,3 +25,14 @@ This is not a licence clearance or a completed store content survey. owner-verif| Asset pattern | Manifest | Recorded source | Review status || --- | --- | --- | --- || site/public/media/promo-trailer-720p.mp4 | ASSETS.yaml | Web encodes of the cinematic trailer (demo 1), promo/demo/out/demo-16x9.mp4 (not in the repository; sha256 ef791cfbdca0868ae43d09157793d54558605cc9477547cf6231a088d9986951, 1920x1080, 83 s), scaled to 1280x720 with ffmpeg on 2026-10-13: H.264 [email protected], two-pass 660 kb/s, with AAC 96 kb/s; no other change. The same cut as the video in README.md (that upload is a separate export of it, sha256 36322b1b...). The trailer was made with AI video tools from promo/final concept art; its score is planned in promo/demo/MUSIC.md as an ElevenLabs Music cue (owner to confirm the score's source) | owner-verify |+| unity/Assets/StreamingAssets/video/austerity_1949.mp4 | ASSETS.yaml | Seedance 2.0 (Dreamina); the Dreamina AI badge is kept, generated 2026-10-12 (promo shot A09, promo/demo2/clips/A09.mp4, not in the repository; sha256 79ab0b07145177d9899e1c39136e5e04c3f7ca8f0a310a7c905042fab1dc6cd2); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed | verified |+| unity/Assets/StreamingAssets/video/first_truce.mp4 | ASSETS.yaml | Veo 3.1 Fast (ElevenLabs), generated 2026-10-12 (promo shot K03a, promo/demo3/clips/K03a.mp4, not in the repository; sha256 75156139ee81c1d6962d593e3f55a4f9233d9d2a0955b1d1dff5e7dc62431dcd); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed | verified |+| unity/Assets/StreamingAssets/video/frumkin_commission.mp4 | ASSETS.yaml | Veo 3.1 Fast (ElevenLabs), generated 2026-10-12 (promo shot W05b, promo/demo3/clips/W05b.mp4, not in the repository; sha256 ea1b9fdce8f9499dec68a3d3cc61195e5ccea0156229e8fcd51f5abc44354461); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed | verified |+| unity/Assets/StreamingAssets/video/hula_drainage.mp4 | ASSETS.yaml | Veo 3.1 Fast (ElevenLabs), generated 2026-10-12 (promo shot W06, promo/demo3/clips/W06.mp4, not in the repository; sha256 39ea857ef8927780bb6fa874df72ef38450bb7f11e1b9b786f5db20cbecce379); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed | verified |+| unity/Assets/StreamingAssets/video/iraqi_exodus.mp4 | ASSETS.yaml | Seedance 2.0 (Dreamina); the Dreamina AI badge is kept, generated 2026-10-12 (promo shot A07, promo/demo2/clips/A07.mp4, not in the repository; sha256 8b3fc06d8a7836e82896a9fd09a3b874dbfdd7f9eca9e7be63f70202630af783); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed | verified |+| unity/Assets/StreamingAssets/video/jerusalem_ceasefire.mp4 | ASSETS.yaml | Veo 3.1 Fast (ElevenLabs), generated 2026-10-12 (promo shot K03b, promo/demo3/clips/K03b.mp4, not in the repository; sha256 a6a63909bd06e13a263de2d340552f6e5ee66d7b1f567335df7bc469c152f691); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed | verified |+| unity/Assets/StreamingAssets/video/latrun_proposal.mp4 | ASSETS.yaml | Veo 3.1 (ElevenLabs), from a GPT Image 2.5 still, generated 2026-10-12 (promo shot L14, promo/demo2/clips-v2/L14.mp4, not in the repository; sha256 f1e6c57c01ee4665c4e3948172c749973a2d335f83c65f8d8522f6f72706751b); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed | verified |+| unity/Assets/StreamingAssets/video/law_of_return.mp4 | ASSETS.yaml | Veo 3.1 Fast (ElevenLabs), generated 2026-10-12 (promo shot K04a, promo/demo3/clips/K04a.mp4, not in the repository; sha256 5bb6e584eb57771bef155f4dcf2be847d1a8f50302b8dbffd30723806ab4a2b9); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed | verified |+| unity/Assets/StreamingAssets/video/maabarot_policy.mp4 | ASSETS.yaml | Veo 3.1 Fast (ElevenLabs), generated 2026-10-12 (promo shot W05a, promo/demo3/clips/W05a.mp4, not in the repository; sha256 b3cd6cf07004c80ee89bf679ac89608ae6edd594a172b36b566a239e983bfecc); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed | verified |+| unity/Assets/StreamingAssets/video/operation_yoav.mp4 | ASSETS.yaml | Veo 3.1 Fast (ElevenLabs), generated 2026-10-12 (promo shot W04a, promo/demo3/clips/W04a.mp4, not in the repository; sha256 26bf28dae5b96170057a5b4b894eff2d80c5f81503d53f4affad228055393d91); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed | verified |+| unity/Assets/StreamingAssets/video/ten_days.mp4 | ASSETS.yaml | Veo 3.1 (ElevenLabs), from a GPT Image 2.5 still, generated 2026-10-13 (promo shot J09, promo/demo2/clips-v2/J09.mp4, not in the repository; sha256 7a1242da163d3fae432889643a64abf7fd9eff73d700cad978d30c0c32b6c571); re-encoded 2026-10-14 by tools/encode_event_videos.py: 960x540, 24 fps, H.264 CRF 28, no audio, with the burned-in label tools/event_videos/ai-bug.png at the top left; nothing else changed | verified |diff --git a/docs/event-videos.md b/docs/event-videos.mdnew file mode 100644index 000000000..96f7921d0--- /dev/null+++ b/docs/event-videos.md@@ -0,0 +1,70 @@+# Decision-card illustration loops++On some decision cards, an **Illustration** switch over the photograph's top right corner plays a short, silent,+AI-generated loop in the 16:9 media header. Owner rulings of 2026-10-13 cover it (`reports/Video at decision+moments.md`, the "Full plan"; plan: `docs/superpowers/plans/2026-10-13-decision-videos.md`).++## Rules++- **The archival photograph comes first.** The card always opens on the photograph. The switch shows only for an event+ that has both a photograph and a clip, and only while the photograph is shown. A clip is never the only picture of a+ real event (`EventImageCatalog`; GDD: authentic images for history).+- **The clip is labelled twice.**+ - While it plays, "AI-generated illustration" replaces the photograph's credit, and the clip's own alt text becomes+ the header's tooltip.+ - The file carries a small burned-in label, "AI-generated · נוצר בבינה מלאכותית", so it says what it is even when it+ is downloaded on its own. The Dreamina shots also keep Dreamina's own "AI" badge (D-D).+- **Silent.** The clips have no audio stream (`tools/encode_event_videos.py` refuses one).+- **Opt-in.** Nothing plays until the player presses the switch, so the loop needs no separate pause button and no+ reduced-motion setting. Pressing the switch again stops it.+ - The choice holds for the session: later cards open on their clip until the player switches back.+ - It is not saved, and every launch starts on the photograph.+- **Deport never gets any video** (GDD owner ruling 1). `EventVideoMapping.Problems` refuses a row for an event with a+ deport option.+- **No recognisable real person** in any clip. Every frame sheet was checked before the clip was committed.+- **Sensitive events.** A clip on an event with a sensitive tag is `sensitive: true`. A `-shareable` build refuses it+ until the owner sets `sensitivity_reviewed: true` (`Build.ShareableRefusal`). Today that applies to `ten_days` (J09)+ and `operation_yoav` (W04a).+- **Rights:** owner ruling D-V (`docs/oss/DECISIONS.md`, merged in #449), "no need to check, just use them". Every clip has an+ `ASSETS.yaml` row with `ai_generated: true`, the generator and the date, and those rows feed `docs/ai-disclosure.md`.++## Where things are++| What | Where |+|---|---|+| The mapping: event, file, promo shot and its SHA-256, generator, date, alt text, sensitivity flags | `unity/Assets/Resources/EventVideos/event-videos.yaml` |+| The clips (960x540 H.264, about 0.4 to 1.5 MB each) | `unity/Assets/StreamingAssets/video/<event>.mp4` |+| The encode, pinned, and the burned-in label | `tools/encode_event_videos.py`, `tools/event_videos/ai-bug.png` |+| The player: one lazy VideoPlayer playing a URL into one 960x540 RenderTexture | `CardVideo` |+| The switch | `EventCardPresenter.ApplyIllustration` |++The mapping is **not game content**: the sim never reads it, and the goldens and the content hash cannot move for it+(`EventVideoTests.TheMappingIsNotGameContent`).++## Colour++In the game a clip looks slightly less saturated than its file: on the WebGL build, measured on the first-truce clip,+the mean HSV saturation was 71 in game and 83 in the file, and contrast was the same. This is the known colour-space+effect of Unity's Web video path: `Video.js` copies each frame into a texture and converts it for the project's Linear+colour space. It is accepted as is.++## Off in automated runs++Video is off in the smoke run, the golden check, `?shot`, the frame and pixel-error profiles, `?units` and+`?borderproof` (`CardVideo.ForcedOff`). In those runs the card has no switch at all, so captures and checks never depend+on decoding.++## When a clip fails++On the Web, a clip plays only from a URL in StreamingAssets, fetched when the player presses the switch and never at+boot. If it errors, or is not ready within 8 s, the card logs `VIDEO failed <url>: <why>`, puts the photograph and its+credit back, and drops the switch for that event for the rest of the session.++## Adding a clip++1. The event must have an archival photograph (`docs/event-images.md`), a shot with no recognisable real person, and no+ Deport option.+2. Add a row to `event-videos.yaml`, then run `uv run tools/encode_event_videos.py --root <checkout with promo/>+ --only <event>`.+3. Add its `ASSETS.yaml` row, then regenerate `docs/ai-disclosure.md` with `uv run scripts/oss/ai_disclosure.py+ --output docs/ai-disclosure.md`.diff --git a/tools/encode_event_videos.py b/tools/encode_event_videos.pynew file mode 100644index 000000000..bf18ee115--- /dev/null+++ b/tools/encode_event_videos.py@@ -0,0 +1,161 @@+# /// script+# requires-python = ">=3.11"+# dependencies = ["pillow==12.3.0", "pyyaml==6.0.3", "websockets==15.0.1"]+# ///+"""Makes the decision cards' silent illustration loops (unity/Assets/StreamingAssets/video/<file>) from the promo shots+listed in unity/Assets/Resources/EventVideos/event-videos.yaml (decision videos, owner ruling 2026-10-13; docs/event-videos.md).++The promo shots are not in the repository. Each row names its source (a path under promo/ in the checkout given by+--root, default this one; the shots are copied, never changed in place) and the source's+SHA-256, and the tool refuses a file that does not match, so it reproduces exactly what was reviewed. The encode is+pinned and is the only change besides the burned-in label:+ - scaled to cover 960x540 (Lanczos) and centre-cropped (the Dreamina shots are 1920x1088), 24 fps, H.264 High, CRF 28, preset slow, yuv420p, a keyframe every 2 s, faststart;+ - no audio stream (-an; the Dreamina shots carry a generated AAC track, which is dropped);+ - the small bilingual label "AI-generated · נוצר בבינה מלאכותית" (BUG, made by --make-bug in headless Chrome, so the+ Hebrew is laid out by the browser's bidi) over the top left corner, inside the 5% safe area, so the file says what+ it is even when it is downloaded on its own (the card shows "AI-generated illustration" too).+Every output is checked with ffprobe: one H.264 960x540 video stream, no audio, the moov box before mdat.++ uv run tools/encode_event_videos.py [--root CHECKOUT_WITH_PROMO] [--only EVENT ...]+ uv run tools/encode_event_videos.py --make-bug # remakes tools/event_videos/ai-bug.png+"""+from __future__ import annotations++import argparse+import hashlib+import json+import shutil+import subprocess+import sys+import tempfile+from pathlib import Path++import yaml++REPO = Path(__file__).resolve().parents[1]+MAPPING = REPO / "unity/Assets/Resources/EventVideos/event-videos.yaml"+OUT = REPO / "unity/Assets/StreamingAssets/video"+BUG = REPO / "tools/event_videos/ai-bug.png"+WIDTH, HEIGHT, FPS = 960, 540, 24+SAFE_X, SAFE_Y = 48, 27 # 5% of 960 and 540: the label's top left corner+FFMPEG_VIDEO = ["-c:v", "libx264", "-profile:v", "high", "-preset", "slow", "-crf", "28", "-pix_fmt", "yuv420p",+ "-g", str(2 * FPS), "-keyint_min", str(2 * FPS), "-sc_threshold", "0", "-an", "-movflags", "+faststart",+ "-map_metadata", "-1"]+LABEL_EN, LABEL_HE = "AI-generated", "נוצר בבינה מלאכותית"+++def load_rows(mapping: Path = MAPPING) -> list[dict]:+ return yaml.safe_load(mapping.read_text(encoding="utf-8"))["clips"]+++def sha256(path: Path) -> str:+ return hashlib.sha256(path.read_bytes()).hexdigest()+++def filter_graph() -> str:+ """Scale the shot, then lay the label over its top left corner."""+ return (f"[0:v]scale={WIDTH}:{HEIGHT}:force_original_aspect_ratio=increase:flags=lanczos,crop={WIDTH}:{HEIGHT},fps={FPS},setsar=1[v];"+ f"[v][1:v]overlay={SAFE_X}:{SAFE_Y}:format=auto[out]")+++def encode_command(src: Path, dst: Path, bug: Path = BUG) -> list[str]:+ return ["ffmpeg", "-hide_banner", "-loglevel", "error", "-y", "-i", str(src), "-i", str(bug),+ "-filter_complex", filter_graph(), "-map", "[out]", *FFMPEG_VIDEO, str(dst)]+++def probe(path: Path) -> dict:+ out = subprocess.run(["ffprobe", "-v", "error", "-show_entries", "stream=codec_type,codec_name,width,height",+ "-of", "json", str(path)], capture_output=True, text=True, check=True).stdout+ return json.loads(out)+++def problems(path: Path) -> list[str]:+ """What is wrong with an encoded clip: anything but one 960x540 H.264 stream and no audio, or moov after mdat."""+ found = []+ streams = probe(path).get("streams", [])+ video = [s for s in streams if s.get("codec_type") == "video"]+ if any(s.get("codec_type") == "audio" for s in streams):+ found.append("has an audio stream")+ if len(video) != 1 or video[0].get("codec_name") != "h264" or (video[0].get("width"), video[0].get("height")) != (WIDTH, HEIGHT):+ found.append(f"not one {WIDTH}x{HEIGHT} H.264 stream: {video}")+ data = path.read_bytes()+ if data.find(b"moov") < 0 or data.find(b"moov") > data.find(b"mdat"):+ found.append("moov is not before mdat (no faststart)")+ return found+++BUG_HTML = """<!doctype html><meta charset="utf-8"><style>+@font-face {{ font-family: "EB Garamond"; src: url("{en}"); }}+@font-face {{ font-family: "Frank Ruhl Libre"; src: url("{he}"); }}+html, body {{ margin: 0; background: transparent; }}+#bug {{ display: inline-block; padding: 2px 9px 3px 9px; border-radius: 9px; background: rgba(9, 14, 26, 0.62);+ color: rgba(243, 234, 216, 0.92); font: 15px "EB Garamond", serif; letter-spacing: 0.2px; white-space: nowrap; }}+#bug span[dir=rtl] {{ font-family: "Frank Ruhl Libre", serif; font-size: 14px; }}+</style><div id="bug"><span dir="ltr">{label_en}</span> · <span dir="rtl" lang="he">{label_he}</span></div>"""+++def make_bug(out: Path = BUG) -> Path:+ """Renders the label in Chrome for Testing over the DevTools protocol (tools/headed.py's Browser; the browser lays+ out the Hebrew), on a transparent page, and crops the screenshot to its pixels."""+ import asyncio+ import base64+ import io+ sys.path.insert(0, str(REPO / "tools"))+ import headed # noqa: E402+ from PIL import Image+ fonts = REPO / "unity/Assets/UI/Fonts"+ with tempfile.TemporaryDirectory() as tmp:+ for name, src in (("en.ttf", fonts / "EBGaramond-Regular.ttf"), ("he.ttf", fonts / "FrankRuhlLibre/FrankRuhlLibre-Medium.ttf")):+ shutil.copyfile(src, Path(tmp) / name)+ (Path(tmp) / "index.html").write_text(BUG_HTML.format(en="en.ttf", he="he.ttf", label_en=LABEL_EN, label_he=LABEL_HE), encoding="utf-8")++ async def shoot() -> bytes:+ async with headed.Browser(Path(tmp), port=8813, width=480, height=200, viewport=(480, 60), dpr=1) as b:+ sid = await b.open()+ await b.send("Emulation.setDefaultBackgroundColorOverride", {"color": {"r": 0, "g": 0, "b": 0, "a": 0}}, session=sid)+ await asyncio.sleep(2) # the fonts load+ return base64.b64decode((await b.send("Page.captureScreenshot", {"format": "png"}, session=sid))["data"])++ im = Image.open(io.BytesIO(asyncio.run(shoot()))).convert("RGBA")+ box = im.getchannel("A").getbbox()+ if box is None:+ raise RuntimeError("the label rendered empty")+ out.parent.mkdir(parents=True, exist_ok=True)+ im.crop(box).save(out, optimize=True)+ return out+++def main(argv: list[str] | None = None) -> int:+ ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)+ ap.add_argument("--only", action="append", default=[], help="event id (repeatable); default all rows")+ ap.add_argument("--make-bug", action="store_true", help="remake the burned-in label and stop")+ ap.add_argument("--out", type=Path, default=OUT)+ ap.add_argument("--root", type=Path, default=REPO, help="the checkout whose promo/ holds the source shots")+ a = ap.parse_args(argv)+ if a.make_bug:+ print(make_bug()); return 0+ if shutil.which("ffmpeg") is None or shutil.which("ffprobe") is None:+ print("ffmpeg and ffprobe are needed"); return 2+ rows = [r for r in load_rows() if not a.only or r["event"] in a.only]+ for r in rows: # check every source before writing anything+ src = a.root / r["source"]+ if not src.is_file():+ print(f"MISSING {src}"); return 1+ if sha256(src) != r["source_sha256"]:+ print(f"SHA-256 MISMATCH {src} (expected {r['source_sha256']})"); return 1+ a.out.mkdir(parents=True, exist_ok=True)+ for r in rows:+ dst = a.out / r["file"]+ with tempfile.TemporaryDirectory() as tmp: # the promo shot is read from a copy, never in place+ src = Path(tmp) / "src.mp4"+ shutil.copyfile(a.root / r["source"], src)+ subprocess.run(encode_command(src, dst), check=True)+ bad = problems(dst)+ if bad:+ print(f"BAD {dst}: {'; '.join(bad)}"); return 1+ print(f"{r['file']} {dst.stat().st_size} bytes")+ return 0+++if __name__ == "__main__":+ sys.exit(main())diff --git a/tools/event_videos/ai-bug.png b/tools/event_videos/ai-bug.pngnew file mode 100644index 000000000..4301549aaBinary files /dev/null and b/tools/event_videos/ai-bug.png differdiff --git a/tools/tests/test_encode_event_videos.py b/tools/tests/test_encode_event_videos.pynew file mode 100644index 000000000..bcb069298--- /dev/null+++ b/tools/tests/test_encode_event_videos.py@@ -0,0 +1,63 @@+"""tools/encode_event_videos.py: the decision-card clips are silent 960x540 H.264 with faststart, made only from the+promo shot each row names (by SHA-256), with the burned-in label; Deport and other content rules live in the Unity-side+EventVideoMapping tests."""+import shutil+import subprocess++import pytest++import encode_event_videos as ev++needs_ffmpeg = pytest.mark.skipif(shutil.which("ffmpeg") is None or shutil.which("ffprobe") is None, reason="ffmpeg not installed")+++def test_every_row_names_a_promo_shot_by_sha256_and_is_marked_ai():+ rows = ev.load_rows()+ assert len(rows) >= 10+ for r in rows:+ assert r["source"].startswith("promo/") and len(r["source_sha256"]) == 64+ assert r["file"] == r["event"] + ".mp4" and r["ai_generated"] is True+ assert (ev.OUT / r["file"]).is_file()+++def test_the_encode_is_pinned_silent_and_labelled():+ cmd = ev.encode_command(ev.BUG.parent / "in.mp4", ev.BUG.parent / "out.mp4")+ assert "-an" in cmd and "+faststart" in cmd and "libx264" in cmd and "28" in cmd+ graph = ev.filter_graph()+ assert "crop=960:540" in graph and f"overlay={ev.SAFE_X}:{ev.SAFE_Y}" in graph+ assert ev.BUG.is_file()+++def make(path, audio: bool, size="960x540"):+ cmd = ["ffmpeg", "-hide_banner", "-loglevel", "error", "-y", "-f", "lavfi", "-i", f"testsrc=size={size}:rate=24:duration=1"]+ if audio:+ cmd += ["-f", "lavfi", "-i", "sine=duration=1", "-c:a", "aac"]+ subprocess.run(cmd + ["-c:v", "libx264", "-pix_fmt", "yuv420p", "-movflags", "+faststart", str(path)], check=True)+++@needs_ffmpeg+def test_problems_refuses_audio_and_the_wrong_size(tmp_path):+ good, loud, small = tmp_path / "good.mp4", tmp_path / "loud.mp4", tmp_path / "small.mp4"+ make(good, audio=False); make(loud, audio=True); make(small, audio=False, size="640x360")+ assert ev.problems(good) == []+ assert any("audio" in p for p in ev.problems(loud))+ assert any("960x540" in p for p in ev.problems(small))+++@needs_ffmpeg+def test_every_shipped_clip_passes():+ for r in ev.load_rows():+ assert ev.problems(ev.OUT / r["file"]) == [], r["file"]+++def test_a_source_with_the_wrong_sha256_is_refused(tmp_path, capsys, monkeypatch):+ row = dict(ev.load_rows()[0])+ (tmp_path / "promo").mkdir()+ src = tmp_path / row["source"]+ src.parent.mkdir(parents=True, exist_ok=True)+ src.write_bytes(b"not the shot")+ monkeypatch.setattr(ev, "load_rows", lambda mapping=ev.MAPPING: [row])+ monkeypatch.setattr(ev.shutil, "which", lambda name: "/usr/bin/" + name)+ assert ev.main(["--root", str(tmp_path), "--out", str(tmp_path / "out")]) == 1+ assert "SHA-256 MISMATCH" in capsys.readouterr().out+ assert not (tmp_path / "out").exists() or not any((tmp_path / "out").iterdir())diff --git a/unity/Assets/Editor/Build.cs b/unity/Assets/Editor/Build.csindex f058244c7..d7e963599 100644--- a/unity/Assets/Editor/Build.cs+++ b/unity/Assets/Editor/Build.cs@@ -50,16 +50,20 @@ namespace Statecraft.Game.EditorTools/// <summary>Why a shareable build may not be made, or null: every event with a sensitive tag needs the owner's/// sensitivity review first (status sensitivity-reviewed; docs/m3-release.md, M3 final review I4), and so does every- /// sensitive event photograph the build would carry (EventImageCatalog; docs/event-images.md). See+ /// sensitive event photograph the build would carry (EventImageCatalog; docs/event-images.md), and every sensitive+ /// illustration clip (<paramref name="clips"/>, event-videos.yaml; docs/event-videos.md). See/// <see cref="EventImageRefusal"/> for <paramref name="catalogFileExists"/> and <paramref name="mapping"/>.</summary>public static string? ShareableRefusal(Statecraft.Sim.Content c, EventImageCatalog? photos, bool catalogFileExists = false,- IReadOnlyList<EventImageMapping.Row>? mapping = null)+ IReadOnlyList<EventImageMapping.Row>? mapping = null, IReadOnlyList<EventVideoMapping.Row>? clips = null){var open = Statecraft.Sim.ReleaseGate.SensitiveUnreviewed(c);var reasons = new List<string>();if (open.Count > 0)reasons.Add("a shareable build needs the owner's sensitivity review of: " + string.Join(", ", open) + " (set status: sensitivity-reviewed; see docs/m3-release.md)");if (EventImageRefusal(photos, catalogFileExists, mapping) is string pictures) reasons.Add(pictures);+ if (clips != null && EventVideoMapping.SensitiveUnreviewed(clips) is { Count: > 0 } openClips)+ reasons.Add("a shareable build needs the owner's sensitivity review of the illustration clips: " + string.Join(", ", openClips)+ + " (set sensitivity_reviewed: true in " + EventVideoMapping.Path + "; see docs/event-videos.md)");return reasons.Count == 0 ? null : string.Join("; ", reasons);}@@ -105,8 +109,8 @@ namespace Statecraft.Game.EditorTools/// <summary>The gate for a build made with these command-line args: a -shareable build (Web or Mac) is refused/// until the reviews are done; a dev build is never gated (web_check and the golden checks need them).</summary>public static string? GateRefusal(string[] args, Statecraft.Sim.Content c, EventImageCatalog? photos, bool catalogFileExists = false,- IReadOnlyList<EventImageMapping.Row>? mapping = null) =>- Array.IndexOf(args, "-shareable") >= 0 ? ShareableRefusal(c, photos, catalogFileExists, mapping) : null;+ IReadOnlyList<EventImageMapping.Row>? mapping = null, IReadOnlyList<EventVideoMapping.Row>? clips = null) =>+ Array.IndexOf(args, "-shareable") >= 0 ? ShareableRefusal(c, photos, catalogFileExists, mapping, clips) : null;/// <summary>Logs "BUILD REFUSED ..." and exits 1 when the gate refuses this build; true if it did. The photographs/// checked are the catalog the build ships (Resources/EventImageCatalog.asset), cross-checked against the mapping.</summary>@@ -119,11 +123,12 @@ namespace Statecraft.Game.EditorToolstry{var mapping = EventImageMapping.Parse(File.ReadAllText(EventImageMapping.Path));- refusal = GateRefusal(args, Statecraft.Sim.ContentLoader.Load(Paths.Content), photos, File.Exists(EventImageImport.CatalogPath), mapping);+ var clips = EventVideoMapping.Parse(File.ReadAllText(EventVideoMapping.Path)); // fails closed: a missing file is a refusal+ refusal = GateRefusal(args, Statecraft.Sim.ContentLoader.Load(Paths.Content), photos, File.Exists(EventImageImport.CatalogPath), mapping, clips);}catch (Exception e) when (e is IOException || e is InvalidOperationException || e is UnauthorizedAccessException){- refusal = "cannot read the event photograph mapping " + EventImageMapping.Path + ": " + e.Message;+ refusal = "cannot read the event photograph or clip mapping (" + EventImageMapping.Path + ", " + EventVideoMapping.Path + "): " + e.Message;}if (refusal == null) return false;Debug.LogError("BUILD REFUSED " + refusal);diff --git a/unity/Assets/Resources/EventVideos.meta b/unity/Assets/Resources/EventVideos.metanew file mode 100644index 000000000..02d45e3aa--- /dev/null+++ b/unity/Assets/Resources/EventVideos.meta@@ -0,0 +1,8 @@+fileFormatVersion: 2+guid: 4e9ef5cc7973e478f9a6837029c807a4+folderAsset: yes+DefaultImporter:+ externalObjects: {}+ userData:+ assetBundleName:+ assetBundleVariant:diff --git a/unity/Assets/Resources/EventVideos/event-videos.yaml b/unity/Assets/Resources/EventVideos/event-videos.yamlnew file mode 100644index 000000000..39287a52e--- /dev/null+++ b/unity/Assets/Resources/EventVideos/event-videos.yaml@@ -0,0 +1,135 @@+# Decision-card illustration loops: silent AI-generated clips behind the card's Illustration switch (decision videos, owner+# rulings 2026-10-13; docs/event-videos.md). The archival photograph always shows first; a clip is never the only picture+# of a real event, and an event without a photograph gets no clip.+# This file maps event ids to clips for the Unity card only. It is NOT game content: content/events/*.yaml feed the content+# hash and save compatibility, and this file must never move there (EventVideoMappingTests).+# Each row: the event id; the shipped file (unity/Assets/StreamingAssets/video/); the promo shot it is made from (a path+# under promo/, which is not in the repository) and its SHA-256; the generator; the date the shot was made (its file date);+# what it shows (the alt text, the switch's tooltip); and the sensitivity flags.+# sensitive: true rows may not ship in a -shareable build until sensitivity_reviewed: true (an OWNER step; Build.cs).+# Rights: owner ruling D-V (docs/oss/DECISIONS.md), "no need to check, just use them"; ai_generated: true on every row.+# Deport never gets a clip (GDD owner ruling 1): EventVideoMapping refuses a row for an event with a deport option.+# tools/encode_event_videos.py makes the files from the shots: 960x540 H.264, no audio, the burned-in label.+checked: 2026-10-14+clips:+ - event: latrun_proposal+ file: latrun_proposal.mp4+ shot: L14+ source: promo/demo2/clips-v2/L14.mp4+ source_sha256: f1e6c57c01ee4665c4e3948172c749973a2d335f83c65f8d8522f6f72706751b+ generator: "Veo 3.1 (ElevenLabs), from a GPT Image 2.5 still"+ generated: 2026-10-12+ alt: "Illustration: the police fort at Latrun on its hill above the road, smoke drifting across."+ ai_generated: true+ sensitive: false+ sensitivity_reviewed: false+ - event: first_truce+ file: first_truce.mp4+ shot: K03a+ source: promo/demo3/clips/K03a.mp4+ source_sha256: 75156139ee81c1d6962d593e3f55a4f9233d9d2a0955b1d1dff5e7dc62431dcd+ generator: "Veo 3.1 Fast (ElevenLabs)"+ generated: 2026-10-12+ alt: "Illustration: besieged Jerusalem, a water cart and a queue of people seen from behind."+ ai_generated: true+ sensitive: false+ sensitivity_reviewed: false+ - event: jerusalem_ceasefire+ file: jerusalem_ceasefire.mp4+ shot: K03b+ source: promo/demo3/clips/K03b.mp4+ source_sha256: a6a63909bd06e13a263de2d340552f6e5ee66d7b1f567335df7bc469c152f691+ generator: "Veo 3.1 Fast (ElevenLabs)"+ generated: 2026-10-12+ alt: "Illustration: a ration of water drawn from a cart's tap into a tin in a Jerusalem street."+ ai_generated: true+ sensitive: false+ sensitivity_reviewed: false+ - event: operation_yoav+ file: operation_yoav.mp4+ shot: W04a+ source: promo/demo3/clips/W04a.mp4+ source_sha256: 26bf28dae5b96170057a5b4b894eff2d80c5f81503d53f4affad228055393d91+ generator: "Veo 3.1 Fast (ElevenLabs)"+ generated: 2026-10-12+ alt: "Illustration: a shell-holed water tower over a Negev kibbutz, smoke on the horizon."+ ai_generated: true+ sensitive: true+ sensitivity_reviewed: false+ - event: maabarot_policy+ file: maabarot_policy.mp4+ shot: W05a+ source: promo/demo3/clips/W05a.mp4+ source_sha256: b3cd6cf07004c80ee89bf679ac89608ae6edd594a172b36b566a239e983bfecc+ generator: "Veo 3.1 Fast (ElevenLabs)"+ generated: 2026-10-12+ alt: "Illustration: a transit camp in the rain, a queue at the tap seen from behind."+ ai_generated: true+ sensitive: false+ sensitivity_reviewed: false+ - event: frumkin_commission+ file: frumkin_commission.mp4+ shot: W05b+ source: promo/demo3/clips/W05b.mp4+ source_sha256: ea1b9fdce8f9499dec68a3d3cc61195e5ccea0156229e8fcd51f5abc44354461+ generator: "Veo 3.1 Fast (ElevenLabs)"+ generated: 2026-10-12+ alt: "Illustration: a jerrycan filled at a tap in a muddy transit camp, tents behind."+ ai_generated: true+ sensitive: false+ sensitivity_reviewed: false+ - event: law_of_return+ file: law_of_return.mp4+ shot: K04a+ source: promo/demo3/clips/K04a.mp4+ source_sha256: 5bb6e584eb57771bef155f4dcf2be847d1a8f50302b8dbffd30723806ab4a2b9+ generator: "Veo 3.1 Fast (ElevenLabs)"+ generated: 2026-10-12+ alt: "Illustration: an immigrant ship crowded with passengers entering Haifa bay."+ ai_generated: true+ sensitive: false+ sensitivity_reviewed: false+ - event: hula_drainage+ file: hula_drainage.mp4+ shot: W06+ source: promo/demo3/clips/W06.mp4+ source_sha256: 39ea857ef8927780bb6fa874df72ef38450bb7f11e1b9b786f5db20cbecce379+ generator: "Veo 3.1 Fast (ElevenLabs)"+ generated: 2026-10-12+ alt: "Illustration: the Hula marsh at dawn, a dragline cutting a new channel."+ ai_generated: true+ sensitive: false+ sensitivity_reviewed: false+ - event: austerity_1949+ file: austerity_1949.mp4+ shot: A09+ source: promo/demo2/clips/A09.mp4+ source_sha256: 79ab0b07145177d9899e1c39136e5e04c3f7ca8f0a310a7c905042fab1dc6cd2+ generator: "Seedance 2.0 (Dreamina); the Dreamina AI badge is kept"+ generated: 2026-10-12+ alt: "Illustration: a queue at a grocer's in a seaside town, as under rationing."+ ai_generated: true+ sensitive: false+ sensitivity_reviewed: false+ - event: iraqi_exodus+ file: iraqi_exodus.mp4+ shot: A07+ source: promo/demo2/clips/A07.mp4+ source_sha256: 8b3fc06d8a7836e82896a9fd09a3b874dbfdd7f9eca9e7be63f70202630af783+ generator: "Seedance 2.0 (Dreamina); the Dreamina AI badge is kept"+ generated: 2026-10-12+ alt: "Illustration: an airliner on the apron at Lydda at dusk, families coming down the steps with suitcases."+ ai_generated: true+ sensitive: false+ sensitivity_reviewed: false+ - event: ten_days+ file: ten_days.mp4+ shot: J09+ source: promo/demo2/clips-v2/J09.mp4+ source_sha256: 7a1242da163d3fae432889643a64abf7fd9eff73d700cad978d30c0c32b6c571+ generator: "Veo 3.1 (ElevenLabs), from a GPT Image 2.5 still"+ generated: 2026-10-13+ alt: "Illustration: armoured cars of the Arab Legion climbing a road in the hills."+ ai_generated: true+ sensitive: true+ sensitivity_reviewed: falsediff --git a/unity/Assets/Resources/EventVideos/event-videos.yaml.meta b/unity/Assets/Resources/EventVideos/event-videos.yaml.metanew file mode 100644index 000000000..f24b613f6--- /dev/null+++ b/unity/Assets/Resources/EventVideos/event-videos.yaml.meta@@ -0,0 +1,7 @@+fileFormatVersion: 2+guid: 08579270c54b743bcb313af07215100a+TextScriptImporter:+ externalObjects: {}+ userData:+ assetBundleName:+ assetBundleVariant:diff --git a/unity/Assets/Scripts/UI/CardVideo.cs b/unity/Assets/Scripts/UI/CardVideo.csnew file mode 100644index 000000000..7efa3b1db--- /dev/null+++ b/unity/Assets/Scripts/UI/CardVideo.cs@@ -0,0 +1,121 @@+#nullable enable+using System;+using UnityEngine;+using UnityEngine.UIElements;+using UnityEngine.Video;++namespace Statecraft.Game.UI+{+ /// <summary>The decision card's silent illustration loop (decision videos, 2026-10-13): one VideoPlayer, made the first+ /// time a clip is asked for (never at boot), playing a clip from StreamingAssets by URL (the only source the Web player+ /// takes) into one reused 960x540 RenderTexture, which the media header shows as its background. Muted (the clips have+ /// no audio track), looping. A clip that fails (errorReceived) or is not prepared within PrepareTimeoutMs is stopped and+ /// reported once, and the card shows the photograph again. Presentation only.</summary>+ public sealed class CardVideo : IDisposable+ {+ public const int Width = 960, Height = 540;+ /// <summary>How long a clip may take to be ready before the card gives up on it.</summary>+ public const long PrepareTimeoutMs = 8000;++ GameObject? go; VideoPlayer? player; RenderTexture? rt;+ VisualElement? target; Action<string>? onFail; IVisualElementScheduledItem? timeout;++ /// <summary>Video is off in the automated runs (the smoke run, the golden check, the shot, frame and pixel-error+ /// profiles, the unit showcase and the border proof), so their captures and checks never depend on decoding: the+ /// card then has no Illustration switch at all. "nostart" (by hand) leaves it on. Flags as StartScreenPresenter.Skipped:+ /// a whole URL query parameter on WebGL, a command-line flag on desktop.</summary>+ public static bool ForcedOff(string? url, string[] args, bool webgl)+ {+ if (GameRoot.SmokeTurns(url, args, webgl) > 0) return true;+ var flags = new[] { "golden", "shot", "vprofile", "profile", "units", Statecraft.Game.Map.BorderProof.Flag };+ return webgl ? Array.Exists(flags, f => Boot.UrlFlags.Has(url, f)) : Array.Exists(flags, f => Array.IndexOf(args, "-" + f) >= 0);+ }++ public static bool ForcedOff() =>+ ForcedOff(Application.absoluteURL, Environment.GetCommandLineArgs(), Application.platform == RuntimePlatform.WebGLPlayer);++ /// <summary>The clip's URL in the build's StreamingAssets/video folder.</summary>+ public static string Url(string file) => Application.streamingAssetsPath + "/video/" + file;++ /// <summary>The URL playing (or being prepared), or null.</summary>+ public string? Current { get; private set; }++ /// <summary>True once the current clip's first frame is in the texture.</summary>+ public bool Showing { get; private set; }++ /// <summary>Plays <paramref name="url"/> into <paramref name="header"/>'s background; <paramref name="failed"/> is told+ /// (once) if it fails or times out. The header keeps whatever it shows until the first frame is ready.</summary>+ public void Play(string url, VisualElement header, Action<string> failed)+ {+ Stop();+ Ensure();+ target = header; onFail = failed; Current = url;+ player!.url = url;+ player.Prepare();+ timeout = header.schedule.Execute(() => { if (Current == url && !Showing) Fail("not ready after " + PrepareTimeoutMs + " ms"); }).StartingIn(PrepareTimeoutMs);+ }++ /// <summary>Puts the playing clip back on <paramref name="header"/>'s background (after the card reset it to the+ /// photograph); nothing while the clip is still being prepared.</summary>+ public void ShowIn(VisualElement header)+ {+ target = header;+ if (Showing) header.style.backgroundImage = new StyleBackground(Background.FromRenderTexture(rt));+ }++ /// <summary>Stops the clip; the header's background is the caller's to set back.</summary>+ public void Stop()+ {+ timeout?.Pause(); timeout = null;+ if (player != null) { player.Stop(); player.url = ""; }+ target = null; onFail = null; Current = null; Showing = false;+ }++ public void Dispose()+ {+ Stop();+ if (go != null) { if (Application.isPlaying) UnityEngine.Object.Destroy(go); else UnityEngine.Object.DestroyImmediate(go); }+ if (rt != null) { rt.Release(); if (Application.isPlaying) UnityEngine.Object.Destroy(rt); else UnityEngine.Object.DestroyImmediate(rt); }+ go = null; player = null; rt = null;+ }++ void Ensure()+ {+ if (player != null) return;+ rt = new RenderTexture(Width, Height, 0, RenderTextureFormat.ARGB32) { name = "CardVideo" };+ rt.Create();+ go = new GameObject("CardVideo");+ if (Application.isPlaying) UnityEngine.Object.DontDestroyOnLoad(go); // edit-mode tests make one too+ player = go.AddComponent<VideoPlayer>();+ player.playOnAwake = false;+ player.source = VideoSource.Url;+ player.renderMode = VideoRenderMode.RenderTexture;+ player.targetTexture = rt;+ player.audioOutputMode = VideoAudioOutputMode.None;+ player.isLooping = true;+ player.skipOnDrop = true;+ player.waitForFirstFrame = true;+ player.prepareCompleted += OnPrepared;+ player.errorReceived += OnError;+ }++ void OnPrepared(VideoPlayer p)+ {+ if (target == null) return;+ target.style.backgroundImage = new StyleBackground(Background.FromRenderTexture(rt));+ Showing = true;+ p.Play();+ Debug.Log("VIDEO playing " + Current);+ }++ void OnError(VideoPlayer p, string message) => Fail(message);++ void Fail(string why)+ {+ var told = onFail; var url = Current;+ Stop();+ Debug.LogWarning($"VIDEO failed {url}: {why}");+ told?.Invoke(why);+ }+ }+}diff --git a/unity/Assets/Scripts/UI/CardVideo.cs.meta b/unity/Assets/Scripts/UI/CardVideo.cs.metanew file mode 100644index 000000000..9315cd516--- /dev/null+++ b/unity/Assets/Scripts/UI/CardVideo.cs.meta@@ -0,0 +1,2 @@+fileFormatVersion: 2+guid: 0f23fc9e89bb44c3e82c9c6c0c8570ae\ No newline at end of filediff --git a/unity/Assets/Scripts/UI/EventCardPresenter.cs b/unity/Assets/Scripts/UI/EventCardPresenter.csindex 4a57dadf8..e18fb4e0a 100644--- a/unity/Assets/Scripts/UI/EventCardPresenter.cs+++ b/unity/Assets/Scripts/UI/EventCardPresenter.cs@@ -31,7 +31,7 @@ namespace Statecraft.Game.UIreadonly VisualElement card; readonly SimBridge bridge; readonly UiText text; readonly PortraitCatalog? portraits;readonly EventImageCatalog? photos;readonly VisualElement band, head, scroll, options, layer, hudRoot; readonly Label credit;- readonly Button hide, reopen;+ readonly Button hide, reopen, illustrationSwitch;readonly System.Action onHide, onReopen, onUncovered;readonly EventCallback<PointerDownEvent> onHidePointer;readonly EventCallback<NavigationSubmitEvent> onHideSubmit;@@ -40,14 +40,27 @@ namespace Statecraft.Game.UIbool hideByPointer;/// <summary>The session the card last showed: a new one (New Game, a load) forgets what was collapsed or focused.</summary>GameSession? session;+ readonly CardVideo? video; readonly System.Func<string, EventVideoMapping.Row?>? clipFor;+ /// <summary>The shown event's clip URL and its alt text, or null (none, video off, or it failed this session).</summary>+ string? clip, clipAlt;+ /// <summary>The player chose Illustration: kept for the session (not saved), so later cards open on their clip too.</summary>+ bool illustration;+ /// <summary>Events whose clip failed this session: they show the photograph and no switch.</summary>+ readonly System.Collections.Generic.HashSet<string> failed = new System.Collections.Generic.HashSet<string>();+ readonly System.Action onSwitch;/// <summary>The event the player collapsed the card on (Hide), or null; a different event opens the card again.</summary>string? collapsedFor;/// <summary>The event whose first option last took the focus, so an event already open never takes it again.</summary>string? focusedFor;float appliedWidth = float.NaN;- public EventCardPresenter(VisualElement root, SimBridge bridge, UiText text, PortraitCatalog? portraits, EventImageCatalog? photos = null)+ /// <param name="video">The illustration loop's player, or null when video is off (CardVideo.ForcedOff): then the+ /// card never offers the Illustration switch.</param>+ /// <param name="clipFor">An event's clip (event-videos.yaml), or null when it has none.</param>+ public EventCardPresenter(VisualElement root, SimBridge bridge, UiText text, PortraitCatalog? portraits, EventImageCatalog? photos = null,+ CardVideo? video = null, System.Func<string, EventVideoMapping.Row?>? clipFor = null){+ this.video = clipFor == null ? null : video; this.clipFor = clipFor;card = root.Q<VisualElement>("event-card"); this.bridge = bridge; this.text = text; this.portraits = portraits; this.photos = photos;band = card.Q<VisualElement>("event-photo"); credit = card.Q<Label>("event-photo-credit");// The band and its credit settle the drop (FitPhoto); the column, which only the window sizes, brings a dropped@@ -73,6 +86,9 @@ namespace Statecraft.Game.UI// A start screen or a screen that covered the layer has closed (ScreenNav.DisableCovered): the open card takes// the focus it could not take under it.ScreenNav.OnUncovered(layer, onUncovered);+ illustrationSwitch = card.Q<Button>("event-illustration");+ onSwitch = () => { illustration = !illustration; ApplyIllustration(); };+ illustrationSwitch.clicked += onSwitch;foreach (var e in new[] { band, credit, head, scroll, options }) e.RegisterCallback<GeometryChangedEvent>(OnPhotoGeometry);layer.RegisterCallback<GeometryChangedEvent>(OnColumnGeometry);card.RegisterCallback<GeometryChangedEvent>(OnCardGeometry);@@ -88,6 +104,8 @@ namespace Statecraft.Game.UIhide.UnregisterCallback(onHidePointer, TrickleDown.TrickleDown); hide.UnregisterCallback(onHideSubmit, TrickleDown.TrickleDown);card.UnregisterCallback(onCancel);ScreenNav.OnUncovered(layer, null);+ illustrationSwitch.clicked -= onSwitch;+ video?.Stop();foreach (var e in new[] { band, credit, head, scroll, options }) e.UnregisterCallback<GeometryChangedEvent>(OnPhotoGeometry);layer.UnregisterCallback<GeometryChangedEvent>(OnColumnGeometry);card.UnregisterCallback<GeometryChangedEvent>(OnCardGeometry);@@ -145,12 +163,15 @@ namespace Statecraft.Game.UIreopen.style.display = Collapsed ? DisplayStyle.Flex : DisplayStyle.None;hudRoot.EnableInClassList(OpenClass, shown);ScreenNav.DisableCovered(hudRoot);- if (Shown == null) { ShowPhoto(null); return; }+ if (Shown == null || Collapsed) video?.Stop();+ if (Shown == null) { clip = null; clipAlt = null; ShowPhoto(null); return; }var e = Shown;var date = EventSystem.FillDate(e, s.Date);var holder = e.Office == "" ? null : Cabinet.Holder(c, s, e.Office, date);// The header photograph when the event has one; otherwise the minister's portrait plate (the fallback).var photo = photos?.Find(e.Id);+ var row = video != null && photo != null && !failed.Contains(e.Id) ? clipFor!(e.Id) : null;+ clip = row == null ? null : CardVideo.Url(row.File); clipAlt = row?.Alt;ShowPhoto(photo);var image = card.Q<VisualElement>("event-image");var entry = photo == null ? portraits?.Find(holder?.Id) : null;@@ -215,8 +236,37 @@ namespace Statecraft.Game.UIband.tooltip = photo?.alt ?? "";PhotoAlt = photo?.alt;ApplyMediaHeight();+ ApplyIllustration();}+ /// <summary>The Illustration switch: shown only when the event has a clip and its photograph shows (the clip is never+ /// the only picture of a real event). On, the header plays the clip, labelled "AI-generated illustration" in place+ /// of the photograph's credit; off, or when the clip fails, the photograph and its credit come back.</summary>+ void ApplyIllustration()+ {+ var offered = clip != null && PhotoAlt != null && !Collapsed;+ illustrationSwitch.style.display = offered ? DisplayStyle.Flex : DisplayStyle.None;+ if (offered && illustration)+ {+ illustrationSwitch.text = text["event.photo"];+ credit.text = text["event.ai_label"];+ band.tooltip = clipAlt ?? "";+ if (video!.Current != clip) { var id = Shown!.Id; video.Play(clip!, band, _ => { failed.Add(id); Render(); }); }+ else video.ShowIn(band);+ return;+ }+ illustrationSwitch.text = text["event.illustration"];+ if (video?.Current != null)+ {+ video.Stop();+ if (current != null && PhotoAlt != null) band.style.backgroundImage = new StyleBackground(current.Value.image);+ }+ if (current != null) { credit.text = current.Value.credit; if (PhotoAlt != null) band.tooltip = current.Value.alt; }+ }++ /// <summary>True while the header plays the event's clip (or is preparing it).</summary>+ public bool IllustrationShown => video?.Current != null;+/// <summary>The playtest 2 P2-3 line (UiLayoutTests): in a window at least this tall (logically) the body and the/// options of every event fit without scrolling. The media header gives way first on every window/// (ApplyMediaHeight), so below it the body scrolls only once the photograph is dropped.</summary>diff --git a/unity/Assets/Scripts/UI/EventVideoMapping.cs b/unity/Assets/Scripts/UI/EventVideoMapping.csnew file mode 100644index 000000000..7c5f19149--- /dev/null+++ b/unity/Assets/Scripts/UI/EventVideoMapping.cs@@ -0,0 +1,96 @@+#nullable enable+using System;+using System.Collections.Generic;+using System.Linq;+using Statecraft.Sim;+using UnityEngine;+using YamlDotNet.Serialization;+using YamlDotNet.Serialization.NamingConventions;++namespace Statecraft.Game.UI+{+ /// <summary>Reads and checks Assets/Resources/EventVideos/event-videos.yaml, the event -> illustration clip mapping+ /// (decision videos, owner rulings 2026-10-13; docs/event-videos.md). A Unity-side file, never part of the hashed game+ /// content. The game reads it from Resources at start (Load); the clips themselves are in StreamingAssets/video and are+ /// fetched by URL only when the player asks for one (CardVideo).</summary>+ public static class EventVideoMapping+ {+ public const string ResourcePath = "EventVideos/event-videos";+ public const string Path = "Assets/Resources/EventVideos/event-videos.yaml";+ public const string ClipFolder = "Assets/StreamingAssets/video";++ public sealed class Row+ {+ public string Event { get; set; } = "";+ public string File { get; set; } = "";+ public string Shot { get; set; } = "";+ public string Source { get; set; } = "";+ public string SourceSha256 { get; set; } = "";+ public string Generator { get; set; } = "";+ public string Generated { get; set; } = "";+ public string Alt { get; set; } = "";+ public bool AiGenerated { get; set; }+ public bool Sensitive { get; set; }+ public bool SensitivityReviewed { get; set; }+ }++ sealed class Doc+ {+ public string Checked { get; set; } = "";+ public List<Row> Clips { get; set; } = new List<Row>();+ }++ /// <summary>Parses the mapping. Throws InvalidOperationException naming the file on malformed YAML or unknown keys.</summary>+ public static IReadOnlyList<Row> Parse(string yaml)+ {+ try+ {+ var doc = new DeserializerBuilder().WithNamingConvention(UnderscoredNamingConvention.Instance)+ .WithDuplicateKeyChecking().Build().Deserialize<Doc>(yaml ?? "");+ return doc?.Clips ?? new List<Row>();+ }+ catch (YamlDotNet.Core.YamlException e) { throw new InvalidOperationException($"{Path}: {e.Message}", e); }+ }++ /// <summary>The shipped mapping, or no rows when it is missing.</summary>+ public static IReadOnlyList<Row> Load()+ {+ var asset = Resources.Load<TextAsset>(ResourcePath);+ return asset == null ? Array.Empty<Row>() : Parse(asset.text);+ }++ /// <summary>Every problem with the rows (empty when the mapping is sound): an unknown or repeated event; an event+ /// with a deport option (Deport never gets any video: GDD owner ruling 1, CONTENT_POLICY section 4); an event with no+ /// archival photograph (a clip is never the only picture of a real event); a file that is not <event>.mp4 or is+ /// missing; a row not marked ai_generated, or without its source, SHA-256, generator, date or alt text; and an event+ /// with a sensitive tag whose clip is not marked sensitive.</summary>+ public static List<string> Problems(IReadOnlyList<Row> rows, Content content, Func<string, bool> hasPhoto, Func<string, bool> fileExists)+ {+ var problems = new List<string>();+ var events = content.Events.ToDictionary(e => e.Id);+ var sensitiveEvents = new HashSet<string>(ReleaseGate.SensitiveEvents(content));+ foreach (var g in rows.GroupBy(r => r.Event).Where(g => g.Count() > 1)) problems.Add($"{g.Key}: more than one row");+ foreach (var r in rows)+ {+ if (!events.TryGetValue(r.Event, out var ev)) { problems.Add($"{r.Event}: no such event"); continue; }+ if (ev.Options.Any(o => o.Id.IndexOf("deport", StringComparison.OrdinalIgnoreCase) >= 0))+ problems.Add($"{r.Event}: has a deport option; Deport never gets any video");+ if (!hasPhoto(r.Event)) problems.Add($"{r.Event}: has no archival photograph; a clip is never the only picture of an event");+ if (r.File != r.Event + ".mp4") problems.Add($"{r.Event}: file must be {r.Event}.mp4 (got '{r.File}')");+ else if (!fileExists(r.File)) problems.Add($"{r.Event}: {ClipFolder}/{r.File} missing (run tools/encode_event_videos.py)");+ if (!r.AiGenerated) problems.Add($"{r.Event}: ai_generated must be true");+ if (!r.Source.StartsWith("promo/", StringComparison.Ordinal)) problems.Add($"{r.Event}: source must be a promo shot");+ if (r.SourceSha256.Length != 64) problems.Add($"{r.Event}: source_sha256 missing");+ if (r.Generator.Trim() == "" || r.Generated.Trim() == "") problems.Add($"{r.Event}: generator or date missing");+ if (!r.Alt.StartsWith("Illustration: ", StringComparison.Ordinal) || r.Alt.Length < 30) problems.Add($"{r.Event}: alt text must start 'Illustration: ' and say what it shows");+ if (sensitiveEvents.Contains(ev.Id) && !r.Sensitive) problems.Add($"{r.Event}: the event has a sensitive tag, so its clip must be sensitive: true");+ if (r.SensitivityReviewed && !r.Sensitive) problems.Add($"{r.Event}: sensitivity_reviewed without sensitive");+ }+ return problems;+ }++ /// <summary>The events whose clip is sensitive and not yet sensitivity-reviewed, in id order.</summary>+ public static IReadOnlyList<string> SensitiveUnreviewed(IReadOnlyList<Row> rows) =>+ rows.Where(r => r.Sensitive && !r.SensitivityReviewed).Select(r => r.Event).OrderBy(x => x, StringComparer.Ordinal).ToList();+ }+}diff --git a/unity/Assets/Scripts/UI/EventVideoMapping.cs.meta b/unity/Assets/Scripts/UI/EventVideoMapping.cs.metanew file mode 100644index 000000000..e4b142664--- /dev/null+++ b/unity/Assets/Scripts/UI/EventVideoMapping.cs.meta@@ -0,0 +1,2 @@+fileFormatVersion: 2+guid: 66567032fb26e4ef99e20d32e24f009b\ No newline at end of filediff --git a/unity/Assets/Scripts/UI/GameRoot.cs b/unity/Assets/Scripts/UI/GameRoot.csindex 67c03baeb..af4c424fa 100644--- a/unity/Assets/Scripts/UI/GameRoot.cs+++ b/unity/Assets/Scripts/UI/GameRoot.cs@@ -145,7 +145,11 @@ namespace Statecraft.Game.UIOwn(new PointerBlur(root)); // a mouse click leaves no focus fill behind (keyboard keeps it)Own(new NavigationGuard(root)); // the camera keys (WASD, arrows) never move UI focus (B6)if (DiagLog.Nav) Own(new NavEventLog(root)); // ?navlog: every UI pointer/submit event (playtest 2, P2-4)- card = Own(new EventCardPresenter(root, bridge, text, portraits, EventImageCatalog.Load())); // event photos: Resources, no scene field+ // The Illustration switch's silent loops (event-videos.yaml, Resources): none in the automated runs (CardVideo.ForcedOff).+ var video = CardVideo.ForcedOff() ? null : Own(new CardVideo());+ var clips = video == null ? null : EventVideoMapping.Load().ToDictionary(r => r.Event);+ card = Own(new EventCardPresenter(root, bridge, text, portraits, EventImageCatalog.Load(), video,+ clips == null ? null : id => clips.TryGetValue(id, out var r) ? r : null)); // event photos: Resources, no scene fieldOwn(new DefencePresenter(root, bridge, text, portraits));Own(new BudgetPresenter(root, bridge, text));Own(new WhyPresenter(root, bridge, text));diff --git a/unity/Assets/StreamingAssets/video.meta b/unity/Assets/StreamingAssets/video.metanew file mode 100644index 000000000..a7cd17385--- /dev/null+++ b/unity/Assets/StreamingAssets/video.meta@@ -0,0 +1,8 @@+fileFormatVersion: 2+guid: 954e4bd78ec6f47f78b712774cfb65e2+folderAsset: yes+DefaultImporter:+ externalObjects: {}+ userData:+ assetBundleName:+ assetBundleVariant:diff --git a/unity/Assets/StreamingAssets/video/austerity_1949.mp4 b/unity/Assets/StreamingAssets/video/austerity_1949.mp4new file mode 100644index 000000000..a8717848aBinary files /dev/null and b/unity/Assets/StreamingAssets/video/austerity_1949.mp4 differdiff --git a/unity/Assets/StreamingAssets/video/austerity_1949.mp4.meta b/unity/Assets/StreamingAssets/video/austerity_1949.mp4.metanew file mode 100644index 000000000..65e6a0423--- /dev/null+++ b/unity/Assets/StreamingAssets/video/austerity_1949.mp4.meta@@ -0,0 +1,7 @@+fileFormatVersion: 2+guid: 28e84861f97884f90a7228ae5a2afff5+DefaultImporter:+ externalObjects: {}+ userData:+ assetBundleName:+ assetBundleVariant:diff --git a/unity/Assets/StreamingAssets/video/first_truce.mp4 b/unity/Assets/StreamingAssets/video/first_truce.mp4new file mode 100644index 000000000..1aecc56bdBinary files /dev/null and b/unity/Assets/StreamingAssets/video/first_truce.mp4 differdiff --git a/unity/Assets/StreamingAssets/video/first_truce.mp4.meta b/unity/Assets/StreamingAssets/video/first_truce.mp4.metanew file mode 100644index 000000000..4c86ecbdb--- /dev/null+++ b/unity/Assets/StreamingAssets/video/first_truce.mp4.meta@@ -0,0 +1,7 @@+fileFormatVersion: 2+guid: 4b9a039d7ad1a4e2fbed97f43cc8a0d1+DefaultImporter:+ externalObjects: {}+ userData:+ assetBundleName:+ assetBundleVariant:diff --git a/unity/Assets/StreamingAssets/video/frumkin_commission.mp4 b/unity/Assets/StreamingAssets/video/frumkin_commission.mp4new file mode 100644index 000000000..91ac3a39cBinary files /dev/null and b/unity/Assets/StreamingAssets/video/frumkin_commission.mp4 differdiff --git a/unity/Assets/StreamingAssets/video/frumkin_commission.mp4.meta b/unity/Assets/StreamingAssets/video/frumkin_commission.mp4.metanew file mode 100644index 000000000..32b987b9f--- /dev/null+++ b/unity/Assets/StreamingAssets/video/frumkin_commission.mp4.meta@@ -0,0 +1,7 @@+fileFormatVersion: 2+guid: baa584465c7d44104a95749d5e615678+DefaultImporter:+ externalObjects: {}+ userData:+ assetBundleName:+ assetBundleVariant:diff --git a/unity/Assets/StreamingAssets/video/hula_drainage.mp4 b/unity/Assets/StreamingAssets/video/hula_drainage.mp4new file mode 100644index 000000000..d6866f105Binary files /dev/null and b/unity/Assets/StreamingAssets/video/hula_drainage.mp4 differdiff --git a/unity/Assets/StreamingAssets/video/hula_drainage.mp4.meta b/unity/Assets/StreamingAssets/video/hula_drainage.mp4.metanew file mode 100644index 000000000..6e963f9be--- /dev/null+++ b/unity/Assets/StreamingAssets/video/hula_drainage.mp4.meta@@ -0,0 +1,7 @@+fileFormatVersion: 2+guid: 99989019d47d346559a19b6ae30a38cb+DefaultImporter:+ externalObjects: {}+ userData:+ assetBundleName:+ assetBundleVariant:diff --git a/unity/Assets/StreamingAssets/video/iraqi_exodus.mp4 b/unity/Assets/StreamingAssets/video/iraqi_exodus.mp4new file mode 100644index 000000000..49de89df1Binary files /dev/null and b/unity/Assets/StreamingAssets/video/iraqi_exodus.mp4 differdiff --git a/unity/Assets/StreamingAssets/video/iraqi_exodus.mp4.meta b/unity/Assets/StreamingAssets/video/iraqi_exodus.mp4.metanew file mode 100644index 000000000..c57e0a7c2--- /dev/null+++ b/unity/Assets/StreamingAssets/video/iraqi_exodus.mp4.meta@@ -0,0 +1,7 @@+fileFormatVersion: 2+guid: 7af1310c2f423447986dfa8e843715d3+DefaultImporter:+ externalObjects: {}+ userData:+ assetBundleName:+ assetBundleVariant:diff --git a/unity/Assets/StreamingAssets/video/jerusalem_ceasefire.mp4 b/unity/Assets/StreamingAssets/video/jerusalem_ceasefire.mp4new file mode 100644index 000000000..be195cb91Binary files /dev/null and b/unity/Assets/StreamingAssets/video/jerusalem_ceasefire.mp4 differdiff --git a/unity/Assets/StreamingAssets/video/jerusalem_ceasefire.mp4.meta b/unity/Assets/StreamingAssets/video/jerusalem_ceasefire.mp4.metanew file mode 100644index 000000000..0df6d29e6--- /dev/null+++ b/unity/Assets/StreamingAssets/video/jerusalem_ceasefire.mp4.meta@@ -0,0 +1,7 @@+fileFormatVersion: 2+guid: d075c5cb058b14051aec56c9aa8f96a0+DefaultImporter:+ externalObjects: {}+ userData:+ assetBundleName:+ assetBundleVariant:diff --git a/unity/Assets/StreamingAssets/video/latrun_proposal.mp4 b/unity/Assets/StreamingAssets/video/latrun_proposal.mp4new file mode 100644index 000000000..be162916cBinary files /dev/null and b/unity/Assets/StreamingAssets/video/latrun_proposal.mp4 differdiff --git a/unity/Assets/StreamingAssets/video/latrun_proposal.mp4.meta b/unity/Assets/StreamingAssets/video/latrun_proposal.mp4.metanew file mode 100644index 000000000..4acad858e--- /dev/null+++ b/unity/Assets/StreamingAssets/video/latrun_proposal.mp4.meta@@ -0,0 +1,7 @@+fileFormatVersion: 2+guid: 2e14143d00d5c48ea907da9d25ba0fb2+DefaultImporter:+ externalObjects: {}+ userData:+ assetBundleName:+ assetBundleVariant:diff --git a/unity/Assets/StreamingAssets/video/law_of_return.mp4 b/unity/Assets/StreamingAssets/video/law_of_return.mp4new file mode 100644index 000000000..ea15c488cBinary files /dev/null and b/unity/Assets/StreamingAssets/video/law_of_return.mp4 differdiff --git a/unity/Assets/StreamingAssets/video/law_of_return.mp4.meta b/unity/Assets/StreamingAssets/video/law_of_return.mp4.metanew file mode 100644index 000000000..0032cceeb--- /dev/null+++ b/unity/Assets/StreamingAssets/video/law_of_return.mp4.meta@@ -0,0 +1,7 @@+fileFormatVersion: 2+guid: 7bcf96431c8824b51aa948a9cd98d2dd+DefaultImporter:+ externalObjects: {}+ userData:+ assetBundleName:+ assetBundleVariant:diff --git a/unity/Assets/StreamingAssets/video/maabarot_policy.mp4 b/unity/Assets/StreamingAssets/video/maabarot_policy.mp4new file mode 100644index 000000000..e79f7e26fBinary files /dev/null and b/unity/Assets/StreamingAssets/video/maabarot_policy.mp4 differdiff --git a/unity/Assets/StreamingAssets/video/maabarot_policy.mp4.meta b/unity/Assets/StreamingAssets/video/maabarot_policy.mp4.metanew file mode 100644index 000000000..863fdaa93--- /dev/null+++ b/unity/Assets/StreamingAssets/video/maabarot_policy.mp4.meta@@ -0,0 +1,7 @@+fileFormatVersion: 2+guid: 3a6e1f9a58cc740b78888be9301cf7b5+DefaultImporter:+ externalObjects: {}+ userData:+ assetBundleName:+ assetBundleVariant:diff --git a/unity/Assets/StreamingAssets/video/operation_yoav.mp4 b/unity/Assets/StreamingAssets/video/operation_yoav.mp4new file mode 100644index 000000000..7ed6bc7b3Binary files /dev/null and b/unity/Assets/StreamingAssets/video/operation_yoav.mp4 differdiff --git a/unity/Assets/StreamingAssets/video/operation_yoav.mp4.meta b/unity/Assets/StreamingAssets/video/operation_yoav.mp4.metanew file mode 100644index 000000000..d1831c4f4--- /dev/null+++ b/unity/Assets/StreamingAssets/video/operation_yoav.mp4.meta@@ -0,0 +1,7 @@+fileFormatVersion: 2+guid: c0cb2570feadf45f6b4470d1acf12068+DefaultImporter:+ externalObjects: {}+ userData:+ assetBundleName:+ assetBundleVariant:diff --git a/unity/Assets/StreamingAssets/video/ten_days.mp4 b/unity/Assets/StreamingAssets/video/ten_days.mp4new file mode 100644index 000000000..4263f2fe4Binary files /dev/null and b/unity/Assets/StreamingAssets/video/ten_days.mp4 differdiff --git a/unity/Assets/StreamingAssets/video/ten_days.mp4.meta b/unity/Assets/StreamingAssets/video/ten_days.mp4.metanew file mode 100644index 000000000..8d99ee971--- /dev/null+++ b/unity/Assets/StreamingAssets/video/ten_days.mp4.meta@@ -0,0 +1,7 @@+fileFormatVersion: 2+guid: 48d379e9a0f1e4ffb9dca9d705ebdba0+DefaultImporter:+ externalObjects: {}+ userData:+ assetBundleName:+ assetBundleVariant:diff --git a/unity/Assets/Tests/EditMode/BuildGateTests.cs b/unity/Assets/Tests/EditMode/BuildGateTests.csindex 6bcb6e5d7..f0de10c38 100644--- a/unity/Assets/Tests/EditMode/BuildGateTests.cs+++ b/unity/Assets/Tests/EditMode/BuildGateTests.cs@@ -14,7 +14,7 @@ public class BuildGateTests{var t = Type.GetType("Statecraft.Game.EditorTools.Build, Assembly-CSharp-Editor");Assert.IsNotNull(t, "Build exists");- return (string?)t!.GetMethod("ShareableRefusal", BindingFlags.Public | BindingFlags.Static)!.Invoke(null, new object?[] { c, null, false, null }); // event content only+ return (string?)t!.GetMethod("ShareableRefusal", BindingFlags.Public | BindingFlags.Static)!.Invoke(null, new object?[] { c, null, false, null, null }); // event content only}[Test]@@ -38,10 +38,10 @@ public class BuildGateTestsvar t = Type.GetType("Statecraft.Game.EditorTools.Build, Assembly-CSharp-Editor")!;var gate = t.GetMethod("GateRefusal", BindingFlags.Public | BindingFlags.Static)!;var c = ContentLoader.Load(Paths.Content);- Assert.IsNull(gate.Invoke(null, new object?[] { new[] { "Unity", "-executeMethod", "Statecraft.Game.EditorTools.Build.Mac" }, c, null, false, null }), "a dev build is not gated");- Assert.IsNull(gate.Invoke(null, new object?[] { new[] { "Unity", "-shareable" }, c, null, false, null }), "all seven are sensitivity-reviewed (D11)");+ Assert.IsNull(gate.Invoke(null, new object?[] { new[] { "Unity", "-executeMethod", "Statecraft.Game.EditorTools.Build.Mac" }, c, null, false, null, null }), "a dev build is not gated");+ Assert.IsNull(gate.Invoke(null, new object?[] { new[] { "Unity", "-shareable" }, c, null, false, null, null }), "all seven are sensitivity-reviewed (D11)");foreach (var e in c.Events) if (e.Id == "reparations_claim") e.Status = "fact-checked";- StringAssert.Contains("reparations_claim", (string?)gate.Invoke(null, new object?[] { new[] { "Unity", "-shareable" }, c, null, false, null }));+ StringAssert.Contains("reparations_claim", (string?)gate.Invoke(null, new object?[] { new[] { "Unity", "-shareable" }, c, null, false, null, null }));var source = System.IO.File.ReadAllText("Assets/Editor/Build.cs");foreach (var method in new[] { "public static void Web()", "public static void Mac()" }){@@ -84,20 +84,20 @@ public class BuildGateTeststry{CollectionAssert.IsEmpty(photos.SensitiveUnreviewed(), "the owner signed off all six on 2026-10-11");- Assert.IsNull(gate.Invoke(null, new object?[] { new[] { "Unity", "-shareable" }, c, photos, true, Mapping }), "the shipped catalog and mapping pass");+ Assert.IsNull(gate.Invoke(null, new object?[] { new[] { "Unity", "-shareable" }, c, photos, true, Mapping, null }), "the shipped catalog and mapping pass");Unreview(photos);CollectionAssert.AreEqual(SensitivePhotos, photos.SensitiveUnreviewed(), "exactly the owner's list");- var refusal = (string?)gate.Invoke(null, new object?[] { new[] { "Unity", "-shareable" }, c, photos, false, null });+ var refusal = (string?)gate.Invoke(null, new object?[] { new[] { "Unity", "-shareable" }, c, photos, false, null, null });Assert.IsNotNull(refusal, "unreviewed sensitive photographs block a shareable build");foreach (var id in SensitivePhotos) StringAssert.Contains(id, refusal);StringAssert.Contains("event photographs", refusal);- Assert.IsNull(gate.Invoke(null, new object?[] { new[] { "Unity", "-executeMethod", "Statecraft.Game.EditorTools.Build.Web" }, c, photos, false, null }),+ Assert.IsNull(gate.Invoke(null, new object?[] { new[] { "Unity", "-executeMethod", "Statecraft.Game.EditorTools.Build.Web" }, c, photos, false, null, null }),"a dev build still carries them (the owner reviews them in one)");for (int i = 0; i < photos.entries.Count; i++) // as the owner's sign-off would{var e = photos.entries[i]; e.sensitivityReviewed = e.sensitive; photos.entries[i] = e;}- Assert.IsNull(gate.Invoke(null, new object?[] { new[] { "Unity", "-shareable" }, c, photos, false, null }), "all reviewed: the build may be shared");+ Assert.IsNull(gate.Invoke(null, new object?[] { new[] { "Unity", "-shareable" }, c, photos, false, null, null }), "all reviewed: the build may be shared");}finally { UnityEngine.Object.DestroyImmediate(photos); }}@@ -123,11 +123,11 @@ public class BuildGateTestspublic void TheGateFailsClosedWhenTheCatalogDoesNotLoad(){var c = ContentLoader.Load(Paths.Content);- var refusal = (string?)Gate.Invoke(null, new object?[] { Shareable, c, null, true, null });+ var refusal = (string?)Gate.Invoke(null, new object?[] { Shareable, c, null, true, null, null });Assert.IsNotNull(refusal, "an existing catalog that did not load is a refusal");StringAssert.Contains("did not load", refusal);- Assert.IsNull(Gate.Invoke(null, new object?[] { Shareable, c, null, false, null }), "no catalog file and no mapping: no photographs ship");- var fromMapping = (string?)Gate.Invoke(null, new object?[] { Shareable, c, null, true, UnreviewedMapping });+ Assert.IsNull(Gate.Invoke(null, new object?[] { Shareable, c, null, false, null, null }), "no catalog file and no mapping: no photographs ship");+ var fromMapping = (string?)Gate.Invoke(null, new object?[] { Shareable, c, null, true, UnreviewedMapping, null });foreach (var id in SensitivePhotos) StringAssert.Contains(id, fromMapping, "the mapping's own sensitive rows refuse");}@@ -140,20 +140,20 @@ public class BuildGateTestsvar photos = ShippedPhotos();try{- Assert.IsNull(Gate.Invoke(null, new object?[] { Shareable, c, photos, true, Mapping }), "the shipped catalog matches the mapping");+ Assert.IsNull(Gate.Invoke(null, new object?[] { Shareable, c, photos, true, Mapping, null }), "the shipped catalog matches the mapping");Unreview(photos);for (int i = 0; i < photos.entries.Count; i++) // a hand edit, not the owner's sign-off{var e = photos.entries[i]; e.sensitivityReviewed = e.sensitive; photos.entries[i] = e;}- Assert.IsNull(Gate.Invoke(null, new object?[] { Shareable, c, photos, true, null }), "the catalog alone would pass");- var refusal = (string?)Gate.Invoke(null, new object?[] { Shareable, c, photos, true, UnreviewedMapping });+ Assert.IsNull(Gate.Invoke(null, new object?[] { Shareable, c, photos, true, null, null }), "the catalog alone would pass");+ var refusal = (string?)Gate.Invoke(null, new object?[] { Shareable, c, photos, true, UnreviewedMapping, null });Assert.IsNotNull(refusal, "the mapping still says unreviewed");StringAssert.Contains("does not match", refusal);foreach (var id in SensitivePhotos) StringAssert.Contains(id, refusal);var j = photos.entries.FindIndex(e => e.eventId == "maabarot_policy");var m = photos.entries[j]; m.credit = "someone else"; photos.entries[j] = m;- StringAssert.Contains("maabarot_policy", (string?)Gate.Invoke(null, new object?[] { Shareable, c, photos, true, Mapping }), "a changed credit");+ StringAssert.Contains("maabarot_policy", (string?)Gate.Invoke(null, new object?[] { Shareable, c, photos, true, Mapping, null }), "a changed credit");}finally { UnityEngine.Object.DestroyImmediate(photos); }}diff --git a/unity/Assets/Tests/EditMode/EventVideoTests.cs b/unity/Assets/Tests/EditMode/EventVideoTests.csnew file mode 100644index 000000000..0f85c4045--- /dev/null+++ b/unity/Assets/Tests/EditMode/EventVideoTests.cs@@ -0,0 +1,204 @@+#nullable enable+using System;+using System.Collections;+using System.Collections.Generic;+using System.IO;+using System.Linq;+using System.Reflection;+using NUnit.Framework;+using Statecraft.Game;+using Statecraft.Game.UI;+using Statecraft.Sim;+using UnityEditor;+using UnityEngine;+using UnityEngine.TestTools;+using UnityEngine.UIElements;++/// <summary>Decision videos (owner rulings 2026-10-13; docs/event-videos.md): the clip mapping is sound and is not game+/// content; video is off in every automated run; the Illustration switch shows only for an event with a clip and a shown+/// photograph, swaps the credit for the "AI-generated illustration" label and back; a clip that fails puts the photograph+/// back and drops the switch for that event; Tab reaches the switch after the options and Hide; a sensitive clip waits for+/// the owner's review before a shareable build.</summary>+public class EventVideoTests+{+ static readonly Content C = ContentLoader.Load(Paths.Content);+ static UiText Text => UiText.Parse(AssetDatabase.LoadAssetAtPath<TextAsset>(UiPaths.Strings).text);+ static EventImageCatalog Photos => AssetDatabase.LoadAssetAtPath<EventImageCatalog>("Assets/Resources/EventImageCatalog.asset");+ static IReadOnlyList<EventVideoMapping.Row> Rows => EventVideoMapping.Parse(File.ReadAllText(EventVideoMapping.Path));++ [Test]+ public void TheMappingIsSoundAndEveryClipShips()+ {+ var rows = Rows;+ Assert.GreaterOrEqual(rows.Count, 10, "about 12 events have a clip");+ var problems = EventVideoMapping.Problems(rows, C, id => Photos.Find(id) != null, f => File.Exists(Path.Combine(EventVideoMapping.ClipFolder, f)));+ Assert.IsEmpty(problems, string.Join("\n", problems));+ Assert.IsNotEmpty(EventVideoMapping.Load(), "the game finds the mapping in Resources");+ // Every file in the folder has a row (no stray clip ships).+ var files = Directory.GetFiles(EventVideoMapping.ClipFolder, "*.mp4").Select(Path.GetFileName).OrderBy(x => x).ToArray();+ CollectionAssert.AreEqual(rows.Select(r => r.File).OrderBy(x => x).ToArray(), files);+ }++ [Test]+ public void TheMappingIsNotGameContent()+ {+ var content = Path.GetFullPath(Paths.Content);+ Assert.IsFalse(Path.GetFullPath(EventVideoMapping.Path).StartsWith(content, StringComparison.Ordinal));+ foreach (var f in Directory.GetFiles(content, "*.yaml", SearchOption.AllDirectories))+ {+ var text = File.ReadAllText(f);+ StringAssert.DoesNotContain("event-videos", text, f);+ StringAssert.DoesNotContain("StreamingAssets/video", text, f);+ }+ }++ [Test]+ public void TheMappingRefusesDeportAClipWithoutAPhotographAndAnUnlabelledRow()+ {+ var c = ContentLoader.Load(Paths.Content); // a copy to change+ var ev = c.Events.First(e => e.Id == "law_of_return");+ ev.Options.Add(new EventOption { Id = "deport_residents", Text = "x" });+ var row = Rows.First(r => r.Event == "law_of_return");+ var problems = EventVideoMapping.Problems(new[] { row }, c, _ => true, _ => true);+ Assert.IsTrue(problems.Any(p => p.Contains("Deport never gets any video")), string.Join("\n", problems));+ var unlabelled = new EventVideoMapping.Row { Event = "hula_drainage", File = "hula_drainage.mp4", Alt = "a marsh", AiGenerated = false };+ problems = EventVideoMapping.Problems(new[] { unlabelled }, C, _ => false, _ => true);+ Assert.IsTrue(problems.Any(p => p.Contains("no archival photograph")), "no photograph");+ Assert.IsTrue(problems.Any(p => p.Contains("ai_generated must be true")), "not marked AI");+ Assert.IsTrue(problems.Any(p => p.Contains("alt text")), "no proper alt text");+ }++ [Test]+ public void VideoIsOffInEveryAutomatedRunAndOnByHand()+ {+ foreach (var q in new[] { "?smoke=5", "?golden", "?golden&smoke=5", "?shot", "?vprofile", "?profile", "?units", "?borderproof" })+ Assert.IsTrue(CardVideo.ForcedOff("http://x/index.html" + q, new string[0], webgl: true), q);+ foreach (var a in new[] { "-golden", "-shot", "-smoke", "-units" })+ Assert.IsTrue(CardVideo.ForcedOff(null, new[] { "Statecraft", a }, webgl: false), a);+ Assert.IsFalse(CardVideo.ForcedOff("http://x/index.html", new string[0], webgl: true), "a player");+ Assert.IsFalse(CardVideo.ForcedOff("http://x/index.html?nostart", new string[0], webgl: true), "nostart is by hand");+ Assert.IsFalse(CardVideo.ForcedOff("http://x/index.html?shots", new string[0], webgl: true), "a whole parameter only");+ }++ sealed class Rig : IDisposable+ {+ public readonly VisualElement Root; public readonly EventCardPresenter Card; public readonly CardVideo? Video;+ readonly GameObject go; readonly PanelSettings ps; readonly RenderTexture rt;+ public Rig(string eventId, Func<string, EventVideoMapping.Row?>? clipFor, bool video = true)+ {+ rt = new RenderTexture(1920, 1080, 0);+ ps = UnityEngine.Object.Instantiate(AssetDatabase.LoadAssetAtPath<PanelSettings>(UiPaths.Panel)); ps.targetTexture = rt;+ go = new GameObject("VideoCardTest"); go.SetActive(false);+ var doc = go.AddComponent<UIDocument>(); doc.panelSettings = ps; doc.visualTreeAsset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(UiPaths.GameUxml);+ go.SetActive(true);+ Root = doc.rootVisualElement; Root.Q("root").RemoveFromClassList("loading");+ var g = GameSession.New(C, GoldenRun.Seed, Mode.Historical);+ g.State.Date = C.Events.First(e => e.Id == eventId).From;+ g.State.PendingEvents.Clear(); g.State.PendingEvents.Add(eventId);+ Video = video ? new CardVideo() : null;+ Card = new EventCardPresenter(Root, new SimBridge(g, Text), Text, null, Photos, Video, clipFor);+ }+ public Button Switch => Root.Q<Button>("event-illustration");+ public Label Credit => Root.Q<Label>("event-photo-credit");+ public bool Shows(string name) => Root.Q(name).resolvedStyle.display == DisplayStyle.Flex;+ public void Dispose()+ {+ Card.Dispose(); Video?.Dispose();+ UnityEngine.Object.DestroyImmediate(go); UnityEngine.Object.DestroyImmediate(ps); rt.Release(); UnityEngine.Object.DestroyImmediate(rt);+ }+ }++ static Func<string, EventVideoMapping.Row?> From(IReadOnlyList<EventVideoMapping.Row> rows) => id => rows.FirstOrDefault(r => r.Event == id);++ static IEnumerator Frames(int n) { for (int i = 0; i < n; i++) yield return null; }++ static void Press(Button b) { using (var e = NavigationSubmitEvent.GetPooled()) { e.target = b; b.SendEvent(e); } }++ [UnityTest]+ public IEnumerator TheSwitchShowsOnlyForAnEventWithAClipAndSwapsTheLabel()+ {+ LogAssert.ignoreFailingMessages = true; // the edit-mode VideoPlayer may log while it prepares; the card is what is checked+ using (var r = new Rig("idf_founding", From(Rows))) // a photograph, no clip+ {+ yield return Frames(4);+ Assert.IsFalse(r.Shows("event-illustration"), "no clip: no switch");+ }+ using (var r = new Rig("law_of_return", null)) // video off (CardVideo.ForcedOff): GameRoot passes no clips+ {+ yield return Frames(4);+ Assert.IsFalse(r.Shows("event-illustration"), "video off: no switch");+ }+ var row = Rows.First(x => x.Event == "law_of_return");+ using (var r = new Rig("law_of_return", From(Rows)))+ {+ yield return Frames(4);+ var credit = r.Credit.text;+ Assert.IsTrue(r.Shows("event-illustration"), "a clip and a photograph: the switch shows");+ Assert.AreEqual("Illustration", r.Switch.text);+ Press(r.Switch);+ yield return Frames(2);+ Assert.AreEqual("Photograph", r.Switch.text);+ Assert.AreEqual("AI-generated illustration", r.Credit.text, "the AI label replaces the credit");+ Assert.AreEqual(row.Alt, r.Root.Q("event-photo").tooltip, "the clip's alt text");+ Assert.IsTrue(r.Card.IllustrationShown);+ Press(r.Switch);+ yield return Frames(2);+ Assert.AreEqual("Illustration", r.Switch.text);+ Assert.AreEqual(credit, r.Credit.text, "the photograph's credit is back");+ Assert.IsFalse(r.Card.IllustrationShown);+ }+ }++ /// <summary>The fallback, driven through CardVideo's own failure path (what errorReceived and the 8 s timeout call;+ /// the edit-mode VideoPlayer's own timing is not what is under test: the WebGL check renames a clip away and sees+ /// "VIDEO failed" and the photograph stay).</summary>+ [UnityTest]+ public IEnumerator AClipThatFailsPutsThePhotographBackAndDropsTheSwitch()+ {+ LogAssert.ignoreFailingMessages = true; // the edit-mode VideoPlayer may log while it prepares+ using var r = new Rig("law_of_return", From(Rows));+ yield return Frames(4);+ var credit = r.Credit.text;+ Press(r.Switch);+ yield return Frames(1);+ Assert.IsTrue(r.Card.IllustrationShown, "precondition: the clip was asked for");+ typeof(CardVideo).GetMethod("Fail", BindingFlags.NonPublic | BindingFlags.Instance)!.Invoke(r.Video, new object[] { "simulated error" });+ yield return Frames(2);+ Assert.IsFalse(r.Card.IllustrationShown, "the failed clip is stopped");+ Assert.IsFalse(r.Shows("event-illustration"), "and the switch is gone for this event");+ Assert.AreEqual(credit, r.Credit.text, "the photograph and its credit are back");+ Assert.AreEqual("Illustration", r.Switch.text);+ }++ [UnityTest]+ public IEnumerator TabReachesTheSwitchAfterTheOptionsAndHide()+ {+ using var r = new Rig("law_of_return", From(Rows));+ yield return Frames(4);+ var card = r.Root.Q("event-card");+ var focusables = card.Query<Button>().ToList().Where(b => b.resolvedStyle.display == DisplayStyle.Flex && b.focusable).ToList();+ var order = focusables.Select(b => b.name).ToList();+ Assert.AreEqual("event-illustration", order.Last(), string.Join(", ", order));+ Assert.Less(order.IndexOf("event-hide"), order.IndexOf("event-illustration"));+ Assert.Less(order.IndexOf(r.Root.Q("event-options").Q<Button>().name), order.IndexOf("event-hide"));+ Assert.IsTrue(focusables.All(b => b.tabIndex == 0), "tree order is Tab order");+ // The switch sits over the header's top right corner.+ var sw = r.Switch.worldBound; var band = r.Root.Q("event-photo").worldBound;+ Assert.IsTrue(band.Contains(new Vector2(sw.xMin, sw.yMin)) && band.Contains(new Vector2(sw.xMax, sw.yMax)), $"the switch {sw} lies on the header {band}");+ Assert.Less(band.xMax - sw.xMax, 20f, "at its right edge");+ Assert.Less(sw.yMin - band.yMin, 20f, "at its top");+ }++ [Test]+ public void ASensitiveClipWaitsForTheOwnersReviewBeforeAShareableBuild()+ {+ var gate = Type.GetType("Statecraft.Game.EditorTools.Build, Assembly-CSharp-Editor")!.GetMethod("GateRefusal", BindingFlags.Public | BindingFlags.Static)!;+ var shareable = new[] { "Unity", "-shareable" };+ var refusal = (string?)gate.Invoke(null, new object?[] { shareable, C, null, false, null, Rows });+ StringAssert.Contains("illustration clips: operation_yoav, ten_days", refusal ?? "");+ Assert.IsNull(gate.Invoke(null, new object?[] { new[] { "Unity" }, C, null, false, null, Rows }), "a dev build is not gated");+ var reviewed = Rows.Select(x => { x.SensitivityReviewed = x.Sensitive; return x; }).ToList();+ Assert.IsNull(gate.Invoke(null, new object?[] { shareable, C, null, false, null, reviewed }), "reviewed: the clips may ship");+ CollectionAssert.AreEqual(new[] { "operation_yoav", "ten_days" }, EventVideoMapping.SensitiveUnreviewed(Rows));+ }+}diff --git a/unity/Assets/Tests/EditMode/EventVideoTests.cs.meta b/unity/Assets/Tests/EditMode/EventVideoTests.cs.metanew file mode 100644index 000000000..1cbbb6ee6--- /dev/null+++ b/unity/Assets/Tests/EditMode/EventVideoTests.cs.meta@@ -0,0 +1,2 @@+fileFormatVersion: 2+guid: bebee66bc51f84fa3a3d56dd4c1d3810\ No newline at end of filediff --git a/unity/Assets/UI/Game.uxml b/unity/Assets/UI/Game.uxmlindex 91ed22eb0..0602be066 100644--- a/unity/Assets/UI/Game.uxml+++ b/unity/Assets/UI/Game.uxml@@ -116,8 +116,9 @@<ui:VisualElement name="event-scrim" class="event-scrim" /><ui:VisualElement name="event-card" class="panel event-card"><!-- The 16:9 media header: an archival photograph of the event (EventImageCatalog), framed in gold, with its- credit line as a caption strip along its bottom edge. Events without one show the minister's portrait in- the head instead. -->+ credit line as a caption strip along its bottom edge, and, for an event with a clip, the Illustration+ switch in its top corner (a silent AI-generated loop, labelled so in place of the credit). Events without+ a photograph show the minister's portrait in the head instead. --><ui:VisualElement name="event-photo" class="event-photo"><ui:Label name="event-photo-credit" class="event-photo-credit" /></ui:VisualElement><!-- A portrait-shaped thumbnail beside the heading, framed on the face (playtest 2, P2-3 and P2-5). --><ui:VisualElement class="event-head">@@ -137,6 +138,9 @@<ui:Label name="event-count" class="muted event-count" /><ui:Button name="event-hide" class="event-hide" /></ui:VisualElement>+ <!-- The Illustration switch, drawn over the media header's top right corner, last in the card so Tab reaches it+ after the options and Hide (#41). -->+ <ui:Button name="event-illustration" class="event-illustration" /><Statecraft.Game.UI.UiFrame filigree="true" /></ui:VisualElement><ui:Button name="event-reopen" class="event-reopen" />diff --git a/unity/Assets/UI/Statecraft.uss b/unity/Assets/UI/Statecraft.ussindex 952c4b5ba..de333ef82 100644--- a/unity/Assets/UI/Statecraft.uss+++ b/unity/Assets/UI/Statecraft.uss@@ -213,6 +213,13 @@ Button:disabled { color: var(--ink-dim); border-color: rgba(120, 120, 120, 0.4);display: none; height: 540px; min-height: 0; flex-shrink: 1000; margin-bottom: 4px; overflow: hidden;justify-content: flex-end; background-size: cover; background-color: var(--navy-deep); border-width: 1px; border-color: var(--gold);}+/* The Illustration switch (decision videos): over the media header's top right corner (the card's padding plus 8 px; it+ is the card's last child, for the focus order); hidden unless the event has a clip (EventCardPresenter.ApplyIllustration). */+.hud-two-row .event-illustration { right: 24px; }+.event-illustration {+ display: none; position: absolute; top: 24px; right: 48px; margin: 0; padding: 3px 14px; font-size: 17px; -unity-text-align: middle-center;+ background-color: rgba(5, 9, 18, 0.88); border-color: var(--gold); color: var(--gold-light);+}.event-photo-credit {flex-shrink: 0; font-size: 13px; white-space: normal; -unity-text-align: middle-center; margin: 0; padding: 2px 8px 3px 8px;color: var(--ink); background-color: rgba(5, 9, 18, 0.92); -unity-font-style: italic; /* 0.92: blending is linear, so less reads grey */diff --git a/unity/Assets/UI/strings.en.yaml b/unity/Assets/UI/strings.en.yamlindex e5531072f..fb567208d 100644--- a/unity/Assets/UI/strings.en.yaml+++ b/unity/Assets/UI/strings.en.yaml@@ -14,6 +14,9 @@ event.office: "{0}: {1}"event.more: "{0} more decision(s) waiting"event.hide: "Hide"event.reopen: "Decision waiting"+event.illustration: "Illustration"+event.photo: "Photograph"+event.ai_label: "AI-generated illustration"order.game_over: "The game is over"order.no_attention: "Not enough attention (need {0:0.0}, have {1:0.0})"order.unknown: "Unknown {0} '{1}'"diff --git a/unity/Assets/UI/strings.he.yaml b/unity/Assets/UI/strings.he.yamlindex a95c84c72..fbb35cb83 100644--- a/unity/Assets/UI/strings.he.yaml+++ b/unity/Assets/UI/strings.he.yaml@@ -13,6 +13,9 @@ event.office: "{0}: {1}"event.more: "החלטות ממתינות נוספות: {0}"event.hide: "הסתר"event.reopen: "החלטה ממתינה"+event.illustration: "איור"+event.photo: "תצלום"+event.ai_label: "איור שנוצר בבינה מלאכותית"order.game_over: "המשחק הסתיים"order.no_attention: "אין מספיק תשומת לב (נדרש {0:0.0}, יש {1:0.0})"order.unknown: "{0} לא מוכר: '{1}'"