The right of every child to a good education and the desire to keep teens who commit minor offenses from lives of serious crime should be shared values, not partisan bargaining chips in a brutal budget battle.

Republicans wanted increased public funding for charter schools and more of them, lifesavers for students whose traditional public schools are failing. Democrats wanted to raise the age of criminal responsibility to no longer treat 16- and 17-year-olds charged with nonviolent crimes as adults, increasing the chances these kids can get back on track and stay out of trouble — a stance echoing a national bipartisan consensus for a more humane and effective criminal justice system.

Fortunately, Gov. Andrew Cuomo got agreement on both issues in a $153 billion state spending plan for 2017-18 that makes other good criminal justice reforms and assists the middle class.

Part of that help is a plan to offer free college tuition at state schools for students whose families make up to $125,000. It rolls out over three years and will remove some barriers to higher education for more New Yorkers struggling to get ahead.

Money will be set aside to ensure indigent defendants and immigrants get capable legal representation. And decades after the video-recording of police interrogations became common nationwide, New York will now require it, a protection for the police and prosecutors and the accused.

While we applaud Cuomo’s regional approach to big infrastructure (see the Tappan Zee Bridge and LaGuardia Airport), there still is too little transparency on economic development spending and too little oversight on executive branch actions. That must change.

Missing again were significant ethics and voting reforms. They don’t need to be included in the budget discussion but often that’s the only way to get such things done. It was another missed opportunity.

All wars have casualties. But this one also produced some real wins, no matter which political party is doing the tally.