I think you're being rather generous here. By all accounts, Stalin did not wake up to the seriousness of the German threat and the unpreparedness of the Soviet Army until the Winter War against Finland in late 1939, and even this didn't stop him from purging the Red Army to the tune of executing 30,000 officers until the Germans finally invaded.
The one foresighted move that really saved their bacon was moving most military production including tanks deep into the Russian heartland, safe from the German advance.