It already happened once, with humans.
The brain is an environment where this happens quite commonly, but there are occasions where that breaks down and it fails, sometimes shattering into multiple independent sub-consciousnesses or failing entirely and falling into a vegetative state.
We may not need to discover anything, but instead let the machinery re-organize and evolve to discover itself.
Without evidence that there is some fundamental difference between a biological and artificial mind, we must assume that a self-aware AI is entitled to the same rights as any other self-aware being.
You have evidence of your own consciousness, just as I have evidence of my own.
>we must assume that a self-aware AI is entitled to the same rights as any other self-aware being.
What's your testable definition of self-awareness? Is the 'top' command self-aware because it can see its own process?
Adoption is not buying or selling a pet, just like adoption of a human is not buying or selling.
Rescuing a pet from a shelter, while paying for medical expenses or even rescue expenses, is not buying/selling.
Buying a pet from a pet store or mill is buying/selling.
It's important to distinguish adoption of an orphan pet/human (where the only payment is for care expenses) to adoption of a pet/human that was created/capture expressly for sale.
Breeding is a hazy middle ground, which I suppose is what you first had in mind with "adoption"
A dog’s notion of property is basically the same as every other animal’s: you can keep what you can defend. We defend our pets in the same way we defend our friends and family. In some sense, our debts of gratitude make us all property to someone.