A recap and analysis of the week in state government.

At around 8:30 p.m. July 31, a weary Rep. Claire Cronin emerged from the House chamber. She was on her way to another meeting, and had been fending off the same question from reporters for hours.

"Are you any closer to a deal?"

"It's not over 'til the heels come off," the Easton Democrat said over her shoulder, her shoes click-clacking down the marble hallway.

Cronin was on the House-Senate conference committee trying to negotiate compromise legislation to overhaul the state's public education funding formula. But by the time the gavel fell in the House at 1:12 a.m., there was no deal. And the shoes were off.

Like negotiations over a significant health care reform bill, education talks collapsed under the weight of deadline pressure and competing Democratic ideologies, and perhaps a touch of ego.

And while it remains to be seen whether the 190th General Court will be most remembered for what it did accomplish (and there were may things) or for what it didn't, the early returns suggest it might take a while for people to forget the messy chaos that was the final days of formal session.

We'll never know what might have happened if Senate President No. 2 Harriette Chandler had stayed on as president through July 31, or for that matter, if Senate President No. 1 Stanley Rosenberg had never left.

Would House-Senate relations have been smoother in the final hours? Would the House and Senate have worked the weekend and let fewer secondary bills die? Might some lucky bettors have struck it rich on a horse race at Suffolk Downs Aug. 2?

Gov. Charlie Baker, after seeing the dust settle, certainly thought there was something to his warning that the "opportunity cost" of delivering a three-week-late budget would take its toll eventually.

It's not at all unusual for the biggest decisions to be made in the final days of the session, when backs are against the wall and compromise means not having to tell constituents, "Wait 'til next year." And in some cases, it worked.

Baker, after all, does have a pile of legislation on his desk investing millions in environmental protection and job development, expanding access to life-saving overdose drugs, accelerating the state's transition to clean energy, limiting the use of employee non-compete agreements and implementing automatic voter registration.

These bills were the exclamation points on a session during which lawmakers enacted new gun control laws, protected women's access to contraception and abortion, raised the minimum wage and adopted a statewide paid family and medical leave program.

House and Senate lawmakers also thought, after four months of talks, that they had resolved the question of how to tax and regulate short-term rentals through websites like Airbnb. The compromise bill would apply the state's 5.7 percent hotel lodging tax to all short-term rentals and give cities and towns the option of tacking on additional taxes to help pay for affordable housing and infrastructure.

But after passing the compromise bill through both branches, lawmakers heard from the governor that he had concerns. Baker has long expressed his reservations about forcing homeowners that only occasionally rent out their properties to collect taxes on those rentals, and he certainly didn't like the idea of forcing those same people to register their homes and apartments with the state.

Baker, according to multiple accounts from people involved, offered to work with the Legislature to tweak the bill before formal sessions ended. But when all the parties would not agree to go along, he waited until the day after formal session ended to send the bill back with an amendment, threatening to derail a resolution to the issue until at least 2019.

That spat wasn't half as ugly, though, as what happened between the House and Senate after talks broke down over health care and education.

The effort to swing to the rescue of cash-strapped community hospitals dissolved into a puddle of accusations from Senate leaders that the House was a puppet for Partners HealthCare and the Massachusetts Hospital Association, led by former Rep. Steve Walsh. Meanwhile, the House suggested the Senate didn't understand the urgency of the situation and why a "market-based solution" instead of cold, hard cash would take too long to make a difference.

In the end, the community hospitals got nothing, and a whole bunch of ideas to expand telemedicine and the scope of practice for some providers went down with the ship.

Education advocates are equally furious that the Legislature couldn't come to terms on how to implement the now-3-year-old recommendations put forward by the Foundation Budget Review Commission, chaired by the same two lawmakers -- Sen. Sonia Chang-Diaz and Rep. Alice Peisch -- who couldn't deliver a bill by July 31.

Peisch took a softer approach to explaining what happened, issuing a statement about how the "good faith" negotiations had become "complicated by new information obtained from the Department of Elementary and Secondary Education." That might have had something to do with how some communities, including Boston, stood to gain almost nothing in terms of new funding from the bill, according to sources.

But Chang-Diaz could not contain her frustration. A "dark day" was how the Jamaica Plain senator described it.

"I have only good things to say about the House conferees, who I believe really wanted to get to a deal. Yet, in the end House leadership rejected all our offers, moved the goal posts, and then killed the bill completely — stunningly, by rejecting one of their own proposals. I've seen a lot in my 10 years in this building, but I've never seen so many rationalizations and double-standards employed to avoid doing what's right for kids," she said.

It was then, sometime after midnight, with the bombs dropping, that it appeared it might be a good thing for the House and Senate to be able to retreat to their respective corners for a few months, regroup and reset.

But House and Senate leaders would have to wait for that alone time, because after Senate President No. 3 Karen Spilka got flak for giving the Senate the weekend off, she almost did the same this week for horse racers.

In the frenzy of the final night, the Senate had failed to keep a bill reauthorizing horse racing and simulcasting in the Massachusetts moving. Races at Suffolk Downs scheduled for Aug. 2 had to be rescheduled, workers were sent home and the Legislature had to scramble to put something in place to avoid a total washout of the weekend's races in Revere.

The snafu with the tracks was able to be resolved in informal session, but the same might not be true for a host of other bills that died on the vine, including Spilka's legislation to make gender-neutral licenses available through the RMV.

Baker's housing bill to jumpstart construction petered out (though he and Rep. Kevin Honan say it still has an outside chance), as did a bill to ban conversion therapy for minors. Comprehensive sex education legislation died in the House, again.

And what about House Speaker Robert DeLeo's promise to Democrats at the Worcester convention in June that he stood ready to respond if the Supreme Court struck a blow to the finances of public sector unions? Well, the Senate at the last moment surfaced and passed a bill to help the unions, only to see it disappear into the pile in the House.

And that's how the session ended, freeing lawmakers (at least most of them) to return to their districts to promote and defend their actions and inaction.

As it turned out, 15 legislators in the House and Senate cast their final roll call votes July 31.

But one of those retiring lawmakers came as a surprise Aug. 2. Almost six months after dropping out of the Democratic Party and four months after launching his re-election campaign, Amherst's Solomon Goldstein-Rose announced that he was withdrawing altogether.

One of two independents in the Legislature and the youngest lawmaker on Beacon Hill, Goldstein-Rose has served for just one, two-year term. He suggested in a letter to supporters, however, that he's hoping to latch on to a presidential campaign in 2020 and promote progressive environmental policy at the federal level, rather than continue toiling on Beacon Hill.

The means one of the two Democrats running in the Third Hampshire District will join DeLeo's flock next year and, in all likelihood, will be asked to cast their first vote for the gentleman from Winthrop, who on Aug. 4 became the longest continuously serving speaker in the history of Massachusetts.