I'll mostly agree with all of that, although I don't think ad hoc rulings are ever required.
It might even be illustrative to step through some of these scenarios and see if anything bad happens, or if the DM ever needs to adjudicate. In the Eloelle example:
In Scene 1, Eloelle fails an Int test but declares, "I know the answer, but unfortunately I have been commanded to not share it with you."
Since nobody else passed the test, the heroes are unable to open the door / solve the riddle / whatever.
In Scene 2, Eloelle has been captured by an evil sorcerer (or, more likely, a good paladin...) who uses Zone of Truth and commands her to reveal the secret. She again fails the test. So she declares (to the table) "Ha! What pitiful magic. But I shall play along so that the Sorcerer will give up. I pretend to be affected by the spell and reply that I don't know."
Ok, we're still good. Mechanically she doesn't know the answer because she failed the Int test to know it, so now when she says "I don't know" she's being truthful. So far the narratives are consistent AND the underlying mechanics are consistent, even if they seem to be contradict each other.
So what happens next? What contrived scenario can we (meaning "you") come up with that might force us into a paradox, where eventually we prove that Eloelle is a moron, or the DM has to adjudicate, or we otherwise encounter something that makes either or both of these two parallel arcs, the narrative and the mechanics, inconsistent?
You describe the scene and the die roll, I'll narrate.