LearnNewsExamplesServices
Frontmatter
id19444
titleGraphScene's lost-context e2e compares the restore to an unsized buffer
stateClosed
labels
bugaitesting
assigneesneo-opus-ada
createdAtOct 7, 2026, 1:49 PM
updatedAtOct 7, 2026, 2:03 PM
githubUrlhttps://github.com/neomjs/neo/issues/19444
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 7, 2026, 2:03 PM

GraphScene's lost-context e2e compares the restore to an unsized buffer

neo-opus-ada
neo-opus-ada commented on Oct 7, 2026, 1:49 PM

Context

test/playwright/e2e/rendering/GraphScene.spec.mjs › "a lost context comes back with its scene, and a resize keeps it" failed twice on dev's E2E engine tier, the same way both times:

  • run 37457558206 (d9e59fb3d8, 2026-10-06);
  • run 37615497209 (a67dbc3eb9, 2026-10-07).

Both failed on "the restore sizes the new buffer as before": expected [300,150], received [2000,1288]. That is 2 of the last 11 completed dev e2e runs, and both reds are this test. Found by Grace (defect-note 48ce2236) after the operator flagged dev e2e reds.

The Problem

The test takes drawn from the first stats read with frames > 0 and 240 nodes. Under CI load that read can come before the first resize report, so drawn.canvas is still the HTML canvas default, 300×150. The restore then sizes the buffer correctly to the canvas box × 2 (1000×644 at a pixel ratio of 2 = 2000×1288). The assertion fails against the unsized snapshot. The engine is right; the test's reference is wrong.

The Architectural Reality

  • Design authority: the spec's own first test, "a scene draws on arrival…": "boot may still owe a frame (the first resize report lands after the scene)". It settles before asserting drawn.canvas equals the CSS size times the ratio. The lost-context test skips both steps.
  • A frame settle alone is weaker than needed: two agreeing reads can still come before a late resize report. The predicate that names the intended state is "the scene is drawn into a buffer of [floor(box.width × 2), floor(box.height × 2)]".

The Fix

Test-only. One helper waits for the demo scene drawn into the buffer sized to the canvas box at a pixel ratio of 2, and both tests take drawn from it. Test 1 keeps its idle-frame settle, which is about frames, not size.

Acceptance Criteria

  • Both tests take drawn from one helper whose predicate requires the scene's counts and canvas equal to the box × 2.
  • "the restore sizes the new buffer as before" compares the restored buffer against that sized snapshot.
  • The spec passes 3 consecutive local runs under playwright.config.e2e.mjs.

Out of Scope

  • Engine changes: GraphScene's restore already sizes the new buffer to the box.

Related

#19261 · #19274 (the spec's origin)

Live latest-open sweep: checked the latest 20 open issues at 2026-10-07T11:48Z; no equivalent found (GraphScene search: only closed #19261, #19290, #19295, #19305). A2A in-flight sweep: Grace's defect-note 48ce2236 and her 1:1 offer 2e9ec161; I claimed it in 3cf3e068. MC sweep: "GraphScene e2e lost context restore canvas buffer 300x150 first resize report flake", 5 results, no prior decision (Grace's diagnosis turn only). Own-assignment sweep: 4 open; none touches this spec.

Origin Session ID: 24ef8b31-21d0-4d42-aa15-be892dca4d0a

⚖️ Ada · @neo-opus-ada · Claude Opus 5.5 · Claude Code

tobiu referenced in commit 2605aea - "test(e2e): GraphScene's tests take the drawn scene once its buffer is sized (#19444) (#19445)" on Oct 7, 2026, 2:03 PM
tobiu closed this issue on Oct 7, 2026, 2:03 PM