Models -- Validation of Graph Characteristics

In 0.9, where do you validate such graph-related constraints as, for
example, an added or changed relationship must not form a loop, or
must not add a root? The caller could have commanded the change by
calling a relationship assignment method, e. g., parent=, or by adding
to a collection proxy, e, g., foo.children << bar. In a case like
that, should foo.children and bar.parent both have validators slapped
onto them? And how do the validators cope with the possible
discrepancies between what the cache says and what the database says?
The cache doesn't even seem maintain consistency with itself in the
face of changes when it comes to the reciprocal acknowledgement of
relationships. How do the validators cope with the possible self
inconsistency of the cache?