Step 1: List the three stages where a casting can contract.
A metal shrinks in three separate stages as it goes from pouring temperature down to room temperature, first as a liquid cooling toward its freezing point, second while it is actually changing from liquid to solid, and third as the now solid casting continues cooling further.
Step 2: Notice which stage is dangerous and needs active compensation.
Liquid shrinkage before freezing begins is simply handled by keeping the gating and riser topped up with more liquid metal, and solid state shrinkage after freezing is handled passively by making the pattern slightly oversized in the first place.
Step 3: Focus on the stage that actually creates internal defects.
It is specifically during the liquid to solid transformation that voids and porosity form, because this is the stage where the material is changing density rapidly and the solidifying shell can trap pockets of liquid that later become cavities. This is exactly the shrinkage that risers are designed to fight, by continuously feeding molten metal into the casting precisely while it is solidifying.
\[ \boxed{\text{only during transformation from liquid to solid}} \]