From ff6bee4a001601173219b9c8a8ef869121560c83 Mon Sep 17 00:00:00 2001 From: Dan McArdle Date: Tue, 7 Jan 2025 17:07:11 -0500 Subject: [PATCH] fixup! Spec: Define per-context contribution limits --- spec.bs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/spec.bs b/spec.bs index 3dc19fa..a88783f 100644 --- a/spec.bs +++ b/spec.bs @@ -583,6 +583,8 @@ steps. They return a [=boolean=]: not null, return true. 1. If |preSpecifiedParams|' [=pre-specified report parameters/filtering ID max bytes=] is not the [=default filtering ID max bytes=], return true. +1. If |preSpecifiedParams|' [=pre-specified report parameters/requested max + contributions=] is not null, return true. 1. Return false. Note: If a context ID or non-default filtering ID max bytes was specified, a @@ -735,8 +737,8 @@ null |timeout|: 1. [=iteration/Break=]. 1. If |hasProcessedContribution| is false, [=list/append=] |contribution| to |mergedContributions|. -1. Let |effectiveMaxContributions| be the result of [=determining the effective - max contributions=] with |preSpecifiedParams| and |api|. +1. Let |effectiveMaxContributions| be the result of [=determining the max + contributions=] with |preSpecifiedParams| and |api|. 1. Let |truncatedContributions| be a new [=list=]. 1. If |mergedContributions| has a [=list/size=] greater than |effectiveMaxContributions|: @@ -819,7 +821,7 @@ perform the following steps. They return an [=aggregatable report=]. :: |preSpecifiedParams|' [=pre-specified report parameters/filtering ID max bytes=] : [=aggregatable report/max contributions=] - :: The result of [=determining the effective max contributions=] with + :: The result of [=determining the max contributions=] with |preSpecifiedParams| and |api|. : [=aggregatable report/queued=] :: false @@ -844,14 +846,14 @@ They return a [=moment=].
-To determine the effective max contributions given a [=pre-specified -report parameters=] |preSpecifiedParams| and a [=context type=] |api|, perform -the following steps. They return a positive integer that is [=set/contained=] in -the [=valid maxContributions range=]. -1. Let |defaultMaxContributions| be [=default maxContributions by API=][|api|]. +To determine the max contributions given a [=pre-specified report +parameters=] |preSpecifiedParams| and a [=context type=] |api|, perform the +following steps. They return a positive integer that is [=set/contained=] in the +[=valid maxContributions range=]. 1. Let |requestedMaxContributions| be |preSpecifiedParams|' [=pre-specified report parameters/requested max contributions=]. -1. If |requestedMaxContributions| is null, return |defaultMaxContributions|. +1. If |requestedMaxContributions| is null, return [=default maxContributions by + API=][|api|]. 1. If |requestedMaxContributions| is greater than [=maximum maxContributions=], return [=maximum maxContributions=]. 1. Return |requestedMaxContributions|.