Hypothetical obviously as we thankfully didn't actually crash.
We were approaching a roundabout with traffic lights. Our light was still on green. A car from the right shot throughout the lights on the roundabout and nearly hit us but thankfully DH slammed on the brakes.
The rest of the traffic at the lights on the roundabout started moving, but our light was also still on green.
As we drove round the rest of the roundabout there was a guy in a yellow vest fiddling with the wiring box for the lights.
Clearly he was trying to fix a fault.
If we had actually crashed, who would have been liable?