For the last few fractions of a percent accuracy, a SRY cheek swab test is a simple non-invasive screening test that can flag individuals for further investigation. World Athletics have just implemented this test, stating it is “a highly accurate proxy for biological sex”.[1] A positive result in this screening test could be combined with a finger prick test for testosterone level to provide further information, and at this point we’re into methods of medical diagnosis of DSDs. About 1 in 5000 individuals will have a DSD, some of which are still unambiguously male or female (e.g. XXY Klinefelter syndrome), and some of which are almost unique individuals that defy categorization.
At this point, it is popular to seize on those rare individuals and declare “aha! So sex isn’t binary then! So it must be a spectrum!”, and while this is surely well-intentioned, it is scientifically illiterate.[2] I suspect part of the confusion is interpreting “binary” as a mathematical Boolean value (where exceptions cannot, by definition, exist) rather than as a scientific classification, where exceptions can and do exist and “prove the rule”.
[0] https://www.sciencedirect.com/science/article/pii/S004269892...
[1] https://www.bbc.com/sport/athletics/articles/cj91dr17d1no.am...
[2] https://richarddawkins.com/articles/article/race-is-a-spectr...