I'm reading about homologous recombination in the context of double-strand break repair. It seems like the trick is that around the break, homologous recombination uses a template duplex to generate some overlap between the broken parts so that the strands can just be complementarily repaired. However, when reading from the template, unbroken duplex, it seems like it's quite important exactly how many nucleotides are generated to form the overlap between the two broken strands. Too little, and no overlap is formed as the broken strands still form two disjoint sequences. Too much, and the broken pieces no longer fit together, there are parts doubled. It's like a puzzle where some pieces describe overlapping regions.
How does the polymerase know to add exactly the right amount of nucleotides?