Scored scene-timing benchmark on the real clock - #70
Merged
Conversation
Add `docgen benchmark` and `scripts/benchmark-scenes.sh` so clock and compile changes are measured, not guessed. The harness executes compiled construct() with the real `_TimedScene` methods and stub Manim mobjects. A committed baseline fails the command when wait-skips, overshoots, or hold pulses regress. A control case keeps the historical issue #66 dump visible so the scorer cannot go blind. Co-authored-by: jmjava <jmjava@gmail.com>
Add a dedicated CI job that runs `docgen benchmark`, lock that job in tests so it cannot be deleted quietly, and make the command a required gate in AGENTS.md and Cursor rules. Co-authored-by: jmjava <jmjava@gmail.com>
jmjava
marked this pull request as ready for review
August 15, 2026 16:39
Contributor
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Past timing fixes passed unit tests (string checks on compiled source, a Python simulator) and still failed in production. Those tests never ran the compiled
construct()against the real_TimedSceneclock.What
A standard corpus plus a scorer you can re-run after every clock / compile change:
docgen benchmark # or ./scripts/benchmark-scenes.shNo bundle, no Manim, no OpenAI. The harness execs compiled
construct()with stub mobjects and the actual_TimedScenemethods fromBOOTSTRAP_HEADER.issue66_tight_clampedissue66_tight_unclampedearly_titlewide_holdemphasis_nonepaged_slideflow_edgesaudio_tailScores are diffed against
src/docgen/benchmark_data/baseline.json. Exit 1 ifdefect_pointsrise,quality_points/mid_hold_pulsesfall, or the control case stops failing.validate/ generate-all preflight also execute the compiled clock whentiming.jsonwords exist (clock:issues).After an intentional improvement:
docgen benchmark --update-baselineand review the JSON diff.Required for future changes
This is now a hard gate, not a suggestion:
benchmarkin.github/workflows/ci.ymlrunsdocgen benchmarktests/test_scene_benchmark.pyfails if that job is removedAGENTS.mdRequired gate section +.cursor/rules/docgen-benchmark.mdc(alwaysApply: true)Tests
ruff check src/ tests/pytest tests/ -q --tb=short— 404 passeddocgen benchmarkmeets the committed baseline (quality average 100; control still reports the BUG: scene-spec wait_until_word clock overshoot dumps first page then freezes (validate false green) #66 dump)