Looks like they never updated the calculator. Amendment 2023-23 removed affordable units in this zone: https://online.encodeplus.com/regs/somerville-ma/doc-viewer.aspx?secid=8#secid-920Playing around with the calculator on the Somerville Zoning website, it looks like 3 units requires 1 affordable in NR zones. 2 units would drop to zero affordable.
The builders of 4 Princeton St subdivided into two lots so that each duplex was two luxury units. The building reads as a single 4 unit building from the street.
Im guessing the Princeton Street project that you referenced was permitted before the amendment.