-
Notifications
You must be signed in to change notification settings - Fork 244
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] Introduce StorageInterestGroup and "get storage interest group… #1299
Conversation
…s for owner" algorithm This is the Protected Audience side's spec update to support interestGroups() within shared storage worklet (WICG/shared-storage#180).
This is the Shared Storage side's spec update to support interestGroups() within shared storage worklet (#180). Sibling spec update PR for Protected Audience: WICG/turtledove#1299.
@brusshamilton PTAL. Thanks! |
Add interestGroups() to the shared storage worklet, to return the Protected Audience interest groups associated with the shared storage origin's owner, with some additional metadata. Implement this behind a runtime feature, which is implicitly controlled by a Finch flag. Explainer PR: WICG/shared-storage#180 Spec PR(s): 1) WICG/turtledove#1299 2) WICG/shared-storage#203 Bug: 367992703 Binary-Size: Size increase is unavoidable. Fuchsia-Binary-Size: Size increase is unavoidable. Change-Id: I5fc5767fa53a91f021d64a871a6dd9cb88f4431c
Add interestGroups() to the shared storage worklet, to return the Protected Audience interest groups associated with the shared storage origin's owner, with some additional metadata. Implement this behind a runtime feature, which is implicitly controlled by a Finch flag. Explainer PR: WICG/shared-storage#180 Spec PR(s): 1) WICG/turtledove#1299 2) WICG/shared-storage#203 Bug: 367992703 Binary-Size: Size increase is unavoidable. Fuchsia-Binary-Size: Size increase is unavoidable. Change-Id: I5fc5767fa53a91f021d64a871a6dd9cb88f4431c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5696046 Reviewed-by: Daniel Cheng <[email protected]> Commit-Queue: Yao Xiao <[email protected]> Cr-Commit-Position: refs/heads/main@{#1369483}
Add interestGroups() to the shared storage worklet, to return the Protected Audience interest groups associated with the shared storage origin's owner, with some additional metadata. Implement this behind a runtime feature, which is implicitly controlled by a Finch flag. Explainer PR: WICG/shared-storage#180 Spec PR(s): 1) WICG/turtledove#1299 2) WICG/shared-storage#203 Bug: 367992703 Binary-Size: Size increase is unavoidable. Fuchsia-Binary-Size: Size increase is unavoidable. Change-Id: I5fc5767fa53a91f021d64a871a6dd9cb88f4431c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5696046 Reviewed-by: Daniel Cheng <[email protected]> Commit-Queue: Yao Xiao <[email protected]> Cr-Commit-Position: refs/heads/main@{#1369483}
Add interestGroups() to the shared storage worklet, to return the Protected Audience interest groups associated with the shared storage origin's owner, with some additional metadata. Implement this behind a runtime feature, which is implicitly controlled by a Finch flag. Explainer PR: WICG/shared-storage#180 Spec PR(s): 1) WICG/turtledove#1299 2) WICG/shared-storage#203 Bug: 367992703 Binary-Size: Size increase is unavoidable. Fuchsia-Binary-Size: Size increase is unavoidable. Change-Id: I5fc5767fa53a91f021d64a871a6dd9cb88f4431c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5696046 Reviewed-by: Daniel Cheng <[email protected]> Commit-Queue: Yao Xiao <[email protected]> Cr-Commit-Position: refs/heads/main@{#1369483}
…(), a=testonly Automatic update from web-platform-tests [shared storage] Implement interestGroup() Add interestGroups() to the shared storage worklet, to return the Protected Audience interest groups associated with the shared storage origin's owner, with some additional metadata. Implement this behind a runtime feature, which is implicitly controlled by a Finch flag. Explainer PR: WICG/shared-storage#180 Spec PR(s): 1) WICG/turtledove#1299 2) WICG/shared-storage#203 Bug: 367992703 Binary-Size: Size increase is unavoidable. Fuchsia-Binary-Size: Size increase is unavoidable. Change-Id: I5fc5767fa53a91f021d64a871a6dd9cb88f4431c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5696046 Reviewed-by: Daniel Cheng <[email protected]> Commit-Queue: Yao Xiao <[email protected]> Cr-Commit-Position: refs/heads/main@{#1369483} -- wpt-commits: eb87bbbacf996ab46607538a72ea0adaee229e7a wpt-pr: 48650
…(), a=testonly Automatic update from web-platform-tests [shared storage] Implement interestGroup() Add interestGroups() to the shared storage worklet, to return the Protected Audience interest groups associated with the shared storage origin's owner, with some additional metadata. Implement this behind a runtime feature, which is implicitly controlled by a Finch flag. Explainer PR: WICG/shared-storage#180 Spec PR(s): 1) WICG/turtledove#1299 2) WICG/shared-storage#203 Bug: 367992703 Binary-Size: Size increase is unavoidable. Fuchsia-Binary-Size: Size increase is unavoidable. Change-Id: I5fc5767fa53a91f021d64a871a6dd9cb88f4431c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5696046 Reviewed-by: Daniel Cheng <[email protected]> Commit-Queue: Yao Xiao <[email protected]> Cr-Commit-Position: refs/heads/main@{#1369483} -- wpt-commits: eb87bbbacf996ab46607538a72ea0adaee229e7a wpt-pr: 48650
…(), a=testonly Automatic update from web-platform-tests [shared storage] Implement interestGroup() Add interestGroups() to the shared storage worklet, to return the Protected Audience interest groups associated with the shared storage origin's owner, with some additional metadata. Implement this behind a runtime feature, which is implicitly controlled by a Finch flag. Explainer PR: WICG/shared-storage#180 Spec PR(s): 1) WICG/turtledove#1299 2) WICG/shared-storage#203 Bug: 367992703 Binary-Size: Size increase is unavoidable. Fuchsia-Binary-Size: Size increase is unavoidable. Change-Id: I5fc5767fa53a91f021d64a871a6dd9cb88f4431c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5696046 Reviewed-by: Daniel Cheng <[email protected]> Commit-Queue: Yao Xiao <[email protected]> Cr-Commit-Position: refs/heads/main@{#1369483} -- wpt-commits: eb87bbbacf996ab46607538a72ea0adaee229e7a wpt-pr: 48650
…(), a=testonly Automatic update from web-platform-tests [shared storage] Implement interestGroup() Add interestGroups() to the shared storage worklet, to return the Protected Audience interest groups associated with the shared storage origin's owner, with some additional metadata. Implement this behind a runtime feature, which is implicitly controlled by a Finch flag. Explainer PR: WICG/shared-storage#180 Spec PR(s): 1) WICG/turtledove#1299 2) WICG/shared-storage#203 Bug: 367992703 Binary-Size: Size increase is unavoidable. Fuchsia-Binary-Size: Size increase is unavoidable. Change-Id: I5fc5767fa53a91f021d64a871a6dd9cb88f4431c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5696046 Reviewed-by: Daniel Cheng <dchengchromium.org> Commit-Queue: Yao Xiao <yaoxiachromium.org> Cr-Commit-Position: refs/heads/main{#1369483} -- wpt-commits: eb87bbbacf996ab46607538a72ea0adaee229e7a wpt-pr: 48650 UltraBlame original commit: 94a35dfacf6d42d04039e6c44dc8f2c1c3ff56c3
…(), a=testonly Automatic update from web-platform-tests [shared storage] Implement interestGroup() Add interestGroups() to the shared storage worklet, to return the Protected Audience interest groups associated with the shared storage origin's owner, with some additional metadata. Implement this behind a runtime feature, which is implicitly controlled by a Finch flag. Explainer PR: WICG/shared-storage#180 Spec PR(s): 1) WICG/turtledove#1299 2) WICG/shared-storage#203 Bug: 367992703 Binary-Size: Size increase is unavoidable. Fuchsia-Binary-Size: Size increase is unavoidable. Change-Id: I5fc5767fa53a91f021d64a871a6dd9cb88f4431c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5696046 Reviewed-by: Daniel Cheng <dchengchromium.org> Commit-Queue: Yao Xiao <yaoxiachromium.org> Cr-Commit-Position: refs/heads/main{#1369483} -- wpt-commits: eb87bbbacf996ab46607538a72ea0adaee229e7a wpt-pr: 48650 UltraBlame original commit: 94a35dfacf6d42d04039e6c44dc8f2c1c3ff56c3
…(), a=testonly Automatic update from web-platform-tests [shared storage] Implement interestGroup() Add interestGroups() to the shared storage worklet, to return the Protected Audience interest groups associated with the shared storage origin's owner, with some additional metadata. Implement this behind a runtime feature, which is implicitly controlled by a Finch flag. Explainer PR: WICG/shared-storage#180 Spec PR(s): 1) WICG/turtledove#1299 2) WICG/shared-storage#203 Bug: 367992703 Binary-Size: Size increase is unavoidable. Fuchsia-Binary-Size: Size increase is unavoidable. Change-Id: I5fc5767fa53a91f021d64a871a6dd9cb88f4431c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5696046 Reviewed-by: Daniel Cheng <dchengchromium.org> Commit-Queue: Yao Xiao <yaoxiachromium.org> Cr-Commit-Position: refs/heads/main{#1369483} -- wpt-commits: eb87bbbacf996ab46607538a72ea0adaee229e7a wpt-pr: 48650 UltraBlame original commit: 94a35dfacf6d42d04039e6c44dc8f2c1c3ff56c3
@brusshamilton friendly ping :) |
1. [=map/For each=] |origin| → |originSellerCapabilities| of |ig|'s [=interest group/seller capabilities=]: | ||
1. Let |serializedOrigin| be the [=origin/serialization=] of |origin|. | ||
1. [=map/Set=] |resultSellerCapabilities|[|serializedOrigin|] to |originSellerCapabilities|. | ||
1. [=map/Set=] |resultIg|["{{GenerateBidInterestGroup/sellerCapabilities}}"] to |resultSellerCapabilities|. |
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.
{{GenerateBidInterestGroup/sellerCapabilities}}
is not an [=ordered map=]
of byte sequences, it's a record<USVString, sequence<DOMString>>
. You need to convert 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.
Similarly, record
and ordered_map
(== map) should be "implicitly compatible". And the following implicitly conversions should also hold: set (== ordered set) == list == sequence
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.
Yes, record
and ordered_map
are "implicitly compatible", but the actual capabilities are stored internally as a byte sequence
, not a sequence<DOMString>
. So we need some conversion here. That might be kind of difficult since I don't think we actually specify how the enum is encoded into a byte sequence
other than that it only takes a bit.
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 filed #1316, as I feel the right approach is to define those enum fields as strings directly. Besides, in the current specification, when these fields are being set, there's no conversion either: "If capabilityString is "interest-group-counts" or "latency-stats", then append capabilityString to sellerCapabilities."
Thus, it looks like it's best to treat these fields as strings now? This improves readability and aligns with the direction of the proposed specification.
1. [=map/Set=] |resultIg|["{{GenerateBidInterestGroup/trustedBiddingSignalsSlotSizeMode}}"] to |ig|'s [=interest group/trusted bidding signals slot size mode=]. | ||
1. [=map/Set=] |resultIg|["{{GenerateBidInterestGroup/maxTrustedBiddingSignalsURLLength}}"] to |ig|'s [=interest group/max trusted bidding signals url length=]. | ||
1. If |ig|'s [=interest group/user bidding signals=] is not null: | ||
1. Let |parsedUserBiddingSignals| be |ig|'s [=interest group/user bidding signals=] [=parsing a JSON string to a JavaScript value|parsed to a JavaScript value=]. |
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.
How are you handling failure here? (and other conversion failures in this algorithm)
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'm assuming the data storage only contains valid serialized values, so we shouldn't expect any deserialization/conversion failures. Perhaps technically it's still better to handle failures due to database corruption? but even so, I assume we don't have to include this in the specification. Please correct me if I made any wrong assumptions.
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 think specifying how failures are handled is probably one of the most important aspects of a specification. If you look at all the issues with undefined behavior in C/C++...
Please specify how failures are handled. I agree that the user bidding signals
should be valid JSON, but there are still failure modes where it isn't (such as when the encoder and decoder are using a different JSON version).
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. Added "return failure" for failed JSON parsing and base64 encode.
@brusshamilton I've addressed / responded to your feedback. PTAL again. Thanks! |
@brusshamilton: PTAL again. Thanks! |
…s for owner" algorithm
This is the Protected Audience side's spec update to support interestGroups() within shared storage worklet (WICG/shared-storage#180).
Preview | Diff