But searching on Google Books etc. all the uses that fit the modern meaning are related to programming/software testing, and even those examples are relatively recent.
Is this correct or am I missing something?
suggests it's a low-dimension version of "corner case", which I believe comes from aerospace*. (both spike in 1947-1957, which, albeit possible, seems early for a software origin)
* compare "coffin corner": https://books.google.com/ngrams/graph?content=corner+case%2C...