A crucial feature of the Senate plan, called the First Step Act, is the inclusion of so-called front-end reforms with the goal of a more rational sentencing process. The House version, passed in May, focused solely on “back end” reforms, such as improving prison conditions and easing inmates’ re-entry into society. But tending to the existing prison population without tempering the draconian sentencing laws that caused that population to explode in recent decades is, as Charles Grassley, the chairman of the Senate Judiciary Committee, has put it, “naïve and unproductive.” That’s why reform advocates saw the House bill as worse than nothing, a cheap attempt by Congress to move past the issue without addressing one of its core problems.

The Senate bill aims to be more comprehensive. It would reduce mandatory sentencing guidelines for certain drug crimes, allow judges greater wiggle room in sentencing nonviolent drug offenders, do away with the “stacking” provision that tacks on years for the use of a firearm during the commission of a crime and, at long last, make retroactive the Fair Sentencing Act of 2010, which reduced the sentencing gap between crack and powder-cocaine offenses.

Details of the bill began making the rounds early this week, and the initial reviews among advocates were solid, if not entirely glowing. Most notably, some reformers expressed disappointment that the bulk of sentencing changes would not apply retroactively, leaving thousands of inmates serving excessive terms under the old guidelines. But even the skeptical agreed that the plan was a major step forward.

The Brennan Center for Justice, a prominent voice in the reform movement and one that vigorously opposed the House’s bill, quickly came out in support of this version. “The original First Step Act would have little effect on reducing prison populations and was a concession to Jeff Sessions — one of the only people against sentencing reform,” said Inimai Chettiar , head of the center’s Justice Program. “We support this week’s Senate compromise bill because it includes several key sentencing reform provisions” carried over from the Sentencing Reform and Corrections Act.

Further fueling optimism about the legislation’s future, last week the Fraternal Order of Police issued a statement in support of the bill, specifically endorsing its sentencing reforms. This is a significant shift from February, when the group sent Mr. Trump a letter opposing previous sentencing reform efforts. The bill has also been endorsed by the International Association of Chiefs of Police, Law Enforcement Leaders to Reduce Crime and Incarceration, the National District Attorneys Association and the National Organization of Black Law Enforcement Executives. Other groups have withdrawn previous objections.