Simian Uprising by Jer Clarke
The chain of command is often a noose
dog returning ball to robot ballthrower