-
Notifications
You must be signed in to change notification settings - Fork 180
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
Default and limit summary_buckets based on max_event_level_reports #1116
Conversation
Set to max_event_level_reports + 1; otherwise, the expected last bucket will use max int rather than the provided bucket. |
To clarify, given the following source registration: {
"max_event_level_reports": 3,
"trigger_specs": [{"trigger_data": [0]}]
} and the following trigger registrations: {"trigger_data": "0"}
{"trigger_data": "0"}
{"trigger_data": "0"} are you saying that the PR as written would yield the reports {"summary_bucket": [1, 1]}
{"summary_bucket": [2, 2]}
{"summary_bucket": [3, MAX_UINT32]} instead of {"summary_bucket": [1, 1]}
{"summary_bucket": [2, 2]}
{"summary_bucket": [3, 3]} ? I'd like to see https://github.com/WICG/attribution-reporting-api/blob/main/flexible_event_config.md#reporting-trigger-counts updated to show what happens on the eleventh trigger. |
|
There's no truncation here per se. There's a default if the field is omitted, and there's an error if the field is too long. Could you take a look at https://github.com/WICG/attribution-reporting-api/blob/main/flexible_event_config.md#reporting-trigger-value-buckets and see if you agree with the behavior there? |
What would be the expected |
Do we need to state that the report corresponding with max reports always has MAX_INT in its |
This PR replaces that statement. |
Ah, gotcha, thanks! |
I think we may be confusing the JSON registration syntax with the equivalent inclusive ranges. Given JSON |
Why is it OK for summary bucket list to be shorter than max reports? Which summary bucket do the extra reports get? |
There are no extra reports: |
* Summary buckets and window operator parsing algorithm * Summary buckets and window operator parsing algorithm * Apply suggestions from code review Co-authored-by: Andrew Paseltiner <[email protected]> * Addresses comments * Removes summary parsing and fields from trigger specs * Adds issue, summary window operator algo * Updates with #1116 * change var name, adds bound --------- Co-authored-by: Andrew Paseltiner <[email protected]>
The max_event_level_reports value (whether explicit or defaulted based on source type) restricts the maximum number of reports that can be produced from a single source. Therefore, it is misleading to have more than that number of summary_buckets, since bucket increments will stop once reaching max_event_level_reports.
Rejecting sources with inconsistent values in these fields will help prevent developer errors, and both the rejection and defaulting based on max_event_level_reports bounds the storage space needed per trigger_spec for the summary_buckets field to 20, which is the max settable value for max_event_level_reports.
This is a revival of #1021, which has more discussion.