Repository navigation
Issue-185: Cover the world engine in CI with goldens and a speed check - #237
Conversation
golden.spec.ts draws the three.js path, so no golden covered an engine-drawn frame. engineGolden.spec.ts draws a water world, Kepler-186 f and Jupiter through the existing dev-only parity hook and compares them by SSIM. Stars, rocks, the stage component and the fly view are not covered. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add forming.js, which measures the world engine inside the app on a real GPU, and record one laptop's results in R11.3, including the backdrop-filter comparison. The A15 columns stay unmeasured. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add an "engine speed against the base" job. It times the world engine of the PR and of its base commit in turn on one runner and fails above 1.5 times, because runner speed varies too much for a time limit. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
@MintHerbs follow-up on the flaky test I mentioned on #234: "the last frame of a build is the normal render of the same plan and seed" ( It blocked this PR for a while: it failed both attempts on the first run (30 Nov) and both on a re-run, then passed on retry in a second re-run (similarity 0.77 to 0.93 in the first four failures, against a 0.97 minimum). All checks now pass. This PR changes no app or engine code. Could this get a ticket and someone to own a fix? |
JoottunAtish
left a comment
There was a problem hiding this comment.
Approved with nits. CI is green at d79cc02. The speed job has already run on CI (ratios 0.92 to 1.08), and the three laptop-made goldens pass on CI on the first attempt. No engine or app code changes; the parity hook is dev-only, so the D-37 "+ Artistic" gating is untouched.
On the two open questions in the body: keeping the e2e limits as they are is fine given the 13-run data, and goldens through the parity hook meet #185's "Done when".
Nits (non-blocking, fine as a follow-up):
frontend/e2e/engineGolden.spec.ts:53-54: thesearchcases send noid, and they pass only becauseout.artifactandc.idare bothundefined. Pass the expectedid, or have the hook skip the check whenidis missing.- Check
engine_world_water.png(Aqua Prime) by eye before it is frozen. It is mostly tan with dark patches. - SSIM scores are only printed on failure, so we can't see the margin to 0.97. Log or attach them on every run.
- The engine goldens skip the Q-69 corner background check. The lit-pixel guard catches a blank frame but not a background drift.
scripts/check-engine-speed.js:- It runs the PR's script against the base, so renaming a preset or changing the hook fails on the base side with an unclear error.
- There is no retry for a slow runner.
- It only works on Linux and macOS (
process.kill(-pid)). Say so in the header comment.
fetch-depth: 0infrontend.ymlfetches every branch. Fetching only the base SHA is enough.- Docs: the "Golden frames" row of the A12 table in
docs/architecture/testing.mdstill lists only the fixture goldens. Optionally update thescripts/line indocs/uml/04-package.md. - The flaky
build.spec.ts:465deserves its own ticket.
Skip the parity hook's preset check when a case gives no id, log the golden scores on every run and check the corner background, measure a world twice before failing the speed check and name the side that failed, fetch only the base commit in CI, and update the docs. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Thanks for the review. The nits are addressed in
CI is green, though the flaky test needed re-runs. |
Closes #185
CI had two blind spots for the D-37 engines: no check for the world engine getting slower, and no golden of a frame an engine draws. No engine or app code changes.
What changes
e2e/engineGolden.spec.ts): a water world, Kepler-186 f and Jupiter, drawn by the world engine through the existing parity hook on its virtual clock.scripts/check-engine-speed.js, CI job "engine speed against the base"): times the world engine of the PR and of its base commit, in turn, on one runner. Fails when median forming or frame time is over 1.5 times the base's.scripts/engine-bench/forming.js): forming time, frame rate and thebackdrop-filtercomparison on one laptop (Intel Arc). The A15 columns and R12 Viewer: real shapes and volumes (shape-model asteroids, remnants, nebulae, comets) #43 stay open.Evidence
contract:check,typecheck,lint,format:check,test,buildpass locally. The full Playwright suite was not run locally.Please check
main(D-42). A slowdown spread over several PRs, each under 1.5x, passes.Not covered
Star and rock engines (their parity hooks did not run as they are: the star one found no "3D viewer" button, the rock one timed out), the fly view's speed on CI, and real-GPU speed on CI.
🤖 Generated with Claude Code