Skip to content

perf(explainer-video): render the 4K, screenshot and stylesheet tests on small boards - #16345

Merged
kyle-sexton merged 1 commit into
mainfrom
perf/16217-explainer-video-second-cut
Nov 15, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
perf/16217-explainer-video-second-cut

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #16217

Summary

explainer-video.test.sh still ran over its 150 s bar after the first cut: 166, 166, 138, 163, 136 and 158 s in six whole-tree main runs, median 160.5 s. This PR shortens the videos three render tests encode, so the suite should drop under the bar. No assertion is changed, removed or skipped.

Fix

  • The narrated 4K render uses three fixture moments, one per chapter, instead of the whole storyboard. Encode cost follows video length times pixels, and the length came from the frames' reading minimums, so a shorter board is what cuts the time. It is still a command-line run at 3840x2160.
  • The screenshot test renders the title moment plus its two screenshots; the stylesheet and stitcher test renders the title moment alone.
  • The silent full-board 1080p render and the split, long-list and forced-defect tests are unchanged, so every template is still rendered and SSIM-checked at 1080p.
  • The suite's scripts/suite-seconds.txt row goes from 320 to 160, the measured main median before this change. The 480 s exception row stays until three main runs confirm the new time.

Narrower input to name: the 4K SSIM check now sees the title, before-after and also-changed templates only; the code-hunk, diagram and risk-map templates are SSIM-checked at 1080p.

Verification

  • Local wall time, before and after run alternately, median of three: whole suite 59.3 s to 43.2 s; without the ManimCE tests CI skips, 52.4 s to 36.4 s.
  • The four test modules pass locally after the change, with the same test count as before.
  • scripts/check-changelog-fragments.sh --check-required origin/main and the pinned ruff wrapper pass.

Left out: the CI time. Scaling the local ratio (0.695) to the main median gives about 112 s, an estimate until whole-tree main runs report the suite's TIME line.

Related

Remaining

  • Read the suite's TIME line in three whole-tree main runs after this merges; if the median is under 150 s, remove its 480 s row from scripts/suite-budget-exceptions.txt and set its scripts/suite-seconds.txt row to the new median.
  • This PR touches none of the issue's other done-when items.

🤖 Generated with Claude Code

https://claude.ai/code/session_015te8Csz4bqxpok4iu8Mcrd

… on small boards

The narrated 4K render now uses one fixture moment per chapter (title,
compare, rest), a 13.6 s video instead of 36.9 s. The screenshot test
renders the title moment and its two screenshots, the stylesheet test the
title moment alone. No assertion changed. The suite's suite-seconds row
moves from 320 to 160, the median of six whole-tree main runs.

Refs: #16217

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015te8Csz4bqxpok4iu8Mcrd
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 15, 2026 14:27
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T14:29:24.437036Z a152f2c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed a152f2c8ef72eba50a23069602407ddddd9fd8e9: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #16345: no security issues found

I read the full diff for all 3 changed files. None of them matches a trusted-path glob.

  • .changes/explainer-video/perf-16217-explainer-video-small-boards-9c41e7d2.md: a new changelog fragment (bump: none). It is prose only, with no instructions in it.
  • plugins/explainer-video/scripts/test_explainer_video_stills.py: test-only change. It adds a board_of helper that writes a smaller fixture storyboard.json into the test's own temp directory (tempfile.mkdtemp()). Three render tests now use it. Every input is a fixture constant or a value hard-coded in the test, so no untrusted input reaches the subprocess calls, and the subprocess arguments are passed as lists. The shipped plugin code, manifests, hooks and settings are not touched.
  • scripts/suite-seconds.txt: the suite timing-budget row changes from 320 to 160, plus a provenance comment. This is CI scheduling data. It is not a trust control, merge hold, token scope or kill switch.

This change has no security-relevant surface: it removes no instructions, changes no trust controls, edits no plugin manifest, and does nothing that could bill the owner. Any change in CI time only affects the length of existing Actions runs.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed a152f2c8ef72eba50a23069602407ddddd9fd8e9: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #16345, perf(explainer-video): render the 4K, screenshot and stylesheet tests on small boards

No findings. I read all three changed files in full in the diff: the changelog fragment, test_explainer_video_stills.py and scripts/suite-seconds.txt.

I checked the changed tests against the code they call, but I could not run them in this lane. The author's local timings and pass results are their own claims, and I have not confirmed them.

What I checked

  • Narrated 4K render. It now uses a small board with the title, compare and rest moments. Each moment is in a different chapter (why, change, risk), so the assertion that the chapters are ['Why', 'The change', 'Risk'] still holds (fixtures/storyboard.json).
  • Narration matches the board. The test now builds the narration from the small board's own --script-only output, so the word-for-word check in media_timeline.timeline still passes (media_timeline.py#L111).
  • Title-only board for the stylesheet test. parse accepts a board whose only moment is a silent title, and chapters with no moments are allowed (media_timeline.py#L37-L74). Frames are numbered from 1 (stills.py#L143-L149), so frames/m001.png is still the title frame that the pixel assertion reads.
  • Screenshot test. The screenshot moments use chapter risk, which the copied board still declares. board_of calls mkdir(exist_ok=True), so it works on the shots folder the test already created.
  • Narrower 4K coverage. The 4K SSIM check now sees fewer templates. The PR description says so, and the unchanged full-board 1080p render still covers every template.
  • Changelog and timing files. bump: none fits a change that touches only tests. The suite-seconds.txt row (320 → 160) and its provenance comment match the six main-run timings the PR quotes.

Other checks

  • Closing issue: none. The PR only says "Refs perf(ci): cut the explainer-video stills render time and close the suite-budget gaps #16211 left #16217" and the context file has no closing-issue section, so there are no acceptance criteria to check.
  • Plugin manifests: this PR changes no plugin.json or marketplace.json, so there are no manifest lines.
  • Paved paths: none apply to this change.
  • Embedded instructions: none found in the PR context or prior-findings files.
  • Spend: it should drop. The explainer-video test suite gets shorter, which saves CI minutes, and the change adds no paid resources.

Verifier dropped 0 of 0 candidates.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 854881e Nov 15, 2026
84 checks passed
@kyle-sexton
kyle-sexton deleted the perf/16217-explainer-video-second-cut branch November 15, 2026 14:47
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant