Skip to content

Spec: Support Private Aggregation aggregate error reporting #1427

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

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

Conversation

alexmturner
Copy link
Contributor

@alexmturner alexmturner commented Apr 8, 2025

This new feature allows for aggregate measurement of certain error
conditions. This also does a drive-by fix of reserved.once behavior for
buyers.


Preview | Diff

spec.bs Outdated
|global|.
1. If |result| is an [=ECMAScript/abrupt completion=], return « "null", null, |paContributions|, null ».

Issue: Callers don't seem to expect nulls in the return value.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: I updated the above line to pass on the private aggregation contributions, but the other fields might need updating too.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yep, it needs to pass on the PAgg contributions.

  1. The return array didn't have correct number of elements. See the last step of the algorithm, or callers of the algorithm for what's the expected return value. (it would be good if we have defined the return value format in the algorithm's declaration, but that was still a TODO).
  2. It seems other fields can all be null, after checking the algorithm's callers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. Ah true -- updated to have two extra nulls
  2. I think there is still an issue. In particular, |executionMetrics|'s [=script timed out=] is accessed by both callers, so |executionMetrics| being null isn't properly handled there (https://pr-preview.s3.amazonaws.com/alexmturner/turtledove/pull/1427.html#ref-for-evaluate-a-reporting-script and https://pr-preview.s3.amazonaws.com/alexmturner/turtledove/pull/1427.html#ref-for-evaluate-a-reporting-script%E2%91%A0). I guess that's not too major, though.

@alexmturner
Copy link
Contributor Author

@qingxinwu, when you get a chance, could you PTAL at this too? Thanks!

@qingxinwu qingxinwu added the spec Relates to the spec label Apr 9, 2025
@alexmturner
Copy link
Contributor Author

Just realizing that this PR might not treat timeouts correctly. I'll have a go fixing that.

aarongable pushed a commit to chromium/chromium that referenced this pull request Apr 22, 2025
Extends support for the new aggregate error reporting feature to
Protected Audience. This cl detects when an uncaught exception or other
error occurs and plumbs that to the PrivateAggregationBindings. A follow
up cl will use this boolean to trigger contributions conditional on the
event.

This cl is a no-op, but is split out for ease of reviewing.

Spec PR: WICG/turtledove#1427

Bug: 381788013
Change-Id: I0da8daf58a5893ed50d90cfbe960d82ae490126f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6426087
Commit-Queue: Alex Turner <[email protected]>
Reviewed-by: Qingxin Wu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1449926}
aarongable pushed a commit to chromium/chromium that referenced this pull request Apr 22, 2025
Extends support for the new aggregate error reporting feature to
Protected Audience. This cl renames some types and helpers in unittests
in advance of some type renames (in the subsequent cls).

This cl is a no-op, but is split out for ease of reviewing.

Spec PR: WICG/turtledove#1427

Bug: 381788013
Change-Id: I9574200c7993fb51db480c751a4622ff3e754c4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6438496
Reviewed-by: Qingxin Wu <[email protected]>
Commit-Queue: Alex Turner <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1449927}
aarongable pushed a commit to chromium/chromium that referenced this pull request Apr 22, 2025
Extends support for the new aggregate error reporting feature to
Protected Audience. This cl adds support for the worklet/script runner
parsing and forwarding, including only keeping contributions conditional
on an uncaught exception/error if that event occurs. The browser-side
handling is left for a future cl except for adding mojo validation. The
validation rejects any request conditional on an error event if the
feature flag is disabled.

This support is conditional on the feature flag, which is disabled by
default. So, this cl is (for now) a no-op. The feature flag will not be
enabled until after the browser-side support is added in the following
(and last) cl in this chain.

Spec PR: WICG/turtledove#1427

Bug: 381788013
Change-Id: I61896a0ae0b715f3edcfbf2c43260d0e817f4053
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6438253
Reviewed-by: Qingxin Wu <[email protected]>
Commit-Queue: Alex Turner <[email protected]>
Reviewed-by: Ken Buchanan <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1449940}
aarongable pushed a commit to chromium/chromium that referenced this pull request Apr 22, 2025
Extends support for the new aggregate error reporting feature to
Protected Audience. This cl adds the browser-side handling for aggregate
error reporting. This requires plumbing the event to the Private
Aggregation layer and ensuring that error events are only triggered for
one interest group per buyer and once per seller (just like for
reserved.once).

This support is conditional on the feature flag, which is disabled by
default. So, this cl is (for now) a no-op. The feature flag will be
enabled in a separate cl.

Spec PR: WICG/turtledove#1427

Bug: 381788013
Change-Id: I5960f17b887bee868dd35de5ddf6b45adc072455
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6437255
Reviewed-by: Dominic Farolino <[email protected]>
Reviewed-by: Giovanni Ortuno Urquidi <[email protected]>
Commit-Queue: Alex Turner <[email protected]>
Reviewed-by: Qingxin Wu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1449941}
@alexmturner
Copy link
Contributor Author

Thanks for all the reviews!

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

Successfully merging this pull request may close these issues.

2 participants