Skip to content

Make controlled transition frame-demand gate deterministic #88

Description

@wieslawsoltes

Problem

The packaged native-runtime matrix intermittently fails webscene_native_engine_tests at the controlled-switch transition gate even though the click, controlled-property semantics, event order, focus state, and computed transform have already passed:

webscene_native_engine_tests: controlled switch transform transition did not request a host frame

Observed on the Linux x64 package job for consolidated Code OSS compatibility commit 2e86f1ed; the same unchanged gate passed immediately before and on the hosted CI/native document jobs. The test reads webscene_engine_requires_animation_frame() once after work crosses the engine thread, while the suite already treats frame-demand publication as an asynchronously observable state elsewhere.

Proposed fix

Use the existing bounded wait_for_animation_frame_demand(engine, true, ...) test helper. Keep the 500 ms deadline and diagnostic demand value. Do not add an unconditional sleep, reduce transition assertions, or retry the whole CI job.

Acceptance criteria

  • The controlled switch still asserts native click semantics, event order, focus/focus-within, and the initial transform.
  • Frame demand is observed through the existing bounded polling contract.
  • The full native engine test remains deterministic in packaged Linux x64, macOS arm64, and Windows x64 runs.
  • No production scheduling behavior or performance budget is weakened.

The fix is included on draft PR #76 so it is qualified with all three packaged runtimes before merge.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions