I'm waiting to write more about the deal preventing the shutdown until more details are available. For now, I'll refer you to an excellent post by Congressional scholar Sarah Binder, which is the best thing I've seen so far.
But this post is more about your plain blogger, who you may recall did not exactly call this one right: I said that a shutdown was "likely," "very likely," and other such formulations. So I think an explanation is in order.
First, though, I want to emphasize that I can't use the last-minuteness of the deal as an excuse. That the deal happened at the last minute doesn't, at all, mean that it was especially close to not happening. No, a deal is a deal, whether it happens safely before the original deadline five weeks ago or with ninety minutes to go on Friday. About the best I can say about that is that brinkmanship did, to some extent, increase the possibility of miscalculation, resulting in a shutdown even if no one wanted it. I can say, not as an excuse but just to put this in the correct perspective, that when one talks in probabilities then one isn't really "wrong" if things go the other way. That is, I think I wrote somewhere that there was an 80% chance of a shutdown...that might have turned out to be true even though in fact there was no shutdown. So there's that. But, on the whole, I think I got this one wrong.
What I thought was going to doom this one were the policy riders added to HR 1. I said, and I still believe, that splitting money differences is pretty much always fairly simple, but compromising on policy is a lot harder. Remember, HR 1 didn't just contain the Planned Parenthood language; it also effectively tried to repeal ACA and to prevent EPA from regulating carbon -- and, on top of that, had dozens of other big and little policy matters. As it turned out, the House didn't fight at all, as far as I can tell, on ACA, and may not have fought very hard on EPA.
So: I agree (and had agreed) with Binder's analysis, which is that neither Speaker John Boehner or President Barack Obama wanted a shutdown. But I didn't think that the Republicans would be willing to let Boehner compromise away all that policy stuff. In that, I was clearly wrong. I've said before I was impressed with Boehner, but I obviously didn't take that as seriously as I should have. In the end, Boehner's incentive to get to a deal (along with Obama's incentive to get to a deal) mattered more than the incentives and preferences of House Republicans to take a visible stand over climate, health care, Planned Parenthood, and other items.
As far as who got the better of the deal...again, I'm not sure yet, but my general sense is that liberals seem to be ignoring the areas in which the Democrats won; compare HR 1 (which was the actual GOP first offer) to the final deal, and my guess is that the Republicans "won" on the size of spending cuts, but that the Democrats won on all the major policy stuff and, perhaps, on where the cuts were -- although, again, all that is tentative until we see the details. In general, I agree with John Sides that observers tend to be too focused on the details of negotiations, and not focused enough on the fundamental logic of the situation. But I'll write more about this later.