yes, that Source lookup is possible. the catch is that you can't query across entity kinds (equivalent to database tables), and each silo is a separate kind. (to oversimplify, kind is determined by class name.)

even so, you did basically come up with the answer. make a constant dict that maps `AS_CLASS.DOMAIN` to Source subclass like the `SOURCES` dict in `publish.py`, use that to look up class by silo domain, then query by `Source.domain`. (`domain_url` since `domain` is normalized, lowercased, etc. amusingly, there are existing bridgy users with mixed case domain names in their silo profiles, e.g. https://www.brid.gy/twitter/gRegorLove)

good call that this is important to decide up front if we can. properties are easy to change after the fact, but parent/child relnships aren't. and good question; the main reason to define parent/child relationships is to support transactions (including transactional queries) across multiple entities, like here where we want to enforce uniqueness.

...there's also a spatial locality argument for parent/child relationships, but it's *really* subtle and usually not important. forget i mentioned it. :P