> Is there a proper term for that cognitive routine?
I think it falls under the general term "Theory of Mind". Quoth Wikipedia:
> Having a theory of mind allows one to attribute thoughts, desires, and intentions to others, to predict or explain their actions, and to posit their intentions. As originally defined, it enables one to understand that mental states can be the cause of -- and thus be used to explain and predict -- the behavior of others.
... Unless I misinterpreted your post, and you're talking about the cognition behind spit-takes.
I literally did a spit-take when I read that. Is there a proper term for that cognitive routine?