Diffraction follows effective aperture. But don't be to much concerned about diffraction. If the lens is at optimum at f/8 when used at infinity my guess it will also be optimal at f/8 at 1:1 event if that mean f/16.
Modern lenses use internal focusing and floating elements, that may cause a reduction in focal length and also less loss of aperture due to extension. Yo can get the actual focal length at 1:1 by dividing subject to sensor distance by four.
I have a 35mm format 55mm fully manual focal length macro lens that let's say for the sake of argument beings to exhibit decreased resolution from diffraction effects at apertures above f8. Now if I set my aperture to f8 on the aperture ring and shoot something at a 1:1 reproduction ratio (which means racking out the lens about 2"), the effective f stop of the lens is actually f16 (more or less) although the diameter of the opening in the iris has not changed. (This is not one of those macro lenses that opens the iris as you focus in so as to maintain the actual light transmission of the marked f stop.)
My question is, to avoid decreasing resolution from diffraction effects at this 1:1 reproduction ratio, do I have to open the physical aperture to f4 so my effective aperture is f8, or does the change in effective aperture from extending the lens have no effect on diffraction?
Thank you for any enlightenment on the subject.