Skip to content

Playground validation: once-only failure cleanup and pixel-count wording - #1863

Merged
bkaradzic-microsoft merged 1 commit into
BabylonJS:masterfrom
bkaradzic-microsoft:fix/validation-failure-cleanup
Sep 3, 2026
Merged

Playground validation: once-only failure cleanup and pixel-count wording#1863
bkaradzic-microsoft merged 1 commit into
BabylonJS:masterfrom
bkaradzic-microsoft:fix/validation-failure-cleanup

Conversation

@bkaradzic-microsoft

Copy link
Copy Markdown
Member

Summary

Post-merge follow-up to #1838 (review):

  1. Once-only completion + cleanup — every test completion path (pixel pass/fail, render-loop catch, onReadyTimeout, snippet/script load/eval errors) now goes through makeTestDone: stopRenderLoop(), shared cleanupAfterTest() (scene/strays, stencil/scissor, effects, texture cache, SceneLoader plugin observable), then the outer callback. Prevents stale runRenderLoop callbacks from rendering the next scene or calling done(false) repeatedly under continue-on-failure.
  2. Wording — a stable pixel-difference count is guidance to compare saved result/diff images, not proof that timing flakes are ruled out.

Test plan

  • Headless multi-test run with a known early throw still advances and prints a full summary
  • Normal pixel pass/fail unchanged
  • CI playground jobs green

Wrap each test's done() so stopRenderLoop + inter-test cleanup run once
before the next test (render-loop throws, onReadyTimeout, and load/eval
errors previously bypassed evaluateScreenshot cleanup). Soften the
"identical pixel count means regression" guidance per post-merge review
on BabylonJS#1838.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d47cbab2-d751-4cf9-984f-4412dd9ec601

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are cohesive, tool-verified within the updated harness flow, and do not introduce any clear correctness issues while improving test isolation and completion robustness.

Pull request overview

Follow-up improvements to the native Playground validation harness to ensure each test completes exactly once and reliably resets engine/scene state between tests, preventing cascading failures or stale render-loop callbacks from affecting subsequent tests.

Changes:

  • Centralized inter-test teardown into cleanupAfterTest() and routed all completion paths through a once-only wrapper makeTestDone().
  • Ensured runTest() always uses the once-only completion wrapper and returns immediately on out-of-range indices.
  • Updated pixel-diff diagnostics wording to clarify what a stable pixel-difference count does and does not prove.
File summaries
File Description
Apps/Playground/Scripts/validation_native.js Adds once-only test completion wrapper plus shared cleanup to prevent stale render-loop callbacks and improve failure diagnostics wording.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@bghgary bghgary left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Reviewed by Copilot on behalf of @bghgary]

LGTM

@bkaradzic-microsoft
bkaradzic-microsoft merged commit 59417f9 into BabylonJS:master Sep 3, 2026
34 checks passed
bkaradzic-microsoft added a commit to bkaradzic-microsoft/BabylonNative that referenced this pull request Sep 4, 2026
Keeps shotgun JsRuntimeHost/SPIRV wiring and existing FlipFragCoordY,
PCF sampler-flip, compute Program::InitializeCompute, and inter-stage
varying location assignment. Drops the duplicate FragCoord uniform
upload introduced by the auto-merge of BabylonJS#1840.

Takes upstream Playground validation cleanup (BabylonJS#1863) and shader-info
cache bits.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 60c2ec68-6de1-445d-9fc9-b699db737eae
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants