Skip to content

WebGPU decision capability probe: two guards no test pins #643

Description

@leehack

Two guards in WebGpuDecisionHeads (lib/src/backends/webgpu/webgpu_decision.dart) survive mutation: no test fails when either is removed. The mutation runs for #620 found them at its merged head. The published bridge (v0.1.47) never sends either input, so the impact is low, but a future or custom bridge could.

  1. supported flag. Changing if (_bool(value.supported) != true) in capabilities to == false fails no test. With that change, a response of {apiVersion: 1} without a boolean supported is reported as supported.
  2. runDecision presence. Dropping 'runDecision' from the method list in _exposesDecisionApi fails no test. With that change, a bridge that has the other three methods but no runDecision is reported as supported. The existing test, "names the required assets for bridges without the API", deletes only freeDecisionHead.

Fix: add two fake-bridge cases to test/unit/backends/webgpu/webgpu_decision_test.dart:

  • a capability response of {apiVersion: 1} with no supported;
  • a bridge missing only runDecision.

Both should report unsupported. Part of #604.

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

    enhancementNew feature or requestpriority:P3Watch or strategic work blocked by upstream/runtime/design dependencies

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions