The FragmentState and QueryState protobuf enumerations are not documented.
In particular, the meanings of the states is not well specified.
For example, is not clear whether QueryState.CANCELED or FragmentState.CANCELLED (AGH! Be consistent!) means that cancellation has been started or means that cancellation has been completed. (If cancellation has started but has not completed, should the query or fragment be in the CANCELLED state already?)
(Separately: Might a transitional state be required (at this global/high level)?)