Skip to content
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: Define per-context contribution limits #164

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dmcardle
Copy link
Contributor

@dmcardle dmcardle commented Oct 16, 2024

This change adds the web-visible maxContributions field, which enables some callers to request different numbers of contributions per report.

Per-context limits are being added to the explainer in #146.


Preview | Diff

This change adds the web-visible `maxContributions` field, which enables
some callers to request different numbers of contributions per report.
@@ -666,6 +680,9 @@ scope</dfn> given a [=pre-specified report parameters=] |params| and a
filtering ID max bytes=].
1. [=Assert=]: |filteringIdMaxBytes| is [=set/contained=] in the [=valid
filtering ID max bytes range=]
1. Let |requestedMaxContributions| be |params|' [=pre-specified report
parameters/requested max contributions=].
1. [=Assert=]: |requestedMaxContributions| is null or greater than zero.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be nice to clarify what happens when the caller asks for zero contributions. I think it should fall back to the default size.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would require a little refactor though. Currently, we say "a positive integer" all over the place, so I think that the caller is effectively burdened with validating positivity.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fair for us to error out if zero is requested (similar to a context ID being too long).

@dmcardle dmcardle marked this pull request as ready for review November 4, 2024 14:54
Copy link
Collaborator

@alexmturner alexmturner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Dan! Looks good -- just some nits

@@ -666,6 +680,9 @@ scope</dfn> given a [=pre-specified report parameters=] |params| and a
filtering ID max bytes=].
1. [=Assert=]: |filteringIdMaxBytes| is [=set/contained=] in the [=valid
filtering ID max bytes range=]
1. Let |requestedMaxContributions| be |params|' [=pre-specified report
parameters/requested max contributions=].
1. [=Assert=]: |requestedMaxContributions| is null or greater than zero.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fair for us to error out if zero is requested (similar to a context ID being too long).

<dfn>Maximum maxContributions</dfn> is a positive integer that defines an upper
bound on the number of contributions per [=aggregatable report=].

<dfn>Valid maxContributions range</dfn> is a non-empty [=set=] of positive
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super nit, but wondering if this is necessary to have as separate. E.g. "default maxcontributions by API" could just end "Each of the values in this map must not be greater than [=maximum maxContributions=]."

@@ -1341,16 +1377,21 @@ WebIDL modifications {#protected-audience-api-webidl-modifications}
The {{AuctionAdConfig}} and {{AuctionAdInterestGroup}} dictionaries are
modified to add a new field:
<xmp class="idl">
dictionary ProtectedAudiencePrivateAggregationConfig {
dictionary ProtectedAudienceAuctionPrivateAggregationConfig {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to rebase this PR after #166. Although as a general point -- wondering if we should make this change at the same time as we add contextId and filteringIdMaxBytes given they all require activating deterministic counts.

That being said, we'll probably want to make the Shared Storage spec changes soon

@@ -804,6 +826,21 @@ They return a [=moment=].

</div>

<div algorithm>
To <dfn>determine the effective max contributions</dfn> given a [=pre-specified
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super nit: could probably drop effective (given requested is already specified below)

@@ -666,6 +680,9 @@ scope</dfn> given a [=pre-specified report parameters=] |params| and a
filtering ID max bytes=].
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably also update "determine if a report should be sent deterministically"

(Random location as it won't let me comment on lines too far away)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants