-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Header-Based DirectFromSellerSignals Feature Detection #803
Comments
It'd be nice if we had a dedicated mechanism to detect APIs like this, but in the mean time I think this should work:
Seems to run pretty quickly, close to 10μs in a loop. I played with a few different ways, but this seemed fastest for a few reasons:
|
Thanks @JensenPaul. If I grok this, it is relying on an attribute fetch within the auction mechanics (to determine whether the config expects DFSSAS inputs?) that (currently) happens prior to basic auction config attribute validation. I tried to locate this via the DFSS issue (https://bugs.chromium.org/p/chromium/issues/detail?id=1462720) CRs but could not find them. Would you or @caraitto kindly provide a pointer? Nice source browser & tools, BTW! If I follow the comments in that issue, DFSSAS impl is landing with M118, which is now in Beta channel. Should your snippet work on that version, perhaps with some extra flag enabled? |
This happens in the generated code produced from WebIDL [0]. The WebIDL definition is here [1], and the code generated from the WebIDL that actually reads the property (and therefore executes the [0] https://developer.mozilla.org/en-US/docs/Glossary/WebIDL
We cherry-picked [0] into Chrome 117.0.5938.35; however, currently the feature FledgeDirectFromSellerSignalsHeaderAdSlot is disabled by default. We are working to get approval on our intent to ship (I2S) [1] so that we can turn the feature flag on. After we turn the flag on, Chrome browser instances will turn on the feature after a browser restart. Typically there is no user prompting UX to restart like there is when an update is ready to be installed. Chrome channels like Canary, Dev, Beta, and Stable can also be targeted separately at different percentages to provide a smooth, stable rollout. The feature can be enabled locally using this command line switch [2]:
[0] https://crrev.com/c/4803170 [1] https://groups.google.com/a/chromium.org/g/blink-dev/c/JpWOdoPi5Wo [2] https://www.chromium.org/developers/how-tos/run-chromium-with-flags/ (also applies to official Chrome builds) |
By the way, there's an open WebIDL feature request to better support feature detection for IDL dictionary members: whatwg/webidl#107. |
Thank you for the quick and detailed responses, Caleb (@caraitto)! Good that Chrome's |
Yeah, we're lucky directFromSellerSignalsHeaderAdSlot comes before seller alphabetically -- otherwise, the seller field would have to be passed to the detector, and we'd need some other way to get the C++ to throw to avoid IPC -- we'll definitely want a better long-term solution :) |
I'll be removing the feature flag in a subsequent CL now that we've shipped, so I don't test the flag off case. More context on the feature detection method at WICG/turtledove#803 Bug: 1462720
I'll be removing the feature flag in a subsequent CL now that we've shipped, so I don't test the flag off case. More context on the feature detection method at WICG/turtledove#803 Bug: 1462720 Change-Id: Ica63b282e3c380aa09f2ee8a6fc93e89ae9ce21f
I'll be removing the feature flag in a subsequent CL now that we've shipped, so I don't test the flag off case. More context on the feature detection method at WICG/turtledove#803 Bug: 1462720 Change-Id: Ica63b282e3c380aa09f2ee8a6fc93e89ae9ce21f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5034265 Commit-Queue: Caleb Raitto <[email protected]> Reviewed-by: Matt Menke <[email protected]> Cr-Commit-Position: refs/heads/main@{#1225565}
I'll be removing the feature flag in a subsequent CL now that we've shipped, so I don't test the flag off case. More context on the feature detection method at WICG/turtledove#803 Bug: 1462720 Change-Id: Ica63b282e3c380aa09f2ee8a6fc93e89ae9ce21f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5034265 Commit-Queue: Caleb Raitto <[email protected]> Reviewed-by: Matt Menke <[email protected]> Cr-Commit-Position: refs/heads/main@{#1225565}
I'll be removing the feature flag in a subsequent CL now that we've shipped, so I don't test the flag off case. More context on the feature detection method at WICG/turtledove#803 Bug: 1462720 Change-Id: Ica63b282e3c380aa09f2ee8a6fc93e89ae9ce21f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5034265 Commit-Queue: Caleb Raitto <[email protected]> Reviewed-by: Matt Menke <[email protected]> Cr-Commit-Position: refs/heads/main@{#1225565}
…=testonly Automatic update from web-platform-tests Add tests for feature detection logic I'll be removing the feature flag in a subsequent CL now that we've shipped, so I don't test the flag off case. More context on the feature detection method at WICG/turtledove#803 Bug: 1462720 Change-Id: Ica63b282e3c380aa09f2ee8a6fc93e89ae9ce21f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5034265 Commit-Queue: Caleb Raitto <[email protected]> Reviewed-by: Matt Menke <[email protected]> Cr-Commit-Position: refs/heads/main@{#1225565} -- wpt-commits: e95e83675b27957f4d0e60dffcb4cc6cedcccb3f wpt-pr: 43188
…=testonly Automatic update from web-platform-tests Add tests for feature detection logic I'll be removing the feature flag in a subsequent CL now that we've shipped, so I don't test the flag off case. More context on the feature detection method at WICG/turtledove#803 Bug: 1462720 Change-Id: Ica63b282e3c380aa09f2ee8a6fc93e89ae9ce21f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5034265 Commit-Queue: Caleb Raitto <[email protected]> Reviewed-by: Matt Menke <[email protected]> Cr-Commit-Position: refs/heads/main@{#1225565} -- wpt-commits: e95e83675b27957f4d0e60dffcb4cc6cedcccb3f wpt-pr: 43188
…=testonly Automatic update from web-platform-tests Add tests for feature detection logic I'll be removing the feature flag in a subsequent CL now that we've shipped, so I don't test the flag off case. More context on the feature detection method at WICG/turtledove#803 Bug: 1462720 Change-Id: Ica63b282e3c380aa09f2ee8a6fc93e89ae9ce21f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5034265 Commit-Queue: Caleb Raitto <[email protected]> Reviewed-by: Matt Menke <[email protected]> Cr-Commit-Position: refs/heads/main@{#1225565} -- wpt-commits: e95e83675b27957f4d0e60dffcb4cc6cedcccb3f wpt-pr: 43188
…=testonly Automatic update from web-platform-tests Add tests for feature detection logic I'll be removing the feature flag in a subsequent CL now that we've shipped, so I don't test the flag off case. More context on the feature detection method at WICG/turtledove#803 Bug: 1462720 Change-Id: Ica63b282e3c380aa09f2ee8a6fc93e89ae9ce21f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5034265 Commit-Queue: Caleb Raitto <[email protected]> Reviewed-by: Matt Menke <[email protected]> Cr-Commit-Position: refs/heads/main@{#1225565} -- wpt-commits: e95e83675b27957f4d0e60dffcb4cc6cedcccb3f wpt-pr: 43188
…=testonly Automatic update from web-platform-tests Add tests for feature detection logic I'll be removing the feature flag in a subsequent CL now that we've shipped, so I don't test the flag off case. More context on the feature detection method at WICG/turtledove#803 Bug: 1462720 Change-Id: Ica63b282e3c380aa09f2ee8a6fc93e89ae9ce21f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5034265 Commit-Queue: Caleb Raitto <caraittochromium.org> Reviewed-by: Matt Menke <mmenkechromium.org> Cr-Commit-Position: refs/heads/main{#1225565} -- wpt-commits: e95e83675b27957f4d0e60dffcb4cc6cedcccb3f wpt-pr: 43188 UltraBlame original commit: b7a446823cf90ff4f71ea6e1ffb4fa7244d87c0e
…=testonly Automatic update from web-platform-tests Add tests for feature detection logic I'll be removing the feature flag in a subsequent CL now that we've shipped, so I don't test the flag off case. More context on the feature detection method at WICG/turtledove#803 Bug: 1462720 Change-Id: Ica63b282e3c380aa09f2ee8a6fc93e89ae9ce21f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5034265 Commit-Queue: Caleb Raitto <caraittochromium.org> Reviewed-by: Matt Menke <mmenkechromium.org> Cr-Commit-Position: refs/heads/main{#1225565} -- wpt-commits: e95e83675b27957f4d0e60dffcb4cc6cedcccb3f wpt-pr: 43188 UltraBlame original commit: b7a446823cf90ff4f71ea6e1ffb4fa7244d87c0e
…=testonly Automatic update from web-platform-tests Add tests for feature detection logic I'll be removing the feature flag in a subsequent CL now that we've shipped, so I don't test the flag off case. More context on the feature detection method at WICG/turtledove#803 Bug: 1462720 Change-Id: Ica63b282e3c380aa09f2ee8a6fc93e89ae9ce21f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5034265 Commit-Queue: Caleb Raitto <caraittochromium.org> Reviewed-by: Matt Menke <mmenkechromium.org> Cr-Commit-Position: refs/heads/main{#1225565} -- wpt-commits: e95e83675b27957f4d0e60dffcb4cc6cedcccb3f wpt-pr: 43188 UltraBlame original commit: b7a446823cf90ff4f71ea6e1ffb4fa7244d87c0e
To run an experiment using the header-based directFromSellerSignals spec proposed in #695, we must detect whether this API is supported to avoid moving auction signals into the header server-side with no corresponding client-side mechanism to retrieve them in the auction worklet.
Ideally the client should have a JS visible mechanism that it may invoke to indicate to the server that it can support parsing the
Ad-Auction-Signals
header and making it available within the auction worklet by providingdirectFromSellerSignalsHeaderAdSlot
.The text was updated successfully, but these errors were encountered: