cubicweb #5359131 Workflow.replace_state is broken [validation pending]

I cannot see how the implementation of replace_state can give the expected result. Running it fails badly anyway.

prioritynormal
typebug
done in3.21.0
load left0.000
closed by#699e49d76334 [wf] Fix Workflow.replace_state()
patch[wf] Fix Workflow.replace_state() [applied]