If there's no chance of success, why roll at all?
The middle way assumption is that you are calling for checks only when the outcome is uncertain and when there is a consequence for failure.
The post I responded to was talking on an impossible check, not a possible check that was failed and not allowed a retry.
On that, though, I find that it's best form to make sure this is represented in the fiction and not just an unexplained game element. Usually, a check can't be retried because the situation that allowed the check no longer exists.
There's been a miscommunication here. My point is that someone isn't always mentally capable of solving a problem, even given unlimited time, not something necessarily impossible to begin with. The game rules can allow for the DM to call for a check if there's a possibility of success. If there's a secret door and you fail to locate the trigger mechanism, you shouldn't be guaranteed success simply because you take longer at it. The idea of it being in a different area (or one way door) shows how the character can't even guarantee they know what they're looking for. They could have simply overlooked the trigger, or even tried the trigger the wrong way, eliminating it from their future attempts.It looks like in some of your examples, we shouldn't even be rolling at all. One reasonably needs the clues to make the deduction and if they are several rooms away, the deduction can't be made. Lacking mental ability to do thing at all also precludes there being a check.
As I mentioned in my original comment, this isn't something that many prefer as a playstyle, but a lot of us do. The key to allowing failure is to make sure that the adventure cannot fail due to a single die roll. The PCs might have to find a way around the secret door, figure out a way to bypass/destroy it, or simply not get whatever treasure/reward might be hidden inside. In any case, there's a consequence for their failure.