Actually if Rosalind is the guilty one, the beating can be brought up during the judgement. Even if she's not, the bartender does remark that she'll get punished for that but you need to focus on the parents.
Miranda figures the code as a safety measure to prevent player from losing the whole game if you can't figure it out yourself.
Thanks for trying out my game!