The phrase "sanity check" comes up often in programming, e.g.
It's a good sanity check before attempting to decrypt the key.
Usually, its context is one in which a commonly assumed state (e.g. no memory corruption) is being tested, explicitly. For a long time, I interpreted "sanity" as the state opposed to "insanity", e.g.
It's a good check to make sure we don't lose our minds before attempting to decrypt the key.
Because of the many instances I'd spent hours, or days, debugging a mysterious bug, only to find the cause to be some uncommon state in the environment or data, this interpretation made sense to me; a sanity check would have saved my sanity.
Then one fateful day I perceived that "sanity" had a more canonical meaning: cleanness, e.g.
It's a good check for cleanness before attempting to decrypt the key.
Which is the interpretation meant by the phrase, "sanity check"?
I can go on using the phrase without knowing, since both interpretations fit the usual situations that call for it. But I'm curious to know, and I'm afraid emailing my coworkers a poll about their interpretations might cause them to question my sanity.