-
Notifications
You must be signed in to change notification settings - Fork 247
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
Add spec for multi-seller getInterestGroupAdAuctionData #1389
base: main
Are you sure you want to change the base?
Conversation
@qingxinwu PTAL |
spec.bs
Outdated
1. Let |requestId| be the [=string representation=] of a [=version 4 UUID=]. | ||
1. [=list/For each=] |config| in |configs|: |
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
1. [=list/For each=] |config| in |configs|: | |
1. [=list/For each=] |config| of |configs|: |
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.
Done.
spec.bs
Outdated
and |config|'s [=auction data config/request size=] is null: | ||
1. Let |requestSize| be 0. | ||
1. [=list/For each=] |buyerConfig| of |config|'s [=auction data config/per buyer config=]'s [=map/values=]: | ||
1. Let |configs| 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.
When possible, be explict about the element type in the list.
nit: "new" is enough.
1. Let |configs| be a new empty [=list=]. | |
1. Let |configs| be a new [=list=] of [=auction data configs=]. |
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.
Done.
spec.bs
Outdated
1. Let |requestSize| be 0. | ||
1. [=list/For each=] |buyerConfig| of |config|'s [=auction data config/per buyer config=]'s [=map/values=]: | ||
1. Let |configs| be a new empty [=list=]. | ||
1. Let |per buyer configs| be the result of running [=parse per buyer auction data configs=] on |
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.
|perBuyerConfigs|
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 thought the convention was that for IDL types we used camel case variables. For infra types we used lower space types?
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.
infra types use lower space types, but variables of infra types use camel case.
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.
Done.
spec.bs
Outdated
1. If |configIDL|["{{AdAuctionDataConfig/seller}}"] [=map/exists=]: | ||
1. Let |seller| be the result of running [=parse an https origin=] on | ||
|configIDL|["{{AdAuctionDataConfig/seller}}"]. | ||
1. Let |coordinator| be the result of running [=parse an https origin=] on |
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.
now, we need to check whether |configIDL|["{{AdAuctionDataConfig/coordinatorOrigin}}"] [=map/exists=] first, since it's no longer required in IDL. Set |coordinator| to a default coordinator when it does not exist.
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.
Done.
spec.bs
Outdated
1. Otherwise: | ||
1. If |configIDL|["{{AdAuctionDataConfig/sellers}}"] does not [=map/exist=], then [=exception/throw=] a {{TypeError}}. | ||
1. If |configIDL|["{{AdAuctionDataConfig/coordinatorOrigin}}"] [=map/exists=], then [=exception/throw=] a {{TypeError}}. | ||
1. [=list/For each=] |seller config| in |configIDL|["{{AdAuctionDataConfig/sellers}}"]: |
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.
|sellerConfig|. There are several variables defined like this. Please check and fix those too.
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.
Done.
spec.bs
Outdated
1. [=list/For each=] |seller config| in |configIDL|["{{AdAuctionDataConfig/sellers}}"]: | ||
1. Let |seller| be the result of running [=parse an https origin=] on | ||
|seller config|["{{AdAuctionOneSeller/seller}}"]. | ||
1. If |configs| already [=list/contains=] a [=auction data config=] whose |
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. If |configs| already [=list/contains=] a [=auction data config=] whose | |
1. If |configs| [=list/contains=] an [=auction data config=] whose |
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.
Done.
spec.bs
Outdated
1. If |configs| already [=list/contains=] a [=auction data config=] whose | ||
[=auction data config/seller=] is equal to |seller|, then | ||
[=exception/throw=] a {{TypeError}}. | ||
1. Let |coordinator| be the result of running [=parse an https origin=] on |
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.
same, need to check if |seller config|["{{AdAuctionOneSeller/coordinatorOrigin}}"] exists?
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.
Done.
spec.bs
Outdated
@@ -3786,20 +3791,72 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m | |||
1. [=list/Append=] |serverIg| to |igMap|[|owner|]. | |||
1. If |ig|'s [=interest group/Private Aggregation coordinator=] is not null, then [=map/set=] | |||
|igPAggCoordinatorMap|[(|owner|, |name|)] to it. | |||
1. Let |result| be a new {{AdAuctionData}}. | |||
1. Let |results| be a new [=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.
1. Let |results| be a new [=list=]. | |
1. Let |results| be a new [=list=] of [=auction data seller results=]. |
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.
Done.
spec.bs
Outdated
1. Set |requestContext|'s [=server auction request context/request context=] field to |context|. | ||
1. [=map/Set=] |global|'s [=associated Document's=] [=node navigable's=] | ||
[=traversable navigable's=] [=traversable navigable/saved Bidding and Auction request context=][|requestId|] to |requestContext|. | ||
1. Let |result| be a new {{AdAuctionData}}. |
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.
a different |result| was used above. Let's change one of the names to make it more readable.
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.
Changed the second one to |IDL results|
.
[sad] David Dabbs reacted to your message:
…________________________________
From: brusshamilton ***@***.***>
Sent: Thursday, January 23, 2025 9:49:42 PM
To: WICG/turtledove ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [WICG/turtledove] Add spec for multi-seller getInterestGroupAdAuctionData (PR #1389)
External to the Groupe / en provenance de l'extérieur du Groupe
@qingxinwu<https://github.com/qingxinwu> PTAL
—
Reply to this email directly, view it on GitHub<#1389 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AABK3LDH2AROHGVF5KV6F7D2MFPXNAVCNFSM6AAAAABVV7TDUGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJRGA4DONJRHE>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
------------------------------------------------------------------------
Disclaimer The information in this email and any attachments may contain proprietary and confidential information that is intended for the addressee(s) only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, retention or use of the contents of this information is prohibited. When addressed to our clients or vendors, any information contained in this e-mail or any attachments is subject to the terms and conditions in any governing contract. If you have received this e-mail in error, please immediately contact the sender and delete the e-mail.
|
spec.bs
Outdated
: <dfn>request size</dfn> | ||
:: {{unsigned long}} or null. An optional field, containing the desired size | ||
for the returned encrypted request blob. | ||
: <dfn>per buyer config</dfn> | ||
:: A [=map=] whose [=map/keys=] are [=origins=] and [=map/values=] are [=auction data buyer config=]. | ||
</dl> | ||
|
||
An <dfn>auction data seller result</dfn> is a [=struct=] with the following [=struct/items=]: |
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: auction data per seller result?
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.
Done.
spec.bs
Outdated
1. Let (|requestBlob|, |context|) be the result of serializing |igMap| with |config| and | ||
|igPAggCoordinatorMap|. The serialization method may follow that described in | ||
[Section 2.2.4 of Bidding and Auction Services](https://privacysandbox.github.io/draft-ietf-bidding-and-auction-services/draft-ietf-bidding-and-auction-services.html#name-generating-a-request). | ||
1. Let |result| be a new [=auction data seller result=] with the following [=struct/items=]: |
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.
another slightly cleaner way is to define |result| let |result| be a new [=auction data seller result=] whose [...seller=] is |config|'s |seller|
, in the beginning of the loop, and then just set |result|'s [...error=] or [...=request=] field in different cases.
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.
Yeah, that is possible, but I think this way is more clear.
spec.bs
Outdated
:: |seller result|'s [=auction data seller result/seller=] | ||
: {{AdAuctionPerSellerData/request}} | ||
:: |seller result|'s [=auction data seller result/request=] | ||
1. [=list/Append=] |IDLresult| to |result|["{{AdAuctionData/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.
similar to another comment. Probably cleaner to define Let |IDLresult| be a new {{AdAuctionPerSellerData}} whose seller is ....
. ANd in if/else, just set their error or request field. Then outside of if/else, append |IDLResult| to 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.
This one is probably more clear to do it that way. Done.
spec.bs
Outdated
: {{AdAuctionPerSellerData/error}} | ||
:: |seller result|'s [=auction data seller result/error=] | ||
1. [=list/Append=] |IDLresult| to |result|["{{AdAuctionData/requests}}"]. | ||
1. Let |IDLresult| be a new {{AdAuctionPerSellerData}} whose {{AdAuctionPerSellerData/seller}} |seller result|'s [=auction data per seller result/seller=]. |
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. Let |IDLresult| be a new {{AdAuctionPerSellerData}} whose {{AdAuctionPerSellerData/seller}} |seller result|'s [=auction data per seller result/seller=]. | |
1. Let |IDLresult| be a new {{AdAuctionPerSellerData}} whose {{AdAuctionPerSellerData/seller}} is |seller result|'s [=auction data per seller result/seller=]. |
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.
Done.
spec.bs
Outdated
1. Let |requestSize| be 0. | ||
1. [=list/For each=] |buyerConfig| of |config|'s [=auction data config/per buyer config=]'s [=map/values=]: | ||
1. Let |configs| be a new empty [=list=]. | ||
1. Let |per buyer configs| be the result of running [=parse per buyer auction data configs=] on |
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.
infra types use lower space types, but variables of infra types use camel case.
spec.bs
Outdated
1. Let |coordinator| be the result of running [=parse an https origin=] on | ||
|configIDL|["{{AdAuctionDataConfig/coordinatorOrigin}}"]. | ||
1. Otherwise | ||
1. Let |coordinator| be the [=user agent=]'s default coordinator. |
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.
let's say what coordinator it refers to, like "bidding and auction coordinator"? The spec has several different totally unrelated coordinators now.
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.
Done.
spec.bs
Outdated
@@ -3865,7 +3863,7 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m | |||
To <dfn>parse and verify ad auction data config</dfn> given an | |||
{{AdAuctionDataConfig}} |configIDL| and [=origin=] |top_level_origin|: | |||
|
|||
1. Let |configs| be a new empty [=list=]. | |||
1. Let |configs| be a new empty [=list=] of [=auction data configs=]. |
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
1. Let |configs| be a new empty [=list=] of [=auction data configs=]. | |
1. Let |configs| be a new [=list=] of [=auction data configs=]. |
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.
Done.
spec.bs
Outdated
1. Let |coordinator| be the result of running [=parse an https origin=] on | ||
|seller config|["{{AdAuctionOneSeller/coordinatorOrigin}}"]. | ||
1. Otherwise: | ||
1. Let |coordinator| be the [=user agent=]'s default coordinator. |
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.
same, be clearer about what coordinator it is.
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.
Done.
1. Let |IDLresults| be a new {{AdAuctionData}}. | ||
1. [=map/Set=] |IDLresults|["{{AdAuctionData/requestId}}"] to |requestId|. | ||
1. If |configIDL|[{{AdAuctionDataConfig/seller}}] [=map/exists=]: | ||
1. Let |seller result| be |results|[0]. |
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.
sellerResult
1. Let |keyInfo| be the result of [=looking up the server encryption key=] | ||
with |config|'s [=auction data config/seller=] and |seller|'s [=auction data config/coordinator=]. | ||
1. If |keyInfo| is failure: | ||
1. Let |result| be a new [=auction data per seller result=] with the following [=struct/items=]: |
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.
wrong indention. The preview shows how it's rendered.
1. [=list/For each=] |config| of |configs|: | ||
1. Let |seller| be |config|'s [=auction data config/seller=]. | ||
1. If |config|'s [=auction data config/coordinator=] is not one of the [=implementation-defined=] | ||
coordinators supported by this [=user agent=]: |
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.
coordinators supported by this [=user agent=]: | |
Bidding and Auction Services coordinators supported by this [=user agent=]: |
1. Set |IDLresults|["{{AdAuctionData/request}}"] to |requestBlob|. | ||
1. Otherwise: | ||
1. [=list/For each=] |seller result| in |results|: | ||
1. Let |IDLresult| be a new {{AdAuctionPerSellerData}} whose {{AdAuctionPerSellerData/seller}} |
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.
{{AdAuctionPerSellerData/seller}} is string, while the infra one is [=origin=]. Need to do [=serialization of an origin|serialization=] (example)
An <dfn>auction data per seller result</dfn> is a [=struct=] with the following [=struct/items=]: | ||
<dl dfn-for="auction data per seller result"> | ||
: <dfn>seller</dfn> | ||
:: The origin of the seller that this result corresponds to. Will match one of |
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 origin of the seller that this result corresponds to. Will match one of | |
:: The [=origin=] of the seller that this result corresponds to. Will match one of |
1. Set |requestContext|'s [=server auction request context/request ID=] field to |requestId|. | ||
1. Set |requestContext|'s [=server auction request context/request context=] field to |context|. | ||
1. [=map/Set=] |global|'s [=associated Document's=] [=node navigable's=] | ||
[=traversable navigable's=] [=traversable navigable/saved Bidding and Auction request context=][|requestId|] to |requestContext|. |
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.
this does not seem right, which keeps overwriting the requestId's context to the next config's context. Do we need to use |requestId| + |seller| as the key now? https://crsrc.org/c/content/browser/interest_group/ad_auction_page_data.h;drc=12855e28398f2355e8002664108acc3c289401e0;l=150
Preview | Diff