For new overhead light fixtures like this that normally come with long-ish wires, is the entire length of the wire supposed to be in the electrical box? I assume that the part with the wire nuts must be, but does code allow for the rest of it to sit on top of the fixture's insulation but outside of the recessed box?
There is going to be some of the wire loose above the cover to allow the fixture to be wired 410.20. I don't see a specific length listed in section 410 (luminaries, lamp holders & lamps). Installing the fixture per the manufacturers instructions is the key because there are so many diferent types code doesn't always give specific requirements. An example of this would be a 4" canopie or shell may only need 6" of free wire to be able to make the connections but a 12" canopie or shell may require 8-10" to make the connections. Hope this helps.