Record golden outputs of current behavior before a refactor, then diff outputs after to prove behavior is unchanged.