Whenever I have a problem, I always ask "how can I cut the possibilities in half". Start by removing R6 and power back up. Are you getting +2.5V at the non-inverting input? Measure R6 in hand with a DMM to ensure it's the correct value.
Removing R6 provides a pad allowing you to feed in a voltage for further troubleshooting.
Ensure power and GND are hooked up properly to the comparator.
Disconnect all external signals, measure voltage at dividers to ensure correct. If not start removing parts to figure it out.
R12 (1K) and R6 (36K) are in parallel with R1(10K) when the output is high (open collector). You have a LOT of hysteresis in either direction with this circuit.
It could be test equipment...these are DC values. Measure with a good DMM to verify what your scope is showing.
I've done most of that already, and see correct voltages, resistor values, etc.
But the challenge is, this problem only occurs 1 out of maybe 50 of 100 power ups.
I know it has a lot of hysteresis, but the signal fluctuations are big. It controls the water level a heated water tank (125'C). Hot vapor makes the signal fluctuate a bit, but when the pump auto-fills to maintain level, it rocks the water surface a bit back and fourth, so it sometimes touches the level probe, which leads to great fluctuations.
The scope is for sure off. I just verified the four signals with a Fluke 183:
Ch1: 5.24V - Fluke: 4.981V
Ch2: 1.24V - Fluke: 0.88V
Ch3: 3.32V - Fluke: 3.826V
Ch4: 6.02V - Fluke: 4.928V
I read somewhere that the hysteresis resistor is always much greater than the reference resistors. So I replaced the divider (R3, R4) with 10k, and kept the 36k hysteresis.
To mitigate the signal fluctuations with the new narrower hysteresis, I replaced C2/R5 with 10uF/100k. Helped a lot, but not perfect.
Before (with 100k v-ref) it was quite stable (except the occasional low comparator input, which makes the pump run forever).
I hope my switch form 100k to 10k eliminates the occasional low comparator input.