Skip to content

Adgeneration: rewrite adapter to match Prebid.js v1.6.6 spec (upstream 提出候補) - #13

Open
ss-toshihide-tajima wants to merge 1 commit into
masterfrom
adgeneration-prebidjs-parity
Open

Adgeneration: rewrite adapter to match Prebid.js v1.6.6 spec (upstream 提出候補)#13
ss-toshihide-tajima wants to merge 1 commit into
masterfrom
adgeneration-prebidjs-parity

Conversation

@ss-toshihide-tajima

@ss-toshihide-tajima ss-toshihide-tajima commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

[社内レビュー用メモ] 次の水平線から「Docs」セクションまでが upstream (prebid/prebid-server) 提出用ドラフト本文です(このままコピーして提出します。#XXXX は docs PR 番号を提出時に差し替え)。upstream に PR テンプレートは存在しないため、直近のアダプタ更新 PR の慣例(Summary / Changes / 影響範囲 / docs リンク)に沿っています。その下に**参考日本語訳(提出しません)**を併記しています。社内文脈(#11 置き換え・#12 userSync 分離・検証記録)は #11 のクローズコメントおよび projects/prebid-server/ 配下のドキュメントを参照してください。


Summary

This PR modernizes the Adgeneration adapter, which has not been updated in several years and has diverged from our Prebid.js adapter. It brings the server-side adapter into parity with Prebid.js v1.6.6 (modules/adgenerationBidAdapter.js) and moves it to the endpoint our ad server now serves for Prebid traffic.

We (Supership Inc.) are the maintainer of this bidder (ssp-ope@supership.jp).

Changes

  • Switch the endpoint from GET /adsv/v1 (query parameters) to POST https://d.socdm.com/adgen/prebid (JSON body) — the same protocol the Prebid.js adapter uses
  • Add native support for both site and app; banner is kept. Video is intentionally not declared, matching Prebid.js (supportedMediaTypes: [BANNER, NATIVE]): VAST creatives are delivered wrapped as banner
  • Detect the request origin from ext.prebid.channel / BidRequest.App and device.os, and forward it as the sdktype query parameter (web / Prebid Mobile Android / Prebid Mobile iOS) so the backend can distinguish delivery paths
  • Percent-encode VAST XML embedded in JS string literals for Prebid Mobile iOS (WKWebView) compatibility
  • Forward dealid from the backend response as bid.dealid
  • Rename the builder struct to adapter per the repository semgrep conventions
  • Rewrite the JSON golden files for the new protocol and add a native exemplary test; adapter coverage is 97.6%

Publisher impact

None expected. The bidder params are unchanged (id, required, string). PBS hosts running older versions keep working: the backend continues to serve the legacy /adsv/v1 endpoint during the transition.

Testing

  • ./validate.sh --nofmt --cov --race 10 passes locally
  • Verified end-to-end against the production backend from a test PBS host: web (S2S) and app (Prebid Mobile SDK on Android and iOS) requests all receive and render bids

Docs

prebid/prebid.github.io#XXXX (companion docs update: pbs: true, pbs_app_supported: true, media_types: banner, native)


📖 参考日本語訳(レビュー用・upstream には提出しません)

概要(Summary)

この PR は、数年間更新されておらず Prebid.js アダプタと乖離していた Adgeneration アダプタを刷新するものです。サーバーサイドアダプタを Prebid.js v1.6.6(modules/adgenerationBidAdapter.js)とパリティを取った実装に更新し、当社のアドサーバーが現在 Prebid トラフィック向けに提供しているエンドポイントへ移行します。

当社(Supership Inc.)はこの bidder のメンテナーです(ssp-ope@supership.jp)。

変更内容(Changes)

  • エンドポイントを GET /adsv/v1(クエリパラメータ)から POST https://d.socdm.com/adgen/prebid(JSON body)へ変更 — Prebid.js アダプタと同一のプロトコル
  • site / app 両方で native 対応を追加。banner は維持。video は意図的に非対応(Prebid.js の supportedMediaTypes: [BANNER, NATIVE] と同じ判断。VAST 素材は banner としてラップ配信)
  • リクエスト元を ext.prebid.channel / BidRequest.Appdevice.os から判定し、sdktype クエリパラメータ(web / Prebid Mobile Android / Prebid Mobile iOS)として転送。backend が配信経路を区別できるようにする
  • JS 文字列リテラルに埋め込む VAST XML をパーセントエンコード(Prebid Mobile iOS = WKWebView 互換対応)
  • backend 応答の dealidbid.dealid として転送
  • リポジトリの semgrep 規約に従い、Builder 構造体を adapter にリネーム
  • 新プロトコル向けに JSON golden file を全面書き換え、native の exemplary テストを追加。アダプタカバレッジは 97.6%

媒体側への影響(Publisher impact)

影響なしの想定です。bidder params は変更ありません(id、必須、string)。旧バージョンの PBS を運用するホストもそのまま動作します: backend は移行期間中、旧 /adsv/v1 エンドポイントの提供を継続します。

テスト(Testing)

  • ./validate.sh --nofmt --cov --race 10(CI と同一コマンド)をローカルで合格
  • テスト PBS ホストから本番 backend への E2E 検証済み: web(S2S)と app(Prebid Mobile SDK の Android / iOS)のリクエストすべてで bid を取得し描画を確認

ドキュメント(Docs)

prebid/prebid.github.io#XXXX(対応する docs 更新: pbs: truepbs_app_supported: truemedia_types: banner, native

The adgeneration server-side adapter had not been updated in several
years and diverged from the Prebid.js adapter. This change brings it
back in parity with Prebid.js v1.6.6 (modules/adgenerationBidAdapter.js):

- Switch the endpoint from GET /adsv/v1 (query parameters) to
  POST /adgen/prebid with a JSON body, the protocol the backend now
  serves for Prebid traffic
- Add native support (site and app); banner is kept
- Detect sdktype from the request channel and device.os so the backend
  can distinguish web, Prebid Mobile Android, and Prebid Mobile iOS
  traffic
- Percent-encode VAST XML embedded in JS literals for Prebid Mobile iOS
  compatibility
- Forward dealid from the backend response as bid.dealid
- Rewrite JSON golden files for the new protocol and add a native
  exemplary test; adapter coverage is 97.6%
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3a555db7-d470-45ac-b8d1-c675cf1da3cc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch adgeneration-prebidjs-parity

Comment @coderabbitai help to get the list of available commands.

@ss-toshihide-tajima

Copy link
Copy Markdown
Collaborator Author

upstream へ提出しました: prebid#4858(docs: prebid/prebid.github.io#6665)。以後のレビュー対応は upstream 側で行います。

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.

1 participant