Observation or calculation: which is the primary determination of "tzeit ha-kochavim"?

I have always thought that Shabbat ends when three stars are visible, and that in the event that the sky is cloudy and no stars are visible, we use a calculated time of tzeit ha-kochavim to determine when Shabbat ends. But if stars are visible before the calculated time, the actual observation takes priority, and Shabbat is over.

It seems to me that many seem to hold the exact opposite: that Shabbat ends at the calculated time of tzeit ha-kochavim, and if you don't happen to know that calculated time, you can rely on direct observation. But if you know the calculated time, and it hasn't arrived yet, it doesn't matter what you see in the sky; the calculated time takes priority, and Shabbat is not over until that time is reached.

Is there a consensus over which way of determining tzeit ha-kochavim (observation or calculation) is "primary", and which is "secondary"?

Note, I am not asking here the same question asked at Where did the various opinions about tzeis begin?, which is about the various methods used to calculate tzeit ha-kochavim. I also don't want to get into the details of "small stars" vs. "medium stars" or similar variation. Let's assume for the sake of discussion that we all agree on which calculations to use, and which kind of stars we are supposed to look for. There still remains the question of what happens if you actually see stars before the 'official' time is reached.

• What sort of calculation would anyone have used before modern tech? Seems clearly backwards. Commented Apr 2 at 19:47
• The Shulchan Aruch rules that if it's cloudy you wait until any doubt you have is gone, not that you use some sort of calculation. Commented Apr 2 at 19:49
• @DoubleAA that's what I assume, but many seem to hold that you wait until the "published" time, regardless of what is in the sky, and I'm trying to understand if that's the consensus view or just some chumra Commented Apr 2 at 20:08
• This may come down (at least partially) in how confident one is at identifying the size of the stars observed. Commented Apr 2 at 20:25
• In theory the published time reflects the degree of darkness necessary to get the right stars - so how can you see those stars before the time?
– AKA
Commented Apr 2 at 20:26