-
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
Spec'ing creative scanning via BYOS/V1 trusted scoring signals #1398
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Maks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Maks!
I suspect the failure is due to speced/bikeshed-boilerplate@123d968 |
1. Let |sendCreativeScanningMetadata| be |auctionConfig|'s [=auction config/send creative scanning | ||
metadata=]. | ||
1. If |auctionConfig|'s [=auction config/trusted scoring signals coordinator=] is not null, | ||
set |sendCreativeScanningMetadata| to false. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mind pointing me to the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "fill in creative info" logic using that is also in the constructor that calls immediately below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so is "hasPublicKey()" the same as coordinator not being null here? When coordinator is not null, the key fetch can also fail (spec) which causes no public key, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So in the spec at the moment, if the key fetch fails, it just fails the V2 fetch path.
The impl currently falls back (which that code incorporates since the key fetch happens before we get to it), but I think that fallback may no longer happen when the cache is on, which would then match the spec, both my addition and the actual fetch stuff?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, yeah I heard about the cache stuff would change things, but I'm not familiar with it.
spec.bs
Outdated
@@ -8357,6 +8403,9 @@ An <dfn>interest group ad</dfn> is a [=struct=] with the following [=struct/item | |||
: <dfn>ad render ID</dfn> | |||
:: A [=string=] containing up to 12 [=ASCII bytes=] uniquely identifying this ad. Sent instead | |||
of the full [=interest group ad=] for auctions executed on a server. | |||
: <dfn>creative scanning metadata</dfn> | |||
:: Null or a [=string=], initially null. Sent with V1 trusted scoring signals requests if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the spec has a definition of our concept of "V1". Can we have a (one or multiple sentences) definition of it in the spec, or replae V1 with something more explicit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe non-TEE?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's good as long as that's clear to readers. Otherwise, a definition with short explaination can be helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rephrased
1. If |experimentGroupId| is not null: | ||
1. [=list/Append=] "`&experimentGroupId=`" to |queryParamsList|. | ||
1. [=list/Append=] [=serialize an integer|serialized=] |experimentGroupId| to |queryParamsList|. | ||
1. If |sendCreativeScanningMetadata| is true: | ||
1. [=Add trusted signals param if needed=] given "`&adCreativeScanningMetadata=`", | ||
the result of [=extracting creative scanning metadata=] given |ads|, |queryParamsList|. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: it's kinda confusing about which param is for which algorithm, but I don't see a better way to reword it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied the suggestions..
spec.bs
Outdated
@@ -8357,6 +8403,9 @@ An <dfn>interest group ad</dfn> is a [=struct=] with the following [=struct/item | |||
: <dfn>ad render ID</dfn> | |||
:: A [=string=] containing up to 12 [=ASCII bytes=] uniquely identifying this ad. Sent instead | |||
of the full [=interest group ad=] for auctions executed on a server. | |||
: <dfn>creative scanning metadata</dfn> | |||
:: Null or a [=string=], initially null. Sent with V1 trusted scoring signals requests if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rephrased
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last few comments.
A <dfn>trusted scoring signals request</dfn> is a [=struct=] with the following [=struct/items=], | ||
representing all information needed to produce a trusted scoring signals fetch for a single scoring | ||
invocation: | ||
|
||
<dl dfn-for="trusted scoring signals request"> | ||
: <dfn>send creative scanning metadata</dfn> | ||
:: A [=boolean=], to determine whether creative scanning metadata should be added to V1 requests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one more v1.
[=creative info=] |componentAds|, an {{unsigned short}} |experimentGroupId|, and an [=origin=] | ||
|topLevelOrigin|: | ||
|
||
Note: When trusted scoring signals fetches are not batched, |ads|'s [=list/size=] is 1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: When trusted scoring signals fetches are not batched, |ads|'s [=list/size=] is 1. | |
Note: When trusted scoring signals fetches are not batched, |ads|'s [=set/size=] is 1. |
|
||
1. Let |queryParamsList| be a new empty [=list=]. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra white line, due to my previous code suggestion.
|queryParamsList|. | ||
1. Let |adComponentRenderURLs| be the result of [=extracting URLs from creative info=] given | ||
|componentAds|. | ||
1. If |adComponentRenderURLs| is not [=list/is empty|empty=]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[=list/is not empty=] should also work.
1. If |adComponentRenderURLs| is not [=list/is empty|empty=]: | |
1. If |adComponentRenderURLs| [=list/is not empty=]: |
To <dfn>extract component ad creative scanning metadata</dfn> given a [=list=] of | ||
[=interest group ad=] |bidAdComponents|: | ||
|
||
1. Let |result| be a new <code>[=sequence=]<{{USVString}}></code>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
each element can be null, right?
1. Let |result| be a new <code>[=sequence=]<{{USVString}}></code>. | |
1. Let |result| be a new <code>[=sequence=]<{{USVString?}}></code>. |
1. Let |mainAd| be the result of [=filling in creative info=] given |sendCreativeScanningMetadata|, | ||
|generatedBid|'s [=generated bid/ad descriptor=], |owner|, [=generated bid/bid ad=]. | ||
1. Let |adComponents| be a new empty [=set=]. | ||
1. For |i| between 0 and |generatedBid|'s [=generated bid/bid ad components=]'s [=list/size=] - 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. For |i| between 0 and |generatedBid|'s [=generated bid/bid ad components=]'s [=list/size=] - 1, | |
1. [=list/for each=] |i| in [=the range=] from 0 to |generatedBid|'s [=generated bid/bid ad components=]'s [=list/size=] - 1, |
This also fixes trusted scoring signals params escaping in general to not escape commas
when not expected.
See #792 (comment)
and latter comments on that issue for more context.
Preview | Diff