diff --git a/README.md b/README.md index ff0201f..a9cff13 100644 --- a/README.md +++ b/README.md @@ -24,10 +24,10 @@ Watch the GCD timing-improvement flow: OpenROAD, AI report analysis, Naja-Scope inspection, NajaEDA editing, Kepler Formal SEC, and a second OpenROAD run to compare the results. -[![GCD flow demo: click to play](examples/backend/gcd/reference/media/demo-preview.jpg)](examples/backend/gcd/reference/media/demo.mp4) +![GCD flow demo](examples/backend/gcd/reference/media/demo.webp) -Click the picture to play it: 48 seconds, no audio. [Download the MP4](https://github.com/keplertech/22b/raw/refs/heads/main/examples/backend/gcd/reference/media/demo.mp4) -if the player is unavailable. +48 seconds, no audio, playing in a loop. [Download the MP4](https://github.com/keplertech/22b/raw/refs/heads/main/examples/backend/gcd/reference/media/demo.mp4) +to pause it or step through it. ## Start diff --git a/examples/backend/gcd/reference/README.md b/examples/backend/gcd/reference/README.md index 0fd5996..a926d50 100644 --- a/examples/backend/gcd/reference/README.md +++ b/examples/backend/gcd/reference/README.md @@ -41,6 +41,8 @@ package change. guards. Not a fresh model generation. - [media/demo.mp4](media/demo.mp4): 48-second walk-through of this replay with the pinned packages. Its numbers, log lines and layout images come from that run. + [media/demo.webp](media/demo.webp) is the same video as an animated image, + which the top-level README can play inline. - [live_session.py](live_session.py): optional in-memory replay with two cumulative edits, no design exports, and full SEC after each edit. - [request.md](request.md): saved, solution-specific request for this reference. diff --git a/examples/backend/gcd/reference/media/demo.webp b/examples/backend/gcd/reference/media/demo.webp new file mode 100644 index 0000000..6241d1a Binary files /dev/null and b/examples/backend/gcd/reference/media/demo.webp differ diff --git a/tests/test_repository.py b/tests/test_repository.py index 4262a38..7b47bff 100644 --- a/tests/test_repository.py +++ b/tests/test_repository.py @@ -17,18 +17,19 @@ class RepositoryTests(unittest.TestCase): - def test_demo_plays_the_video_kept_in_the_repository(self): - # GitHub embeds a player only for a copy uploaded through its website, and that - # copy goes stale when the video changes. The preview picture links to the file - # in the repository instead, so every branch shows its own video. + def test_demo_plays_inline_from_the_repository(self): + # GitHub's README player accepts only a copy uploaded through its website, which + # goes stale when the video changes, and its file page does not play an MP4. The + # animated image kept beside the MP4 plays inline, on every branch. readme = (ROOT / "README.md").read_text() demo = readme.split("## Demo\n", 1)[1].split("\n## ", 1)[0] media = "examples/backend/gcd/reference/media" - self.assertRegex(demo, rf"(?m)^\[!\[[^\]]+\]\({media}/demo-preview\.jpg\)\]\({media}/demo\.mp4\)$") + self.assertRegex(demo, rf"(?m)^!\[[^\]]+\]\({media}/demo\.webp\)$") self.assertNotIn("user-attachments", demo) self.assertNotIn("](examples/backend/gcd/media/demo.mp4)", demo) - with (ROOT / media / "demo-preview.jpg").open("rb") as stream: - self.assertEqual(stream.read(3), b"\xff\xd8\xff") + header = (ROOT / media / "demo.webp").read_bytes()[:64] + self.assertEqual((header[:4], header[8:12]), (b"RIFF", b"WEBP")) + self.assertIn(b"ANIM", header) # animated, not a still picture def test_demo_has_repository_download_fallback(self): readme = (ROOT / "README.md").read_text()