The assumption that items is a singleton for IRA incentives was
broken a while ago. This meant that some IRA incentives were
incorrectly getting filtered out, because only items[0] was being
checked for overlap with request.items, rather than all of them.
The first-party calculator wasn't affected by this, because it passes
all the items in every query.
Test Plan
yarn test. This case was being exercised by an existing snapshot
test. The bug was introduced in 77d0ff6c7 and I dutifully updated the
snapshot there, but didn't notice the problem.
Description
Reported in #525
The assumption that
items
is a singleton for IRA incentives was broken a while ago. This meant that some IRA incentives were incorrectly getting filtered out, because onlyitems[0]
was being checked for overlap withrequest.items
, rather than all of them.The first-party calculator wasn't affected by this, because it passes all the items in every query.
Test Plan
yarn test
. This case was being exercised by an existing snapshot test. The bug was introduced in 77d0ff6c7 and I dutifully updated the snapshot there, but didn't notice the problem.