The deal between Middleborough and the state came after the town last month sued the state housing office for an exemption ...