New Bid Adapter: BidFabrik - #15082
Conversation
Fixed trailing slash Error on Line 123
Fixed Trailing slashes (again)
same thing again
Refactor Revantage Bid Adapter to use media type constants and improve bid response handling.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Added validation to ensure all bid requests in a batch have the same feedId, logging a warning if they do not.
Added functions to handle video size extraction and VAST detection.
- Rename alias revantagex → xrevantage (avoids GAM key collision; first 6 chars of 'revantagex' clash with 'revantage') - Drop GVLID TODO comment (confirmed 1588 = ReVantage GmbH) - Add missing sinon import to bidfabrikBidAdapter_spec.js (fixes chunk 2 test failures) - Add modules/bidfabrikBidAdapter.md (required for new adapter PRs) - Restore modules/revantageBidAdapter.md and test/spec/modules/revantageBidAdapter_spec.js from upstream Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (3)
test/spec/modules/bidfabrikBidAdapter_spec.js:3
sinonis used in theonBidWontests but is never imported, so this spec will throwReferenceError: sinon is not defined. Add the missing import at the top of the file.
import { expect } from 'chai';
import sinon from 'sinon';
import { spec } from 'modules/bidfabrikBidAdapter.js';
modules/bidfabrikBidAdapter.js:76
revantagestill exists as a bidder module, but this PR removes its unit tests and its module documentation file. That drops coverage and docs for an existing adapter; either restoretest/spec/modules/revantageBidAdapter_spec.js+modules/revantageBidAdapter.md, or fully remove/replace the adapter and clearly document the migration path in the PR.
export const spec = {
code: BIDDER_CODE,
gvlid: GVLID,
aliases: [
{ code: 'revbid', gvlid: GVLID },
{ code: 'xrevantage', gvlid: GVLID },
],
supportedMediaTypes: [BANNER, VIDEO, NATIVE],
modules/bidfabrikBidAdapter.js:8
GVLIDis marked with a TODO (“confirm this is the GVL ID…”). For a new bidder, thegvlidvalue needs to be correct (or omitted if not applicable); please resolve this before merging rather than leaving it as an unresolved TODO.
const BIDDER_CODE = 'bidfabrik';
const GVLID = 1588;
const DEFAULT_HOST = 'bid.bidfabrik.com';
| onBidWon(bid) { | ||
| if (bid && isStr(bid.nurl) && bid.nurl !== '') { | ||
| triggerPixel(replaceAuctionPrice(bid.nurl, bid.originalCpm || bid.cpm)); | ||
| } |
| function resolveHost(params) { | ||
| const host = params && isStr(params.host) ? params.host.trim() : ''; | ||
| return host || DEFAULT_HOST; | ||
| } |
| return { | ||
| method: 'POST', | ||
| url: `https://${g.host}${BID_PATH}?feed=${encodeURIComponent(g.feed)}`, | ||
| data, | ||
| options: { | ||
| // Send JSON as text/plain so the request stays a CORS-safelisted | ||
| // "simple" request and the browser skips the OPTIONS preflight; the | ||
| // extra round trip would otherwise eat into the bidder timeout. The | ||
| // LB parses the body by content, not by Content-Type header. | ||
| contentType: 'text/plain', | ||
| // The LB answers CORS with Access-Control-Allow-Origin: * and no | ||
| // Allow-Credentials, so credentialed mode would be blocked by the | ||
| // browser. Keep this false unless the LB starts echoing Origin. | ||
| withCredentials: false, | ||
| }, | ||
| bids: g.bids, | ||
| }; |
There was a problem hiding this comment.
🟡 Not ready to approve
The adapter introduces an alias code (revbid) that already exists elsewhere in the codebase, creating a registration collision risk that must be resolved.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
Comments suppressed due to low confidence (3)
modules/bidfabrikBidAdapter.js:80
- The alias code
revbidis already registered by another adapter (seemodules/adkernelBidAdapter.js), so adding it here will create an alias collision and can break whichever module registers last. Please choose a unique alias for this adapter and update the related docs/tests accordingly.
aliases: [
{ code: 'revbid', gvlid: GVLID },
{ code: 'xrevantage', gvlid: GVLID },
],
modules/bidfabrikBidAdapter.md:14
- Docs list
revbidas an alias, butrevbidis already used elsewhere in the codebase, so this should be updated to the new unique alias name used by the adapter implementation.
BidFabrik is a white-label OpenRTB bid adapter supporting banner, video, and native. Each supply feed is identified by a `feed` parameter. The adapter groups impressions by `(host, feed)` and sends one OpenRTB 2.x request per group.
Aliases: `revbid`, `xrevantage`
test/spec/modules/bidfabrikBidAdapter_spec.js:83
- Tests currently assert the adapter exposes a
revbidalias, butrevbidis already used by another adapter and should be renamed to a unique alias (keep the test in sync with the adapter’sspec.aliases).
describe('aliases', function () {
it('exposes revbid and revantage aliases sharing the gvlid', function () {
const aliasFor = (code) => spec.aliases.find((a) => a.code === code);
expect(spec.aliases.map((a) => a.code)).to.have.members(['revbid', 'xrevantage']);
expect(aliasFor('revbid').gvlid).to.equal(spec.gvlid);
expect(aliasFor('xrevantage').gvlid).to.equal(spec.gvlid);
});
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
There was a problem hiding this comment.
🟡 Not ready to approve
The adapter docs/aliases are inconsistent with the implementation, and the required autogenerated module metadata file for the new adapter is missing.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
Comments suppressed due to low confidence (2)
modules/bidfabrikBidAdapter.js:78
- This new bidder module is missing the autogenerated metadata file
metadata/modules/bidfabrikBidAdapter.json(normally created bygulp update-metadata). Without it, the metadata chunk for this module won’t be produced (see gulpHelpers.getMetadataEntry), and tooling that relies on module metadata/disclosures won’t have an entry for BidFabrik.
export const spec = {
code: BIDDER_CODE,
gvlid: GVLID,
aliases: [
{ code: 'revortb', gvlid: GVLID },
modules/bidfabrikBidAdapter.md:13
- The documentation lists the alias
revbid, but this adapter’sspec.aliasesusesrevortb(andrevbidis already an alias used elsewhere, e.g. modules/adkernelBidAdapter.js:101). Update the docs to match the actual alias codes to avoid confusing users and potential alias collisions.
Aliases: `revbid`, `xrevantage`
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
There was a problem hiding this comment.
🟡 Not ready to approve
The module metadata update appears incomplete because the aggregate metadata registry (metadata/modules.json) does not include the new bidder/aliases, which can break tooling that relies on it.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
Comments suppressed due to low confidence (1)
metadata/modules/bidfabrikBidAdapter.json:7
- This per-module metadata file was added, but the aggregate registry at metadata/modules.json does not include entries for the new bidder/aliases (e.g. no componentName "bidfabrik"). That usually means the metadata update is incomplete and downstream tooling that relies on metadata/modules.json may not see this adapter.
{
"NOTICE": "do not edit - this file is autogenerated by `gulp update-metadata`",
"disclosures": {
"https://revantage.io/.well-known/tcf-device-storage.json": {
"timestamp": "2026-07-20T14:01:34.667Z",
"disclosures": []
}
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
There was a problem hiding this comment.
🟡 Not ready to approve
The new bidder’s disclosureURL is present in metadata/modules/bidfabrikBidAdapter.json but left null for the corresponding entries in metadata/modules.json, making metadata inconsistent.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
Comments suppressed due to low confidence (3)
metadata/modules.json:6682
metadata/modules/bidfabrikBidAdapter.jsonsets adisclosureURLfor therevortbalias, but thismetadata/modules.jsonentry leaves it null. The alias entry should mirror the disclosure URL so compliance tooling can resolve it from the top-level module list.
"disclosureURL": null
metadata/modules.json:6689
metadata/modules/bidfabrikBidAdapter.jsonsets adisclosureURLfor thexrevantagealias, but thismetadata/modules.jsonentry leaves it null. The alias entry should mirror the disclosure URL for consistency with the per-module metadata.
"disclosureURL": null
metadata/modules.json:6675
metadata/modules/bidfabrikBidAdapter.jsonincludes a device-storage disclosure URL for this bidder, but the correspondingmetadata/modules.jsonentry leavesdisclosureURLas null. This makes the top-level module registry inconsistent and can prevent tooling from associating the bidder with its disclosure metadata.
This issue also appears in the following locations of the same file:
- line 6682
- line 6689
"disclosureURL": null
- Files reviewed: 5/5 changed files
- Comments generated: 0 new
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
There was a problem hiding this comment.
🟡 Not ready to approve
The new adapter’s host sanitization should reject @ (userinfo) in host overrides to avoid routing requests to an unexpected origin.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Not ready to approve
metadata/modules.json adds the new bidder and aliases but leaves disclosureURL as null, which conflicts with the per-module metadata that provides a disclosure URL.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
Suppressed comments (3)
metadata/modules.json:6689
- The alias entry for
revortbsetsdisclosureURLtonull, butmetadata/modules/bidfabrikBidAdapter.jsonprovides a disclosure URL for this alias. Keepmetadata/modules.jsonconsistent by copying the disclosure URL here as well.
"componentType": "bidder",
"componentName": "revortb",
"aliasOf": "bidfabrik",
"gvlid": 1588,
"disclosureURL": null
metadata/modules.json:6696
- The alias entry for
xrevantagesetsdisclosureURLtonull, butmetadata/modules/bidfabrikBidAdapter.jsonincludes a disclosure URL for this alias. Update this entry so the aggregated module list exposes the disclosure link.
"componentType": "bidder",
"componentName": "xrevantage",
"aliasOf": "bidfabrik",
"gvlid": 1588,
"disclosureURL": null
metadata/modules.json:6683
metadata/modules/bidfabrikBidAdapter.jsondeclares a device-storage disclosure URL for this bidder and its aliases, but inmetadata/modules.jsonthese new entries setdisclosureURLtonull. This makes the aggregated module metadata inconsistent and may prevent downstream tooling from surfacing the disclosure link.
This issue also appears in the following locations of the same file:
- line 6685
- line 6692
"componentType": "bidder",
"componentName": "bidfabrik",
"aliasOf": null,
"gvlid": 1588,
"disclosureURL": null
- Files reviewed: 5/5 changed files
- Comments generated: 0 new
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
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
Maintainer: bern@revantage.io
Test Params:
{
bidder: '',
params: {
feed:"oubjsrii",
host:"bid.bidfabrik.com"
}
}
Other information