Okay, here's a bit of an essay, going in a slightly different direction.
People have been kind enough to give many broad, subjective definitions, but nothing that nails it down to ‘if you have x you are male, if not you are female’
I’m asking for a defined set of characteristics such that it they are fulfilled, someone is one sex, and if they aren’t, they are another.
For the benefit of everyone apart from the OP, it is worth noting that "male" and "female" are, primarily, functions. Jane Clare Jones was writing about this the other day.
The quoted questions are a false binary. Female is a role. You don't become female by being "not male", you are female if you can perform the female reproductive role.
As it happens, in mammals, each species produces two distinct forms, each of which has one of those two functions. No individual mammal can perform both.
(In other lifeforms, one individual may be able to perform both functions, either simultaneously, or sequentially.)
Because of the nature of mammalian sex, we tend to use "male" and "female" as denoting the two forms ("phenotypes") of the species. The male-function form and the female-function form . Because despite function being the definitive trait, that's not what we usually care about. The actual fertility is not usually important. Sport, for example, doesn't care about your reproductive capability, but whether you have the male or female body type.
The correlation between body type and fertility is so strong, that it is more accurate, and of more benefit to more people, to classify people by sex as a strict binary.
Anyone who is (or was or will be) fertile will be male or female, because human reproduction is sexual. (If anyone comes across someone who is fertile but neither male nor female, or both, medical history will be made).
Fertility is sufficient to demonstrate sex, but not necessary. If you're producing sperm you're male. If you're not producing sperm, it doesn't mean you're not. (This is where the OP would be obtuse if they read this far - hopefully they got bored already and are skipping this essay).
Possible sex function ambiguity arises in people who are totally infertile. But, amazingly, fertility doctors manage to figure out whether they should be trying to get individuals to produce eggs or sperm, because they can see what body type they've got and what it is that isn't working. (We can tell the difference between a broken clock and broken chair.)
It's possible in theory an individual might be fertile one way, but have a different body type due to a disorder. But I believe in practice all the mechanisms in humans are so coupled, it can't really happen. It's not possible to develop a working reproductive system without the body ending up as clearly the corresponding form.
Certainly the athletics rules following Semenya only named DSDs that involve SRY genes producing fertile or infertile males, suggesting there aren't any male-bodied-but-female-reproductive DSDs.
Anyway, given the way humans are, it is overall more accurate to require all individuals to be classified as strictly male or female, based on phenotype at birth, with some provision for correction later through DSDs. The number of possibly-wrong classifications arising from that are miniscule compared to the mess arising from allowing voluntarily reclassification as the other sex (or neither) for anyone. A two-way classification may not be perfect, but it can still be more true and accurate than not being two-way.
(As an aside, I've mentioned before that trying to minimise the number of divisions is normally seen as a good thing. We perform the two-way classification because the benefits outweigh the costs. Any other split, or not splitting, would have a worse cost-benefit analysis).
Now, amusing little footnote. While typing this up, I happened to follow a Wikipedia link in a DSD article on the words "phenotypically female". This sent me to "Female body shape".
Okay, so we've got an article on that. So, do we have "Male body shape"? No, that redirects to "Body shape".
I think that tells us something about male perspective and views about women as the other. Feminists, go nuts.