Skip to content

Commit 419c30e

Browse files
authored
Spec: Define per-API limit on contributions per report (#150)
1 parent 9108e9b commit 419c30e

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

spec.bs

+12-8
Original file line numberDiff line numberDiff line change
@@ -456,8 +456,10 @@ controls which [=origins=] are valid [=aggregation coordinators=]. Every
456456
<dfn>Default aggregation coordinator</dfn> is an [=aggregation coordinator=]
457457
that controls which is used for a report if none is explicitly selected.
458458

459-
<dfn>Maximum report contributions</dfn> is a positive integer that controls how
460-
many contributions can be present in a single report.
459+
<dfn>Maximum report contributions</dfn> is a [=map=] from [=context type=] to
460+
positive integers. Semantically, it defines the maximum number of contributions
461+
that can be present in a single report for every kind of calling context, e.g.
462+
Shared Storage.
461463

462464
<dfn>Minimum report delay</dfn> is a non-negative [=duration=] that controls the
463465
minimum delay to deliver an [=aggregatable report=].
@@ -690,9 +692,9 @@ null |timeout|:
690692
|mergedContributions|.
691693
1. Let |truncatedContributions| be a new [=list=].
692694
1. If |mergedContributions| has a [=list/size=] greater than [=maximum report
693-
contributions=]:
695+
contributions=][|api|]:
694696
1. [=set/For each=] |n| of [=the exclusive range|the range=] 0 to [=maximum
695-
report contributions=], exclusive:
697+
report contributions=][|api|], exclusive:
696698
1. [=set/Append=] |mergedContributions|[|n|] to
697699
|truncatedContributions|.
698700
1. Otherwise, set |truncatedContributions| to |mergedContributions|.
@@ -1014,10 +1016,12 @@ To <dfn>obtain the plaintext payload</dfn> given an [=aggregatable report=]
10141016
|report|, perform the following steps. They return a [=byte sequence=].
10151017
1. Let |payloadData| be a new [=list=].
10161018
1. Let |contributions| be |report|'s [=aggregatable report/contributions=].
1017-
1. [=Assert=]: |contributions|' [=list/size=] is not greater than [=maximum
1018-
report contributions=].
1019-
1. [=iteration/While=] |contributions|' [=list/size=] is less than [=maximum
1020-
report contributions=]:
1019+
1. Let |maxContributions| be
1020+
[=maximum report contributions=][[=aggregatable report/api=]].
1021+
1. [=Assert=]: |contributions|' [=list/size=] is not greater than
1022+
|maxContributions|.
1023+
1. [=iteration/While=] |contributions|' [=list/size=] is less than
1024+
|maxContributions|:
10211025
1. Let |nullContribution| be a new {{PAHistogramContribution}} with the
10221026
items:
10231027
: {{PAHistogramContribution/bucket}}

0 commit comments

Comments
 (0)