Mark31,
Generally (you didn’t reference any specific code) on a pipe butt weld test, you are allowed a certain amount of end preparation or cleaning to comply with the welding procedure (bevel angle, land etc.), and for alignment. Any work to the ID of the pipe is usually done with a file. After the test has begun, no welding or grinding on the ID is allowed. We use a small die grinder with a wire wheel to clean the root area of all slag and smoke residue before visual and RT. All codes have specific instructions for preparing weld specimens for destructive tests.
Random RT is used to verify the minimum 1/16” gap on socket welds but it will disclose discontinuities in the fillet weld also, a common one being porosity. We request a supplemental specification that includes acceptance criteria and the amount of progressive sampling if the examination of socket welds is requested. (Of course when the verification RT does show a crack or major inclusions, the contractor always cuts them out).