A good mystery should keep the reader guessing until the very end, but the clues must all be there.
The basis of optimism is sheer terror.