maniator / maniator/verticopolis
[Bug]: [P2] The tower canvas renders one of two discrete states, differing by a quarter of the frame
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Found by the #762 determinism lab. This is a DISTINCT bug from #762 and has never been reported in CI.
What it is
Rendering the same shard twice concurrently in the pinned container, 27-elevator-schedule.png intermittently comes out one of two ways:
- 265,531 of 1,024,000 pixels differ (25.9% of the frame), x 186..1037, y 41..795, max channel delta 89.
- The differing pixel count is identical across independent trials in different arms, so these are two discrete render states rather than noise.
- The affected region is the tower canvas itself, not chrome or text.
27c-elevator-schedule-unsaved.pnggets dragged along because the canvas shows through the modal's edges (1,312 pixels scattered across that crop), which is how it stayed hidden behind #762's much smaller and more distinctive signature.
Measured rate
From 600 paired trials in mcr.microsoft.com/playwright:v1.61.1-jammy (10-CPU container, two concurrent legs, the same configuration CI uses):
| arm | failures | trials | rate | 95% Wilson |
|---|---|---|---|---|
| baseline | 22 | 400 | 5.50% | 3.66% .. 8.19% |
| with compositor-timing flags | 1 | 200 | 0.50% | 0.09% .. 2.78% |
Caveat carried from the lab: failures are strongly bursty, so independence is violated and the true intervals are wider than Wilson reports.
Why it matters more than its rate suggests
It is a quarter of the frame, on the game's actual subject. #762's signature is 0.4% of one image in two text bands; this is the tower. If the two states differ in something a player would notice (a sprite batch, a draw order, a frame boundary), the gallery has been publishing one of two pictures at random.
Distinguishing it from #762
Different in every respect: 265,531 px versus 1,456, canvas versus two sticky-positioned text bands, 25.9% versus 0.4%, and it moves a different file. #762's diagnosis (quarter-pixel glyph phase bucketing on promoted layers) does not explain it.
Where to start
The lab harness from the #762 work reproduces it on demand at roughly 1 in 18 trials with no jitter or synthetic load needed. Evidence PNGs for both states were preserved during that run. The tower canvas is WebGL through Excalibur, so the first questions are whether the two states differ by a frame (a draw landing before or after some engine step) or by content, and whether the capture waits on anything the renderer signals.
Related: #762 (the text-band nondeterminism this was hiding behind), #768 (the evidence tooling that made both visible).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the lab harness from the #762 work and the preserved evidence PNGs, reproducing the two tower-canvas states in the pinned Playwright container. Inspect whether the WebGL-through-Excalibur render differs by frame or content and whether capture waits for the renderer signal. Done means identifying and fixing the cause, then verifying concurrent captures no longer produce differing tower images.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- playwright, typescript
- Domain
- computer-graphics, game-dev, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100