So the answer to your question:
How do you know that his intention was not to stage a dev-team coup?
is still: I don't know, because it is impossible to determine his real intention.
Agreed. It's a fundamental truism, applies pretty much universally. You cannot therefore say that Gavin's conduct was a good idea, only the outcome (which was in stark opposition to his conduct) was laudable.