This all on same breaker. Left, spliced wires are hot, but do nothing and there’s no switch for them.
Wires on the right are on a switch that controls two other lights closer to the breaker.
Can I just removed the splice and terminate the hot wires into a box mounted on the rafter?
i think the spliced goes to these wires, then leads somewhere else?




If there are two hot wires for that it seems most likely they went to a switch at some point. I doubt what you have now would burn down the house anytime soon but putting them in a box is a good idea. If it was me I’d get circuit tracer and verify your hunch about them going to that old wall box. If they ended up not going there I’d just do the splice properly, shove it in a box and never think about it again.