@@ -469,15 +469,20 @@ To <dfn algorithm export>get a debug details</dfn> given a [=debug scope=]
469
469
1. Otherwise, return a new [=debug details=] .
470
470
471
471
To <dfn algorithm export>mark a debug scope complete</dfn> given a [=debug
472
- scope=] |debugScope|:
473
-
474
- 1. Let |debugDetails| be a new [=debug details=] .
472
+ scope=] |debugScope| and an optional [=debug details=] or null
473
+ |debugDetailsOverride| (default null):
474
+ 1. Let |debugDetails| be |debugDetailsOverride| .
475
475
1. Let |debugScopeMap| be the [=debug scope map=] .
476
476
1. If |debugScopeMap|[|debugScope|] [=map/exists=] :
477
- 1. Set |debugDetails| to |debugScopeMap|[|debugScope|] .
477
+ 1. [=Assert=] : |debugDetailsOverride| is null.
478
+
479
+ Note: The override can be provided if the debug details have not been
480
+ set otherwise.
481
+ 1. Set |debugDetails| to |debugScopeMap|[|debugScope|] .
478
482
1. [=map/Remove=] |debugScopeMap|[|debugScope|] .
479
483
1. If |debugDetails|'s [=debug details/key=] is not null, [=assert=] :
480
484
|debugDetails|'s [=debug details/enabled=] is true.
485
+ 1. If |debugDetails| is null, set |debugDetails| to a new [=debug details=] .
481
486
1. [=list/iterate|For each=] |entry| of the [=contribution cache=] :
482
487
1. If |entry|'s [=contribution cache entry/debug scope=] is |debugScope|,
483
488
set |entry|'s [=contribution cache entry/debug details=] to
@@ -1249,9 +1254,17 @@ dictionary AuctionReportBuyersConfig {
1249
1254
required double scale;
1250
1255
};
1251
1256
1257
+ dictionary AuctionReportBuyerDebugModeConfig {
1258
+ boolean enabled = false;
1259
+
1260
+ // Must only be provided if `enabled` is true.
1261
+ bigint? debugKey;
1262
+ };
1263
+
1252
1264
partial dictionary AuctionAdConfig {
1253
1265
sequence<bigint> auctionReportBuyerKeys;
1254
1266
record<DOMString, AuctionReportBuyersConfig> auctionReportBuyers;
1267
+ AuctionReportBuyerDebugModeConfig auctionReportBuyerDebugModeConfig;
1255
1268
};
1256
1269
</xmp>
1257
1270
@@ -1375,6 +1388,8 @@ Extend the <a spec="turtledove">auction config</a> [=struct=] to add new fields:
1375
1388
:: A [=map=] from buyer [=origins=] to {{bigint}} s.
1376
1389
: <dfn>auction report buyers</dfn>
1377
1390
:: A [=map=] from [=strings=] to {{AuctionReportBuyersConfig}} s.
1391
+ : <dfn>auction report buyer debug details</dfn>
1392
+ :: A [=debug details=] .
1378
1393
1379
1394
Issue: Consider replacing the strings above with specific enum types.
1380
1395
@@ -1576,7 +1591,26 @@ modified to add the following steps just before the last step ("Return
1576
1591
1. [=map/Set=] |auctionConfig|'s [=auction config/auction report
1577
1592
buyers=] [|reportType|] to |reportBuyerConfig|.
1578
1593
1579
- Issue: Handle `auctionReportBuyerDebugModeConfig` here.
1594
+ 1. Set |auctionConfig|'s [=auction config/auction report buyer debug details=]
1595
+ to a new [=debug details=] .
1596
+ 1. If |config|[{{AuctionAdConfig/auctionReportBuyerDebugModeConfig}}]
1597
+ [=map/exists=] :
1598
+ 1. Let |debugModeConfig| be
1599
+ |config|[{{AuctionAdConfig/auctionReportBuyerDebugModeConfig}}] .
1600
+ 1. Let |enabled| be
1601
+ |debugModeConfig|[{{AuctionReportBuyerDebugModeConfig/enabled}}] .
1602
+ 1. Let |debugKey| be
1603
+ |debugModeConfig|[{{AuctionReportBuyerDebugModeConfig/debugKey}}] .
1604
+ 1. If |debugKey| is not null:
1605
+ 1. If |debugKey| is not in the range [0, 2<sup>64</sup>−1] , [=exception/
1606
+ throw=] a {{TypeError}} .
1607
+ 1. If |enabled| is false, [=exception/throw=] a {{TypeError}} .
1608
+ 1. Set |auctionConfig|'s [=auction config/auction report buyer debug
1609
+ details=] to a new [=debug details=] with the items:
1610
+ : [=debug details/enabled=]
1611
+ :: |enabled|
1612
+ : [=debug details/key=]
1613
+ :: |debugKey|
1580
1614
1. If |config|[{{AuctionAdConfig/privateAggregationConfig}}] [=map/exists=] :
1581
1615
1. Let |aggregationCoordinator| be the result of [=obtaining the Private
1582
1616
Aggregation coordinator=] given
@@ -1908,11 +1942,8 @@ an <a spec="turtledove">auction config</a> |auctionConfig| and a
1908
1942
:: |auctionReportBuyersDebugScope|
1909
1943
1. [=Append an entry to the contribution cache|Append=] |entry| to
1910
1944
the [=contribution cache=] .
1911
-
1912
- Issue: Handle `auctionReportBuyerDebugModeConfig` here, may need to pass an
1913
- override to [=mark a debug scope complete=] and possibly refactor to merge
1914
- handling with {{PrivateAggregation/enableDebugMode()}} .
1915
- 1. [=Mark a debug scope complete=] given |auctionReportBuyersDebugScope|.
1945
+ 1. [=Mark a debug scope complete=] given |auctionReportBuyersDebugScope| and
1946
+ |auctionConfig|'s [=auction config/auction report buyer debug details=] .
1916
1947
1. [=map/For each=] (|origin|, |aggregationCoordinator|) → |batchingScope| of
1917
1948
|auctionConfig|'s [=auction config/batching scope map=] :
1918
1949
1. [=Process contributions for a batching scope=] given |batchingScope|,
0 commit comments