It was MORE than HALF CENTURY AGO! And it was not a sneak attack - Chicoms issued plenty of warnings:
[...] By late September, China had sent numerous diplomatic signals expressing its concern regarding a US occupation of North Korea. The Acting PLA chief of staff told the Indian Ambassador in Peking that China would never allow US forces to reach Chinese territory. The Indian Foreign Minister conveyed this message to the US Ambassador in New Delhi; in Washington, the British Ambassador passed the same message to the State Department. These private notices were matched by a 22 September public announcement in which the Chinese Foreign Ministry spokesman issued the statement "We clearly reaffirm that we will always stand on the side of the Korean people, and resolutely oppose the criminal acts of American imperialist aggression against Korea and their intrigues for expanding the war." Also during this period, communications intercepts continued to identify massive PLA troop movements from southern and central China into the Sino-Korean border areas.
Discounting the Chinese Threat
In the face of these warnings, the JCS instructed MacArthur to continue his advance north to destroy the DPRK armed forces as long as there was no threat of a major Chinese or Soviet intervention. These instructions were based upon a National Security Council decision made before the Inchon landing. The Secretary of State also disregarded these warnings, telling the press that Chinese intervention would be "sheer madness."
By the end of the month, the US Ambassador in Moscow reported that Soviet and Chinese contacts told both the British and Dutch Ambassadors that if foreign troops cross the 38th parallel, China would intervene. This specific warning was also repeated to various journalists, and on 29 September, the Associated Press in Moscow reported that both China and the Soviet Union would take a "grave view" of US forces crossing the 38th parallel. Finally, at the end of the month, in a major public policy address celebrating the first anniversary of the establishment of the People's Republic of China, Zhou En-lai branded the United States as China's worst enemy and stated that China will not allow a neighbor to be invaded.
Once again, these warnings were ignored, and US-UN forces continued to push the DRPK forces northward.[...]
The Yalu River border was the only thing that the Chinese had a right to bitch about. One we never crossed. Unfortunatley. As for it being a surprise, obviously it was. It was regarded as bluster, pure and simple. All of their military movements were kept completely secret.
But it doesn't change anything. The "plenty of warnings" were essentially nothing that McArthur or JCS were convinced by. If they even saw the "intercepts" intel at all, they probably wanted aerial confirmation. The JCS instructions were clear, to hold up if there were a real threat. Instead, the Chinese went for the sneak attack from behind the lines coming down from their pre-positioned North Koreanmountain hideouts, rather than an open crossing of the Yalu. All movements had been done at night.
If we had better surveillance then, we would have spotted them, and our bombers would have had a field day while they were relatively immobile. They would have been annhilated, even with our puny forces on the ground.
But such an tactical operational requirement did not in fact warrant the secrecy if they strategically merely wanted us to hold up...they simply had to OPENLY make clear they were serious. Our chicken-shit marching orders would have forced a pull-back.
The main factor in deterrence is credibility.
The Chinese "long memories" pine for making reality again this political map...
This is more than Qing Dynasty boundaries. And we should not be sanguine about their risking direct attacks on the U.S. homeland to perfect their invasions and subjugations of these lands.