Skip to content

Commit

Permalink
[Spec] Add support for B&A triggered updates (#1294)
Browse files Browse the repository at this point in the history
* Add support for triggered updates

* Address comments

* Apply suggestions from code review

Co-authored-by: qingxinwu <[email protected]>

---------

Co-authored-by: qingxinwu <[email protected]>
  • Loading branch information
brusshamilton and qingxinwu authored Oct 11, 2024
1 parent feb9171 commit 93d50e1
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2952,11 +2952,20 @@ a [=list=] of [=interest groups=] |bidIgs|, and a [=list=] of [=bid debug report
:: |sellerReportingResult|
: [=leading bid info/component seller reporting result=]
:: |componentSellerReportingResult|
1. [=list/For each=] |igPair| in |response|'s [=server auction response/bidding groups=] field:
1. [=list/For each=] |igId| in |response|'s [=server auction response/bidding groups=]:
1. Let |ig| be the [=interest group=] in the [=user agent=]'s [=interest group set=] whose
[=interest group/owner=] is |igPair|'s [=interest group/owner=] and [=interest group/name=] is |igPair|'s
[=interest group/owner=] is |igId|'s [=interest group/owner=] and [=interest group/name=] is |igId|'s
[=interest group/name=]. [=iteration/Continue=] if none found.
1. [=list/Append=] |ig| to |bidIgs|.
1. [=map/For each=] |igId| → |updateIfOlderThan| of |response|'s
[=server auction response/update groups=]:
1. Let |ig| be the [=interest group=] in the [=user agent=]'s [=interest group set=] whose
[=interest group/owner=] is |igId|'s [=interest group/owner=] and [=interest group/name=] is |igId|'s
[=interest group/name=]. [=iteration/Continue=] if none found.
1. If |updateIfOlderThan| is less than 10 mintues, set it to 10 minutes.
1. If [=current wall time=] &minus; |ig|'s [=interest group/last updated=]
|updateIfOlderThan|, set |ig|'s [=interest group/next update after=] to the
[=current wall time=] + |updateIfOlderThan|.
1. Insert the debug reporting URLs from |response| into |bidDebugReportInfoList|.

Issue: TODO: Handle forDebuggingOnly reports from server auction.
Expand Down Expand Up @@ -3153,9 +3162,14 @@ from an auction executed on the trusted auction server. It has the following [=s
: <dfn>interest group owner</dfn>
:: An [=origin=]. The winning bid's interest group [=interest group/owner=].
: <dfn>bidding groups</dfn>
:: A [=list=] of interest group [=interest group/owner=] and
interest group [=interest group/name=] pairs that bid
in the auction.
:: A [=list=] of [=tuples=] consisting of an [=origin=]
[=interest group/owner=] and a [=string=] [=interest group/name=] for
each interest group that bid in the auction.
: <dfn>update groups</dfn>
:: A [=map=]. Its [=map/keys=] are [=tuples=] consisting of an [=origin=] for
[=interest group/owner=] and a [=string=] for [=interest group/name=]. Its
[=map/values=] are [=durations=] indicating the desired maximum time since
the interest group was [=interest group/last updated=].
: <dfn>score</dfn>
:: Null or {{double}}. Null if the server auction is not a component auction,
otherwise the {{ScoreAdOutput/desirability}} of component auction's winning bid.
Expand Down Expand Up @@ -3344,7 +3358,7 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m
<div algorithm>
To <dfn>look up the server encryption key</dfn> given an [=origin=] |seller|
and an [=origin=] |coordinator|:
1. Let |keys| be a [=list=] of ([=byte sequence=], [=byte=]) pairs returned
1. Let |keys| be a [=list=] of ([=byte sequence=], [=byte=]) [=tuples=] returned
from looking up the [[RFC9180|HPKE]] public key encryption keys and their
corresponding key IDs for |seller| specified by |coordinator|. The actual
implementation of this lookup is [=implementation-defined=], and may
Expand Down Expand Up @@ -5450,13 +5464,15 @@ To <dfn>process updateIfOlderThanMs</dfn> given an [=origin=] |buyer|, and an [=
done:
1. If |perIgData|'s [=bidding signals per interest group data/updateIfOlderThanMs=] is null,
[=iteration/continue=].
1. Let |updateIfOlderThan| be a [=duration=] of |perIgData|'s
[=bidding signals per interest group data/updateIfOlderThanMs=] milliseconds.
1. Let |ig| be the [=interest group=] of the [=user agent=]'s [=interest group set=] whose
[=interest group/owner=] is |buyer| and whose [=interest group/name=] is |igName|, or null if
[=interest group set=] does not have such an interest group.
1. If |ig| is not null and the [=current wall time=] &minus; |ig|'s [=interest group/last updated=]
≥ |perIgData|'s [=bidding signals per interest group
data/updateIfOlderThanMs=] milliseconds:
1. Set |ig|'s [=interest group/next update after=] to the [=current wall time=].
1. If |ig| is not null and the [=current wall time=] &minus; |ig|'s
[=interest group/last updated=] ≥ |updateIfOlderThan|:
1. Set |ig|'s [=interest group/next update after=] to
[=current wall time=] + |updateIfOlderThan|.
1. [=list/Replace=] the [=interest group=] that has |ig|'s [=interest group/owner=] and
[=interest group/name=] in the [=user agent=]'s [=interest group set=] with |ig|.

Expand Down

0 comments on commit 93d50e1

Please sign in to comment.