what happens if you fail and your in residency, how does this affect you?
I think it depends on the program and program director.
I don't know, but your Step 3 results are supposed to be your private information. Aren't they? So it depends on you, to divulge them.
If you are in residency, PD has to know if you passed or not
"The NBME reports the results of the USMLE to LCME- and AOA-accredited medical school programs for their students, who are enrolled at the time of application, and graduates. "
It never says Residency Programs. Or I might be wrong, but it's not on their site anyway:
http://www.usmle.org/bulletin/scores/#reporting
No every program director might have their own ways, but clearly I think that inevitable reporting pertains to step 1 & 2, doesn't seem to be for Step 3.
Some programs require residents to pass step 3 before advancing in the 2nd year of residency. Therefore, the residents have to provide proof of a passing result if it is required by the program.
Step 3 is via
http://www.fsmb.org/ so it may be different. I haven't looked into it but I would assume program directors need to know Step 3 if you are in residency.