Months after the partisan clash that led to the longest shutdown in history, lawmakers have agreed on spending bills that look far different from what the president wanted.