Suppose that a new Congress gets elected, and they unanimously really, really really hate the government of country X, so much so that they want the US military to basically destroy it. So the government passes a law that not only declares, but also bestows upon the President a legal obligation to see that country X's government is completely upended. It leaves no room for the President to cease hostilities for more than, say, 30 days every 3 years, except as provided for by treaty.
Would this be legal?