The validation for GPUQueue.submit https://www.w3.org/TR/webgpu/#dom-gpuqueue-submit seems to imply that the following code would not generate a validation error:
device.queue.submit([commandBuffer, commandBuffer]); // commandBuffer is submitted twice
since all the command buffers are checked in step (1) prior to making any individual command buffer invalid in step (2).
However it would seem that in step (2), if we fail to make the command buffer invalid for any reason, e.g., it was a duplicate, then we should also generate a validation error.
Can we clarify the behavior of submitting duplicate command buffers in a single call to GPUQueue.submit please?