From f8fed21f13fbe52f60b3cec0e279a2406cbc0f48 Mon Sep 17 00:00:00 2001 From: Qingxin Wu Date: Mon, 16 Dec 2024 15:55:26 -0500 Subject: [PATCH] address comments --- spec.bs | 58 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/spec.bs b/spec.bs index 34aaa7767..8b9a541e1 100644 --- a/spec.bs +++ b/spec.bs @@ -3269,28 +3269,22 @@ To handle server response private aggregation fields given a [=server
To commit server response private aggregation contributions given a [=map=] from a -[=tuple=] of ([=reporting bid key=], [=string=]) to a [=list=] of [=on event contribution entries=] +[=server auction pagg contribution key=] to a [=list=] of [=on event contribution entries=] |contributionsMap|, a [=reporting context=] |reportingContext|, and a [=reporting bid key=] |reportingId|: -1. [=map/For each=] (|reportingOrigin|, |coordinator|, |event|) → |contributions| of |contributionsMap|: +1. [=map/For each=] |key| → |contributions| of |contributionsMap|: + 1. Let |reportingOrigin| be |key|'s [=server auction pagg contribution key/reporting origin=]. + 1. Let |event| be |key|'s [=server auction pagg contribution key/event=]. + 1. Let |coordinator| be |key|'s [=server auction pagg contribution key/coordinator=]. + 1. If |coordinator| is null, set |coordinator| to the [=default aggregation coordinator=]. 1. Let |eventToContributionsMap| be a new [=Private Aggregation contributions=]. - 1. Let |scopingDetails| be a new [=scoping details=] with the [=struct/items=]: - : get batching scope steps - :: An algorithm that performs the following steps: - 1. If |coordinator| is null, set |coordinator| to the [=default aggregation coordinator=]. - 1. Return the result of running [=get or create a batching scope=] given |reportingOrigin|, - |coordinator| and |reportingContext|. - : get debug scope steps - :: An algorithm that returns a new [=debug scope=]. - 1. Let |batchingScope| be null. 1. If |event| [=string/starts with=] "`reserved.`", set |batchingScope| to the - result of running |scopingDetails|' - get batching scope steps. + result of running [=get or create a batching scope=] given |reportingOrigin|, |coordinator| and + |reportingContext|. - Note: Each non-reserved |event| will have a different [=batching scope=] - that is created later. + Note: Each non-reserved |event| will have a different [=batching scope=] that is created later. 1. [=list/For each=] |contribution| of |contributions|: 1. [=Assert=] |contribution|["{{PAExtendedHistogramContribution/bucket}}"] is a {{bigint}} and is [=set/contained=] in [=the exclusive range|the range=] 0 to 2128, exclusive. @@ -3304,8 +3298,7 @@ To commit server response private aggregation contributions given a [ : [=on event contribution entry/batching scope=] :: |batchingScope| : [=on event contribution entry/debug scope=] - :: The result of running |scopingDetails|' get debug scope steps. + :: A new [=debug scope=]. : [=on event contribution entry/worklet function=] :: "`generate-bid`" (it does not matter for server returned contributions) : [=on event contribution entry/origin=] @@ -3550,19 +3543,20 @@ A server auction response is a [=struct=] that contains auction resul : component seller reporting :: Null or [=server auction reporting info=]. : component win private aggregation contributions - :: A [=map=] whose [=map/keys=] are [=tuples=] of ([=reporting bid key=], [=string=]), and whose + :: A [=map=] whose [=map/keys=] are [=server auction pagg contribution keys=], and whose [=map/values=] are [=lists=] of [=on event contribution entries=]. Private aggregation contributions from winners of component auctions run on trusted auction servers. These need to be filtered by the client based on the top level auction's outcome. : server filtered private aggregation reserved contributions - :: A [=map=] from a [=tuple=] of ([=reporting bid key=], [=string=]) to a [=list=] of [=on event - contribution entries=]. Server filtered private aggregation contributions with reserved event - types (already set to "reserved.always"), which are not dependent on the final auction result and - should always be reported. + :: A [=map=] whose [=map/keys=] are [=server auction pagg contribution keys=], and whose + [=map/values=] are [=lists=] of [=on event contribution entries=]. Server filtered private + aggregation contributions with reserved event types (already set to "reserved.always"), which + are not dependent on the final auction result and should always be reported. : server filtered private aggregation non reserved contributions - :: A [=map=] from a [=tuple=] of ([=reporting bid key=], [=string=]) to a [=list=] of [=on event - contribution entries=]. Server filtered private aggregation contributions with non reserved event - types, which are not dependent on the final auction result and should always be reported. + :: A [=map=] whose [=map/keys=] are [=server auction pagg contribution keys=], and whose + [=map/values=] are [=lists=] of [=on event contribution entries=]. Server filtered private + aggregation contributions with non reserved event types, which are not dependent on the final + auction result and should always be reported. : component win debugging only reports :: A [=map=] whose [=map/keys=] are [=server auction debug report keys=], and whose [=map/values=] are [=lists=] of [=urls=]. @@ -3587,6 +3581,16 @@ a server auction debug report key is a [=struct=] with the following :: A [=boolean=]. +a server auction pagg contribution key is a [=struct=] with the following [=struct/items=]: +
+ : reporting origin + :: The [=origin=] of the script that contributed the contribution. + : coordinator + :: Null or an [=aggregation coordinator=]. + : event + :: A [=string=]. +
+
The getInterestGroupAdAuctionData(|configIDL|) method steps are: @@ -6134,8 +6138,6 @@ event, PAExtendedHistogramContribution contribution) method steps are: reserved event types are added later. 1. If |event| is "`reserved.once`" and |function| is [=worklet function/report-result=] or [=worklet function/report-win=], [=exception/throw=] a {{TypeError}}. -1. If |event| does not [=string/start with=] "`reserved.`", and |function| is "`scoreAd()`" or - "`report-result`", return. 1. Let |bucket| be |contribution|["{{PAExtendedHistogramContribution/bucket}}"]. 1. If |bucket| is a {{PASignalValue}}: 1. If |bucket|["{{PASignalValue/baseValue}}"] is not a valid [=signal base @@ -6166,6 +6168,8 @@ event, PAExtendedHistogramContribution contribution) method steps are: Note: It is not currently possible to set a non-default filtering ID max bytes for Protected Audience. +1. If |event| does not [=string/start with=] "`reserved.`", and |function| is + [=worklet function/score-ad=] or [=worklet function/report-result=], return. 1. Let |batchingScope| be null. 1. If |event| [=string/starts with=] "`reserved.`", set |batchingScope| to the result of running |scopingDetails|'