I mean, a giant butterfly would have Stalin take such an invasion as a serious threat and actually prepare.
Stalin was taking it seriously and was preparing. The whole schtick about 'Stalin didn't believe into impending attack' is just Soviet variant of 'Hitler was an idiot and if not his meddling, Germans would have won'. A lot of people let's say weren't at their best in 1941, Stalin conveniently died relatively soon after the war and so he become rather convenient scapegoat for everyone who didn't want to talk about their own failures.
The core issues about Soviet (not only Stalin, it was a general impression among the Soviet higher ups) perception of possibility of German attack in 1941 were three major 'faults' in their foundational assumptions:
First thing was that Soviet intelligence failed at two important things: they over-estimated the total size of the German military by like 50% - they thought Germans having about ~250-270 division equivalents while in reality Germans had ~170 or so. This lead to misjudging the troop concentration along the Soviet-German border as 'Germans not yet posed for the offensive operations' and secondary failure was in the intelligence analytics department.
To put it simply: Soviet spy agencies were feeding essentially raw data to the leadership without serious attempts to provide actual analysis and 'what this data actually means'. Which in a turn lead to informational overload for Stalin and his inner circle that impeded their ability to correctly access the situation. Most obvious example of that is infamous 'warnings about German attack' that Stalin no less infamously ignored. The problem was that these warnings were coming in since at least late 1940 with dates for the attack shifting constantly back when previous called date approached. 'The boy who cried wolf' situation more and less.
Second thing was that Soviets considered themselves to be much stronger than Germans considered them. So the idea that Hitler will attack USSR to compel British to seek peace was utterly alien to the Soviet higher ups, Stalin including. This line of reasoning was never ever considered by anyone because of its obvious absurdity. Therefore it was assumed that Germany would have to conclude the war against UK in one way or the other before attacking USSR. It is also one of the reasons why British warnings were met with suspicion, as they were viewed as desperate attempts to prolong the war and a sign that UK is ready to fold and want to distract Germans and gain better bargaining position by threatening to involve USSR in the conflict.
To summarize: Soviets did not consider themselves to be a secondary target in comparison to United Kingdom. So the idea that Nazis would wage war on both of them at the same time was not contemplated much.
And the last third thing is related to the first one: Soviet intelligence simply failed to correctly estimate dynamics of German force deployment the German-Soviet border. They put it as about ~80 divisions as early as November 1940 and therefore failed to notice steady troop strength growth throughout the spring of 1941 because new troop movements were interpreted to backfill the previously established numbers. So Soviets reported maybe 30-40% growth in troop strength along the border by May 1941 while in reality it was more like 300-400%, from the initial 20-30 divisions in November 1940 to 110 or so by end of May 1941.
Which in combination with abovementioned over-estimation of the total German army size lead to the conclusion that it was still not an offensive posture. Soviets didn't consider an attack with ~120-130 divisions as viable thing strategically. And
they were correct about that. It just Germans considered things differently.