I have seen this happen multiple times:
The candidate likes the company, succeeds at the interview. Then comes to work and at the end of the first day he is sure the codebase/project is not what he would like to spend time with. So he leaves quickly.
I think that introducing candidates to the codebase at the interview could potentially solve this problem. Maybe even better: mixing this with interview questions like "how would you improve this part of the code?" This way, it would be obvious if the candidate is a "good fit for the codebase".
Have you seen this approach applied anywhere? Would you show your own codebase to the candidates at the interview: if they asked/as part of the interview process?