A fundamental tenet of electrical wiring safety is that all connections (of AC household wiring, typically 120 or 240v) be enclosed in rated electrical boxes.
However, ceiling light fixtures and fans are typically mounted to 4" diameter circular boxes (heavier-duty ones for fans and other extra-heavy things). I note that very often the top (or "bell") of such fans and lights are considerably greater than 4" in diameter. Thus, there is an annulus of exposed material around the perimeter of the round 4" box, and the connections of the fan or light to the incoming wiring (typically NM-B or "Romex") are not completely enclosed.
Is this acceptable ? Is it ok to simply push the wirenuts (which make the connections) up into the box ? Should one fabricate a piece of sheet metal which fits flush against ceiling surrounding the box ? Or one of the available decorative such pieces ?