Well it depends on other factors, but that's not the point. In this situation:
* Firstly, who's to tell Liblanders that they risk invasion? It's not clear that Libertarianism supports the notion of foreign policy, diplomacy, espionage etc.
* Secondly, all the food in the country is coming from Xia. Once demand grows Xia realises that Libland has recognised the threat and invades immediately.
The same way we find out about anything. Companies like Reuters and CNN tell us while the CIA is still snoozing.
It is entirely clear that Libertarianism does support those things and one of the two roles of a Libertarian government is the physical security of the nation and its citizens.
OK, I'll grant you the existence of the media reporting from foreign countries (although I fail to see how the "What's Xia up to" branch of Reuters makes any money).
Now, a worthy chap sees a report about Xia on CNN and gets suspicious. How's he going to get enough money to mount a publicity campaign warning Libland citizens of the danger?
There might be food insurance companies. They would have advertisements telling people of a probable military intervention by Xia
and recommend people to buy food insurance in order to be safe.
Regarding your second point: The realization that Xia might attack will probably not come suddenly but slowly. So people will
gradually begin investing in food insurance. It's unlikely that Xia turns from friend to enemy in a matter of days.
The realization that Xia might attack will probably not come suddenly but slowly
Just like 9-11, Dec 7, 1941, the anschluss, mongol invasions...the Hitties and Philistines versus the Israelites, yeah, military ops are always telegraphed.
"Austria was merged into Nazi Germany on 12 March 1938. There had been several years of pressure from Germany and there were many supporters within Austria for the "Heim ins Reich"-movement, both Nazis and non-Nazis." - http://en.wikipedia.org/wiki/Anschluss
Your less specific in the details of your other facts so it's hard to get specific counter-facts on them.
* Firstly, who's to tell Liblanders that they risk invasion? It's not clear that Libertarianism supports the notion of foreign policy, diplomacy, espionage etc.
* Secondly, all the food in the country is coming from Xia. Once demand grows Xia realises that Libland has recognised the threat and invades immediately.