Skip to content

New Bid Adapter: BidFabrik - #15082

Open
v0idxyz wants to merge 53 commits into
prebid:masterfrom
v0idxyz:bidfabrik
Open

New Bid Adapter: BidFabrik#15082
v0idxyz wants to merge 53 commits into
prebid:masterfrom
v0idxyz:bidfabrik

Conversation

@v0idxyz

@v0idxyz v0idxyz commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

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

v0idxyz and others added 30 commits June 25, 2025 20:47
Fixed trailing slash Error on Line 123
Fixed Trailing slashes (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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

  • sinon is used in the onBidWon tests but is never imported, so this spec will throw ReferenceError: 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

  • revantage still 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 restore test/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

  • GVLID is marked with a TODO (“confirm this is the GVL ID…”). For a new bidder, the gvlid value 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';

Comment thread modules/bidfabrikBidAdapter.js
Comment on lines +177 to +180
onBidWon(bid) {
if (bid && isStr(bid.nurl) && bid.nurl !== '') {
triggerPixel(replaceAuctionPrice(bid.nurl, bid.originalCpm || bid.cpm));
}
Comment thread modules/bidfabrikBidAdapter.js
Copilot AI review requested due to automatic review settings July 25, 2026 21:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment on lines +39 to +42
function resolveHost(params) {
const host = params && isStr(params.host) ? params.host.trim() : '';
return host || DEFAULT_HOST;
}
Comment on lines +122 to +138
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,
};
Copilot AI review requested due to automatic review settings July 30, 2026 11:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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 revbid is already registered by another adapter (see modules/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 revbid as an alias, but revbid is 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 revbid alias, but revbid is already used by another adapter and should be renamed to a unique alias (keep the test in sync with the adapter’s spec.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.

Copilot AI review requested due to automatic review settings July 30, 2026 11:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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 by gulp 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’s spec.aliases uses revortb (and revbid is 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.

Copilot AI review requested due to automatic review settings July 30, 2026 11:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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.

Copilot AI review requested due to automatic review settings July 30, 2026 11:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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.json sets a disclosureURL for the revortb alias, but this metadata/modules.json entry 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.json sets a disclosureURL for the xrevantage alias, but this metadata/modules.json entry 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.json includes a device-storage disclosure URL for this bidder, but the corresponding metadata/modules.json entry leaves disclosureURL as 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.

Copilot AI review requested due to automatic review settings July 30, 2026 12:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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.

Comment thread modules/bidfabrikBidAdapter.js Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 31, 2026 06:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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 revortb sets disclosureURL to null, but metadata/modules/bidfabrikBidAdapter.json provides a disclosure URL for this alias. Keep metadata/modules.json consistent 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 xrevantage sets disclosureURL to null, but metadata/modules/bidfabrikBidAdapter.json includes 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.json declares a device-storage disclosure URL for this bidder and its aliases, but in metadata/modules.json these new entries set disclosureURL to null. 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.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants