Skip to content

Conversation

@mkomorski
Copy link
Collaborator

@mkomorski mkomorski commented Dec 9, 2025

This PR adds deferS2Sbidders flag to tcfControl module configuration which prevents from excluding server bidders from the auction because GVLID is unknown

Type of change

  • Bugfix

  • Feature

  • New bidder adapter

  • Updated bidder adapter

  • Code style update (formatting, local variables)

  • Refactoring (no functional changes, no api changes)

  • Build related changes

  • CI related changes

  • Does this change affect user-facing APIs or examples documented on http://prebid.org?

  • Other

Description of change

Other information

#12084

@mkomorski mkomorski marked this pull request as ready for review December 9, 2025 12:32
@coveralls
Copy link
Collaborator

coveralls commented Dec 9, 2025

Pull Request Test Coverage Report for Build 20264476124

Details

  • 29 of 29 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 96.215%

Totals Coverage Status
Change from base Build 20079206923: 0.001%
Covered Lines: 207040
Relevant Lines: 215185

💛 - Coveralls

return true;
}
const vendorConsentRequred = rule.enforceVendor && !((gvlId === VENDORLESS_GVLID || (rule.softVendorExceptions || []).includes(currentModule)));
const deferS2Sbidders = rule.purpose === 'basicAds' && !gvlId && rule.deferS2Sbidders;
Copy link
Collaborator

@dgirardi dgirardi Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the intent of #12084 is to do this only for bidders going to prebid server. As it is this means "do not require a gvl id for purpose 2", but that should not apply to client side bidders.

enforceVendor: true,
vendorExceptions: ['bidderA']
vendorExceptions: ['bidderA'],
deferS2Sbidders: false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that the value of deferS2Sbidders can change the output of validateRules(), do we think having a unit test that demonstrates at least one case where it is true would be useful?

@github-actions
Copy link

Tread carefully! This PR adds 2 linter errors (possibly disabled through directives):

  • test/spec/modules/tcfControl_spec.js (+2 errors)

// filter out bidders that cannot participate in the auction
au.bids = au.bids.filter((bid) => !bid.bidder || dep.isAllowed(ACTIVITY_FETCH_BIDS, activityParams(MODULE_TYPE_BIDDER, bid.bidder)))
au.bids = au.bids.filter((bid) => !bid.bidder || dep.isAllowed(ACTIVITY_FETCH_BIDS, activityParams(MODULE_TYPE_BIDDER, bid.bidder, {
isS2S: serverBiddersCodes.has(bid.bidder)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately a bidder can be both client and server and this would be too permissive in that case.

You get to know who's going to client / server only after partitionBidders below here, so I think you need to either:

a) move the partitionBidders above this, use it to determine isS2SOnly, then filter again bidders that were denied out of clientBidders / serverBidders (since we switched the order of operations), or
b) do two separate activity checks for client and server.

a) would be too restrictive in this edge case (which is better than too permissive). b) is of course more correct but I think more complex and I'm not sure it's worth it, since it is an edge case.

@mkomorski mkomorski requested a review from dgirardi December 16, 2025 13:56
@patmmccann
Copy link
Collaborator

@mkomorski can you link the docs pull?

dgirardi
dgirardi previously approved these changes Dec 17, 2025
@dgirardi dgirardi dismissed their stale review December 17, 2025 16:01

Should not defer when gvlid is present?

return true;
}
const vendorConsentRequred = rule.enforceVendor && !((gvlId === VENDORLESS_GVLID || (rule.softVendorExceptions || []).includes(currentModule)));
const deferS2Sbidders = params['isS2S'] && rule.purpose === 'basicAds' && rule.deferS2Sbidders;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I notice now this no longer checks that the gvl id is missing; shouldn't it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assumed if it's called deferS2Sbidders then it applies to s2s bidders in general with assumption they are all going to be verified by server. But I have no strong opinion on that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants