While it may not always be the case (for example, PyPI would almost certainly know when metadata for a targets role needs to be created or updated), sometimes (e.g. exception-handling or building automation tools) you need to ascertain whether metadata for a targets role has diverged from its data.
Here is a prototype of such a tool.