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

Document an edge case with join / win history #1364

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
26 changes: 18 additions & 8 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1771,11 +1771,11 @@ following steps. They return a failure if failing to fetch the script or wasm, o
1. Let |igGenerateBid| be the result of [=building an interest group passed to generateBid=] with
|ig|.
1. Set |browserSignals|["{{BiddingBrowserSignals/joinCount}}"] to the sum of |ig|'s
[=interest group/join counts=] for all days within the last 30 days.
[=interest group/join counts=] for all days within the last 30 days in UTC, inclusive.
1. Set |browserSignals|["{{BiddingBrowserSignals/recency}}"] to the [=current coarsened wall
time=] minus |ig|'s [=interest group/join time=], in milliseconds.
1. [=map/Set=] |browserSignals|["{{BiddingBrowserSignals/bidCount}}"] to the sum of |ig|'s
[=interest group/bid counts=] for all days within the last 30 days.
[=interest group/bid counts=] for all days within the last 30 days in UTC, inclusive.
1. [=map/Set=] |browserSignals|["{{BiddingBrowserSignals/adComponentsLimit}}"] to 40.
1. [=map/Set=] |browserSignals|["{{BiddingBrowserSignals/multiBidLimit}}"] to |multiBidLimit|.
1. Let |prevWins| be a new <code>[=sequence=]<{{PreviousWin}}></code>.
Expand Down Expand Up @@ -3562,10 +3562,16 @@ A <dfn>server auction browser signals</dfn> is a [=struct=] with the following [
<dl dfn-for="server auction browser signals">
: <dfn>bid count</dfn>
:: A count of the number of bids for this interest group in the last 30 days.
Calculated by summing the [=interest group/bid counts=] for all days within the last 30 days.
Calculated by summing the [=interest group/bid counts=].

NOTE: Since bid counts are kept by UTC day, interest groups that live long enough will have
early bid history expire before the interest group expires.
: <dfn>join count</dfn>
:: A count of the number of joins for this interest group in the last 30 days.
:: A count of the number of joins for this interest group in the last 30 UTC days, inclusive.
Calculated by summing the [=interest group/join counts=].

NOTE: Since bid counts are kept by UTC day, interest groups that live long enough will have
early join history expire before the interest group expires.
: <dfn>recency ms</dfn>
:: A [=duration=], in milliseconds, representing the [=current coarsened wall time=] at
the time this object was constructed minus the corresponding [=interest group=]'s
Expand Down Expand Up @@ -3760,9 +3766,11 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m
1. [=list/Append=] |serverPrevWin| to |prevWins|.
1. Let |browserSignals| be a new [=server auction browser signals=] with the following [=struct/items=]:
: [=server auction browser signals/bid count=]
:: the sum of |ig|'s [=interest group/bid counts=] with a bid day within the last 30 days
:: the sum of |ig|'s [=interest group/bid counts=] with a bid day within the last 30 UTC days,
inclusive.
: [=server auction browser signals/join count=]
:: the sum of |ig|'s [=interest group/join counts=] with a join day within the last 30 days
:: the sum of |ig|'s [=interest group/join counts=] with a join day within the last 30 UTC
days, inclusive.
: [=server auction browser signals/recency ms=]
:: the [=current coarsened wall time=] minus |ig|'s [=interest group/join time=] in
millseconds
Expand Down Expand Up @@ -5087,8 +5095,10 @@ dictionary StorageInterestGroup : AuctionAdInterestGroup {
1. Let |encoded| be the result of running [=forgiving-base64 encode=] with |ig|'s [=interest group/additional bid key=].
1. If |encoded| is failure, then return failure.
1. [=map/Set=] |resultIg|["{{AuctionAdInterestGroup/additionalBidKey}}"] to the result of running [=forgiving-base64 encode=] with |ig|'s [=interest group/additional bid key=].
1. [=map/Set=] |resultIg|["{{StorageInterestGroup/joinCount}}"] to the sum of |ig|'s [=interest group/join counts=] for all days within the last 30 days.
1. [=map/Set=] |resultIg|["{{StorageInterestGroup/bidCount}}"] to the sum of |ig|'s [=interest group/bid counts=] for all days within the last 30 days.
1. [=map/Set=] |resultIg|["{{StorageInterestGroup/joinCount}}"] to the sum of |ig|'s [=interest
group/join counts=] for all days within the last 30 UTC days, inclusive.
1. [=map/Set=] |resultIg|["{{StorageInterestGroup/bidCount}}"] to the sum of |ig|'s [=interest
group/bid counts=] for all days within the last 30 UTC days, inclusive.
1. Let |resultPrevWins| be a new <code>[=sequence=]<{{PreviousWin}}></code>.
1. [=list/For each=] |prevWin| of |ig|'s [=interest group/previous wins=] for all days within the
the last 30 days:
Expand Down
Loading