While writing the V2 fetch code it was noted that there seemed to be
overlapping code that performed the same actions with maybe some
slight differences. Thankfully, a lot of thos were smoothed out to use
Repository. However, in cases like ValidateRepository, the behaviour
still ended up being repeated due to very subtle usage of the Cached
type. Another note is that certain repository write actions, like
creating a reference, were not encapsulated in a trait.
We should make an effort to find and define clear boundaries of what the capabilities we require out of repositories and have a good set of traits to employ those capabilities.
I’m of the opinion that it should avoid being a kitchen-sink style
trait, because then we end up avoiding implementing a trait for a new
type because the majority of methods will end up being
unimplemented!.