Councillors okay millions to keep affordability of Alewife units; 504 homes have been at risk