Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Qingxin Wu committed Dec 16, 2024
1 parent 835a5bc commit f8fed21
Showing 1 changed file with 31 additions and 27 deletions.
58 changes: 31 additions & 27 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3269,28 +3269,22 @@ To <dfn>handle server response private aggregation fields</dfn> given a [=server

<div algorithm>
To <dfn>commit server response private aggregation contributions</dfn> 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=]:
: <a spec="private-aggregation-api" for="scoping details">get batching scope steps</a>
:: 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|.
: <a spec="private-aggregation-api" for="scoping details">get debug scope steps</a>
:: 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|' <a spec="private-aggregation-api" for="scoping details">
get batching scope steps</a>.
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 2<sup>128</sup>, exclusive.
Expand All @@ -3304,8 +3298,7 @@ To <dfn>commit server response private aggregation contributions</dfn> given a [
: [=on event contribution entry/batching scope=]
:: |batchingScope|
: [=on event contribution entry/debug scope=]
:: The result of running |scopingDetails|' <a spec="private-aggregation-api"
for="scoping details">get debug scope steps</a>.
:: 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=]
Expand Down Expand Up @@ -3550,19 +3543,20 @@ A <dfn>server auction response</dfn> is a [=struct=] that contains auction resul
: <dfn>component seller reporting</dfn>
:: Null or [=server auction reporting info=].
: <dfn>component win private aggregation contributions</dfn>
:: 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.
: <dfn>server filtered private aggregation reserved contributions</dfn>
:: 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.
: <dfn>server filtered private aggregation non reserved contributions</dfn>
:: 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.
: <dfn>component win debugging only reports</dfn>
:: A [=map=] whose [=map/keys=] are [=server auction debug report keys=], and whose [=map/values=]
are [=lists=] of [=urls=].
Expand All @@ -3587,6 +3581,16 @@ a <dfn>server auction debug report key</dfn> is a [=struct=] with the following
:: A [=boolean=].
</dl>

a <dfn>server auction pagg contribution key</dfn> is a [=struct=] with the following [=struct/items=]:
<dl dfn-for="server auction pagg contribution key">
: <dfn>reporting origin</dfn>
:: The [=origin=] of the script that contributed the contribution.
: <dfn>coordinator</dfn>
:: Null or an [=aggregation coordinator=].
: <dfn>event</dfn>
:: A [=string=].
</dl>

<div algorithm="getInterestGroupAdAuctionData()">

The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> method steps are:
Expand Down Expand Up @@ -6134,8 +6138,6 @@ event, PAExtendedHistogramContribution contribution)</dfn> 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
Expand Down Expand Up @@ -6166,6 +6168,8 @@ event, PAExtendedHistogramContribution contribution)</dfn> 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|' <a spec="private-aggregation-api" for="scoping details">
Expand Down

0 comments on commit f8fed21

Please sign in to comment.