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.
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.
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.
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.supportedflag. Changingif (_bool(value.supported) != true)incapabilitiesto== falsefails no test. With that change, a response of{apiVersion: 1}without a booleansupportedis reported as supported.runDecisionpresence. Dropping'runDecision'from the method list in_exposesDecisionApifails no test. With that change, a bridge that has the other three methods but norunDecisionis reported as supported. The existing test, "names the required assets for bridges without the API", deletes onlyfreeDecisionHead.Fix: add two fake-bridge cases to
test/unit/backends/webgpu/webgpu_decision_test.dart:{apiVersion: 1}with nosupported;runDecision.Both should report unsupported. Part of #604.