Stop sending app.content to Meta - #135
Merged
Merged
Conversation
MSP's document module fills app.content.url with the canonical article URL (www.newsbreak.com/n/{doc_id}) so bidders get a contextual signal. Meta should not receive it, so drop app.content on the way out of the audienceNetwork adapter. modifyRequest already shallow-copies App per outgoing request to overwrite Publisher, so nil'ing Content there is safe: the auction's App is shared across bidder goroutines (ortb.CloneBidRequestPartial deep-copies only Device, User and Source), and every other seat keeps the URL. This covers both Meta paths in MSP -- the plain audienceNetwork seat and the msp_fb_* aliases, which build from this same Builder. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
fushouli
approved these changes
Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Drop
app.contentfrom the bid request theaudienceNetworkadapter sends to Meta.MSP's
documentmodule fillsapp.content.urlwith the canonical article URL (www.newsbreak.com/n/{doc_id}, or the app's base URL on non-article slots) so bidders get a contextual signal. Meta should not receive it.Why here
modifyRequestalready shallow-copiesAppper outgoing request in order to overwritePublisher, which makes it the one safe place to edit it. The auction'sApppointer is shared across bidder goroutines —ortb.CloneBidRequestPartialdeep-copies onlyDevice,UserandSource— so stripping it anywhere upstream (an MSP wrapper adapter or a bidder-request hook) would also strip it from Google/Nova/Moloco and race with them. Nil'ing the copy leaves every other seat untouched.It also covers both Meta paths in MSP in one place: the plain
audienceNetworkseat (9 stored imps) and themsp_fb_*aliases (341), which build from this sameBuilderviapkg/adapters/fb/core.go.app.contentis MSP-generated and holds only the URL, so nil'ing the object drops nothing else in practice.Test
New exemplary fixture
banner-app-content.json: mock request carriesapp.content.urlandapp.domain, expected outgoing body keepsdomainand dropscontent— so it pins "only content goes, the rest of app stays."TestJsonSamplespicks it up from the directory automatically.go test ./adapters/audienceNetwork/...passes; with the two lines reverted the new fixture fails on the"content"diff.🤖 Generated with Claude Code