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: auctionBuyerKeys reporting #117

Merged
merged 5 commits into from
Feb 22, 2024
Merged

Conversation

alexmturner
Copy link
Collaborator

@alexmturner alexmturner commented Feb 16, 2024

Adds spec handling for the per-buyer latency and statistics reporting for Protected Audience, see
https://github.com/WICG/turtledove/blob/main/FLEDGE_extended_PA_reporting.md. Some follow-up work remains and has been tracked in issues added.


Preview | Diff

Adds spec handling for the per-buyer latency and statistics reporting
for Protected Audience, see
https://github.com/WICG/turtledove/blob/main/FLEDGE_extended_PA_reporting.md.
Some follow-up work remains and has been tracked in issues added.
@alexmturner
Copy link
Collaborator Author

Hey @qingxinwu, could you PTAL? Tried to put together a first go at the spec for auctionReportBuyers -- I haven't handled the seller capabilities part just yet, but added some issues. (Also added a couple of issues for things I spotted while specing.) Thanks!

cc @caraitto

@qingxinwu
Copy link

qingxinwu commented Feb 16, 2024

Hey @qingxinwu, could you PTAL? Tried to put together a first go at the spec for auctionReportBuyers -- I haven't handled the seller capabilities part just yet, but added some issues. (Also added a couple of issues for things I spotted while specing.) Thanks!

cc @caraitto

note there's a PR to add seller capabilities to Protected Audience's spec, and I just took over that and am working on it, so hopefully you'll not need to worry about it in your spec.

spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
1. Let |interestGroupBuyers| be |auctionConfig|'s <a spec="turtledove"
for="auction config">interest group buyers</a>.
1. If |interestGroupBuyers| is null, set |interestGroupBuyers| to a new
[=list=].

Choose a reason for hiding this comment

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

it seems these two steps are identical to check "If |config|["{{AuctionAdConfig/auctionReportBuyerKeys}}"]
[=map/exists=] and |auctionConfig|'s interest group buyers is not null:".

But the implementation seems not checking this, but just simply copying {{AuctionAdConfig/auctionReportBuyerKeys}}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think we can condense this as that would avoid validating the auctionReportBuyerKeys (unless we do that separately)

|config|["<code>{{AuctionAdConfig/auctionReportBuyerKeys}}</code>"][|index|].
1. If |key|["{{PAHistogramContribution/bucket}}"] is not in the range
[0, 2<sup>128</sup>−1], [=exception/throw=] a {{TypeError}}.
1. If |index| is equal to or greater than |interestGroupBuyers|' [=list/

Choose a reason for hiding this comment

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

the implementation seems not doing this, but just simply copying all keys.
So there's a difference in implementation that the step above will continue throw errors if the condition meets for extra |index|.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Switched this to a continue and added a note to match the validation logic. And yeah I thought it might be easier to follow in the spec if we didn't just keep these as a list. We could consider switching to more closely match the implementation structure.

spec.bs Outdated Show resolved Hide resolved
/bucket}}</code>"] is not in the range [0, 2<sup>128</sup>−1],
[=exception/throw=] a {{TypeError}}.

Issue: Consider validating the case where the bucket used (after

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, seems to be the same concept

spec.bs Outdated Show resolved Hide resolved
@alexmturner
Copy link
Collaborator Author

Thanks for the review! Should be ready for another pass :)

Copy link

@qingxinwu qingxinwu left a comment

Choose a reason for hiding this comment

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

generally looks good now

spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec="turtledove" for="interest group">owner</a> is
|buyerOrigin|.
: "`totalSignalsFetchLatency`"
:: The total time spent fetching trusted buyer signals in

Choose a reason for hiding this comment

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

(not something to change, just a comment)
these descriptions for values might be fine for now, but in the future (maybe when we move to the PA spec), we need to actually calculate these numbers, instead of only telling what these values mean.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, totally agree -- I tried to keep the scope of this smaller to unblock the debug mode change, but I've added an issue (number 37) to more formally spec the values here.

Copy link

@qingxinwu qingxinwu left a comment

Choose a reason for hiding this comment

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

generally looks good now

@alexmturner
Copy link
Collaborator Author

Thanks for the review!

@alexmturner alexmturner merged commit b09c9c4 into main Feb 22, 2024
1 check passed
@alexmturner alexmturner deleted the fledge-extensions-auction-buyers branch February 22, 2024 22:27
github-actions bot added a commit that referenced this pull request Feb 22, 2024
SHA: b09c9c4
Reason: push, by alexmturner

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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