@@ -618,8 +618,10 @@ A randomized response output configuration is a [=struct=] with the following it
618618<dl dfn-for="randomized response output configuration">
619619: <dfn>max attributions per source</dfn>
620620:: A positive integer.
621- : <dfn>trigger specs</dfn>
622- :: A [=trigger spec map=] .
621+ : <dfn>trigger data</dfn>
622+ :: A [=trigger data set=] .
623+ : <dfn>event-level report windows</dfn>
624+ :: A [=report window list=] .
623625
624626</dl>
625627
@@ -708,34 +710,25 @@ A <dfn>trigger-data matching mode</dfn> is one of the following:
708710
709711<h3 id="trigger-specs-header">Trigger specs</h3>
710712
711- A <dfn>trigger spec</dfn> is a [=struct=] with the following items:
712-
713- <dl dfn-for="trigger spec">
714- : <dfn>event-level report windows</dfn>
715- :: A [=report window list=] .
716-
717- </dl>
713+ A <dfn>trigger data set</dfn> is a [=set=] whose items are unsigned 32-bit
714+ integers.
718715
719- A <dfn>trigger spec map</dfn> is a [=map=] whose keys are unsigned 32-bit
720- integers and values are [=trigger specs=] .
721-
722- To <dfn>find a matching trigger spec</dfn> given an [=attribution source=]
716+ To <dfn>find matching trigger data</dfn> given an [=attribution source=]
723717|source| and an unsigned 64-bit integer |triggerData|:
724718
725- 1. Let |specs | be |source|'s [=attribution source/trigger specs =] .
719+ 1. Let |set | be |source|'s [=attribution source/trigger data =] .
7267201. If |source|'s [=attribution source/trigger-data matching mode=] is:
727721 <dl class="switch">
728722 : "<code> [=trigger-data matching mode/exact=] </code> "
729723 :: Run the following steps:
730- 1. If |specs| [|triggerData|] [=map/exists=] , return its [=map/entry=] .
724+ 1. If |set| [=set/contains=] |triggerData| , return |triggerData| .
731725 1. Return an error.
732726 : "<code> [=trigger-data matching mode/modulus=] </code> "
733727 :: Run the following steps:
734- 1. If |specs| [=map/is empty=] , return an error.
735- 1. Let |keys| be |specs|'s [=map/get the keys|keys=] .
736- 1. Let |index| be the remainder when dividing |triggerData| by |keys|'s
728+ 1. If |set| [=set/is empty=] , return an error.
729+ 1. Let |index| be the remainder when dividing |triggerData| by |set|'s
737730 [=set/size=] .
738- 1. Return the [=map/entry=] for |specs |[|keys|[| index|] ].
731+ 1. Return the |set |[|index|] .
739732
740733 </dl>
741734
@@ -787,8 +780,10 @@ An attribution source is a [=struct=] with the following items:
787780:: A [=source type=] .
788781: <dfn>expiry</dfn>
789782:: A [=duration=] .
790- : <dfn>trigger specs</dfn>
791- :: A [=trigger spec map=] .
783+ : <dfn>event-level report windows</dfn>
784+ :: A [=report window list=] .
785+ : <dfn>trigger data</dfn>
786+ :: A [=trigger data set=] .
792787: <dfn>aggregatable report window</dfn>
793788:: A [=report window=] .
794789: <dfn>priority</dfn>
@@ -1322,7 +1317,7 @@ Its value is (1 day, 30 days).
13221317<dfn>Min report window</dfn> is a positive [=duration=] that controls the
13231318minimum [=duration from=] an [=attribution source's=] [=attribution source/source time=]
13241319and any [=report window/end=] in [=attribution source/aggregatable report window=] or
1325- [=trigger spec /event-level report windows=] .
1320+ [=attribution source /event-level report windows=] .
13261321Its value is 1 hour.
13271322
13281323<dfn>Max entries per filter data</dfn> is a positive integer that controls the
@@ -1350,7 +1345,7 @@ controls the maximum value of [=attribution source/max number of event-level rep
13501345Its value is 20.
13511346
13521347<dfn>Max settable event-level report windows</dfn> is a positive integer that
1353- controls the maximum [=list/size=] of [=trigger spec /event-level report windows=] .
1348+ controls the maximum [=list/size=] of [=attribution source /event-level report windows=] .
13541349Its value is 5.
13551350
13561351<dfn>Default event-level attributions per source</dfn> is a [=map=] that
@@ -1374,7 +1369,7 @@ controls the valid range of [=event-level trigger configuration/trigger data=].
13741369Its value is «[=source type/navigation=] → 8, [=source type/event=] → 2».
13751370
13761371<dfn>Max distinct trigger data per source</dfn> is a positive integer that
1377- controls the maximum [=map /size=] of a [=trigger spec map =] for an
1372+ controls the maximum [=set /size=] of a [=trigger data set =] for an
13781373[=attribution source=] . Its value is 32.
13791374
13801375<dfn>Max length per trigger context ID</dfn> is a positive integer that controls
@@ -2338,8 +2333,8 @@ an [=aggregation coordinator=] |aggregationCoordinator|, and a [=moment=] |now|:
23382333
23392334To <dfn>obtain a set of possible trigger states</dfn> given a [=randomized response output configuration=] |config|:
234023351. Let |possibleTriggerStates| be a new [=set=] .
2341- 1. [=map /iterate|For each=] |triggerData| → |spec| of | config|'s [=randomized response output configuration/trigger specs =] :
2342- 1. [=list/For each=] |reportWindow| of |spec |'s [=trigger spec /event-level report windows=] :
2336+ 1. [=set /iterate|For each=] |triggerData| | config|'s [=randomized response output configuration/trigger data =] :
2337+ 1. [=list/For each=] |reportWindow| of |config |'s [=randomized response output configuration /event-level report windows=] :
23432338 1. Let |state| be a new [=trigger state=] with the items:
23442339 : [=trigger state/trigger data=]
23452340 :: |triggerData|
@@ -2557,49 +2552,33 @@ To <dfn>parse report windows</dfn> given a |value|, a
25572552 1. Set |startDuration| to |endDuration|.
255825531. Return |windows|.
25592554
2560- To <dfn>parse trigger data into a trigger spec map</dfn> given a
2561- |triggerDataList|, a [=trigger spec=] |spec|, and a [=trigger spec map=]
2562- |specs|:
2563-
2564- 1. If |triggerDataList| is not a [=list=] or its [=list/size=] is greater than
2565- [=max distinct trigger data per source=] , return false.
2566- 1. [=list/iterate|For each=] |triggerData| of |triggerDataList|:
2567- 1. If |triggerData| is not an integer or cannot be represented by an
2568- unsigned 32-bit integer, or |specs|[|triggerData|] [=map/exists=] ,
2569- return false.
2570- 1. [=map/Set=] |specs|[|triggerData|] to |spec|.
2571- 1. If |specs|'s [=map/size=] is greater than
2572- [=max distinct trigger data per source=] , return false.
2573- 1. Return true.
2555+ To <dfn>parse trigger data into a trigger data set</dfn> given a [=map=] |map|
2556+ and a [=trigger-data matching mode=] |matchingMode|:
25742557
2575- To <dfn>parse trigger specs</dfn> given a [=map=] |map|, a [=moment=]
2576- |sourceTime|, a [=source type=] |sourceType|, a [=duration=] |expiry|, and a
2577- [=trigger-data matching mode=] |matchingMode|:
2578-
2579- 1. Let |defaultReportWindows| be the result of
2580- [=parsing top-level report windows=] with |map|, |sourceTime|, |sourceType|,
2581- and |expiry|.
2582- 1. If |defaultReportWindows| is an error, return an error.
2583- 1. Let |specs| be a new [=trigger spec map=] .
2584- 1. Let |spec| be a new [=trigger spec=] with the following items:
2585- : [=trigger spec/event-level report windows=]
2586- :: |defaultReportWindows|
2558+ 1. Let |set| be a new [=trigger data set=] .
258725591. If |map|["<code>[=source-registration JSON key/trigger_data=] </code> "] [=map/exists=] :
2588- 1. If the result of running
2589- [=parse trigger data into a trigger spec map=] with
2590- |map|["<code>[=source-registration JSON key/trigger_data=] </code> "], |spec|, and |specs| is false,
2591- return an error.
2560+ 1. Let |triggerDataList| be
2561+ |map|["<code>[=source-registration JSON key/trigger_data=] </code> "].
2562+ 1. If |triggerDataList| is not a [=list=] or its [=list/size=] is greater than
2563+ [=max distinct trigger data per source=] , return an error.
2564+ 1. [=list/iterate|For each=] |triggerData| of |triggerDataList|:
2565+ 1. If |triggerData| is not an integer or cannot be represented by an
2566+ unsigned 32-bit integer, or |set| [=set/contains=] |triggerData|,
2567+ return an error.
2568+ 1. [=set/Append=] |triggerData| to |set|.
2569+ 1. If |set|'s [=set/size=] is greater than
2570+ [=max distinct trigger data per source=] , return an error.
259225711. Otherwise:
25932572 1. [=set/iterate|For each=] integer |triggerData| of
25942573 [=the exclusive range|the range=] 0 to
25952574 [=default trigger data cardinality=] [|sourceType|] , exclusive:
2596- 1. [=map/Set =] |specs| [| triggerData|] to |spec |.
2575+ 1. [=set/Append =] |triggerData| to |triggerDataSet |.
259725761. If |matchingMode| is "<code> [=trigger-data matching mode/modulus=] </code> ":
25982577 1. Let |i| be 0.
2599- 1. [=map /iterate|For each=] |triggerData| of |specs|'s [=map/get the keys|keys=] :
2578+ 1. [=set /iterate|For each=] |triggerData| of |set| :
26002579 1. If |triggerData| does not equal |i|, return an error.
26012580 1. Set |i| to |i| + 1.
2602- 1. Return |specs |.
2581+ 1. Return |set |.
26032582
26042583To <dfn>parse a source aggregatable debug reporting config</dfn> given |value|, a
26052584non-negative integer |defaultBudget|, and an [=aggregatable debug reporting config=]
@@ -2726,9 +2705,13 @@ To <dfn noexport>parse source-registration JSON</dfn> given a [=byte sequence=]
27262705 1. If |value|["<code>[=source-registration JSON key/trigger_data_matching=] </code> "] is not a [=string=] , return an error.
27272706 1. If |value|["<code>[=source-registration JSON key/trigger_data_matching=] </code> "] is not a [=trigger-data matching mode=] , return an error.
27282707 1. Set |triggerDataMatchingMode| to |value|["<code>[=source-registration JSON key/trigger_data_matching=] </code> "].
2729- 1. Let |triggerSpecs| be the result of [=parsing trigger specs=] with |value|,
2730- |sourceTime|, |sourceType|, |expiry|, and |triggerDataMatchingMode|.
2731- 1. If |triggerSpecs| is an error, return it.
2708+ 1. Let |eventReportWindows| be the result of
2709+ [=parsing top-level report windows=] with |value|, |sourceTime|, |sourceType|,
2710+ and |expiry|.
2711+ 1. If |eventReportWindows| is an error, return it.
2712+ 1. Let |triggerDataSet| be the result of [=parsing trigger data into a trigger data set=] with |value|
2713+ and |triggerDataMatchingMode|.
2714+ 1. If |triggerDataSet| is an error, return it.
273227151. Let |attributionScopes| be the result of running [=parse attribution scopes=] with |value|.
273327161. If |attributionScopes| is an error, return it.
273427171. Let |epsilon| be the user agent's [=max settable event-level epsilon=] .
@@ -2759,8 +2742,10 @@ To <dfn noexport>parse source-registration JSON</dfn> given a [=byte sequence=]
27592742 :: |reportingOrigin|
27602743 : [=attribution source/expiry=]
27612744 :: |expiry|
2762- : [=attribution source/trigger specs=]
2763- :: |triggerSpecs|
2745+ : [=attribution source/event-level report windows=]
2746+ :: |eventReportWindows|
2747+ : [=attribution source/trigger data=]
2748+ :: |triggerDataSet|
27642749 : [=attribution source/aggregatable report window=]
27652750 :: |aggregatableReportWindow|
27662751 : [=attribution source/priority=]
@@ -2983,13 +2968,11 @@ To <dfn>check if an [=attribution source=] should be blocked by reporting-origin
29832968To <dfn>obtain a fake report</dfn> given an [=attribution source=] |source| and
29842969a [=trigger state=] |triggerState|:
29852970
2986- 1. Let |specEntry| be the [=map/entry=] for
2987- |source|'s [=attribution source/trigger specs=][|triggerState|' s [=trigger state/trigger data=] ].
298829711. Let |triggerTime| be |triggerState|'s [=trigger state/report window=]' s [=report window/start=] .
298929721. Let |priority| be 0.
299029731. Let |fakeReport| be the result of running [=obtain an event-level report=] with |source|,
29912974 |triggerTime|, [=obtain an event-level report/triggerDebugKey=] set to null,
2992- |priority|, and |specEntry| .
2975+ |priority|, and |triggerState|'s [=trigger state/trigger data=] .
299329761. [=Assert=] : |fakeReport|'s [=event-level report/report time=] is equal to
29942977 |triggerState|'s [=trigger state/report window=]' s [=report window/end=] .
299529781. Return |fakeReport|.
@@ -3189,8 +3172,10 @@ To <dfn>process an attribution source</dfn> given an [=attribution source=] |sou
31893172
31903173 : [=randomized response output configuration/max attributions per source=]
31913174 :: |source|'s [=attribution source/max number of event-level reports=]
3192- : [=randomized response output configuration/trigger specs=]
3193- :: |source|'s [=trigger specs=]
3175+ : [=randomized response output configuration/trigger data=]
3176+ :: |source|'s [=attribution source/trigger data=]
3177+ : [=randomized response output configuration/event-level report windows=]
3178+ :: |source|'s [=attribution source/event-level report windows=]
31943179
319531801. Let |epsilon| be |source|'s [=attribution source/event-level epsilon=] .
319631811. Let |possibleTriggerStates| be the result of [=obtaining a set of possible trigger states=] with |randomizedResponseConfig|.
@@ -4010,15 +3995,15 @@ To <dfn>trigger event-level attribution</dfn> given an [=attribution trigger=] |
40103995 |sourceToAttribute|'s [=attribution source/dedup keys=] [=list/contains=] it:
40113996 1. Return the [=triggering result=] ("<code> [=triggering status/dropped=] </code> ",
40123997 ("<code> [=trigger debug data type/trigger-event-deduplicated=] </code> ", null)).
4013- 1. Let |specEntry | be the result of [=finding a matching trigger spec =] with
3998+ 1. Let |triggerData | be the result of [=finding matching trigger data =] with
40143999 |sourceToAttribute| and |matchedConfig|'s
40154000 [=event-level trigger configuration/trigger data=] .
4016- 1. If |specEntry | is an error:
4001+ 1. If |triggerData | is an error:
40174002 1. Return the [=triggering result=] ("<code> [=triggering status/dropped=] </code> ",
40184003 ("<code> [=trigger debug data type/trigger-event-no-matching-trigger-data=] </code> ", null)).
401940041. Let |windowResult| be the result of [=check whether a moment falls within a window=]
40204005 with |trigger|'s [=attribution trigger/trigger time=] and
4021- |specEntry |'s [=map/value=]' s [=trigger spec /event-level report windows=] 's
4006+ |sourceToAttribute |'s [=attribution source /event-level report windows=]' s
40224007 [=report window list/total window=] .
402340081. If |windowResult| is <strong> falls before</strong> :
40244009 1. Return the [=triggering result=] ("<code> [=triggering status/dropped=] </code> ",
@@ -4029,7 +4014,7 @@ To <dfn>trigger event-level attribution</dfn> given an [=attribution trigger=] |
402940141. [=Assert=] : |windowResult| is <strong> falls within</strong> .
403040151. Let |report| be the result of running [=obtain an event-level report=] with |sourceToAttribute|,
40314016 |trigger|'s [=attribution trigger/trigger time=], |trigger|' s [=attribution trigger/debug key=] ,
4032- |matchedConfig|'s [=event-level trigger configuration/priority=] , and |specEntry |.
4017+ |matchedConfig|'s [=event-level trigger configuration/priority=] , and |triggerData |.
403340181. If |sourceToAttribute|'s [=attribution source/event-level attributable=] value
40344019 is false:
40354020 1. Return the [=triggering result=] ("<code> [=triggering status/dropped=] </code> ",
@@ -4357,19 +4342,18 @@ To <dfn>obtain an aggregatable attribution report delivery time</dfn> given an [
43574342To <dfn>obtain an event-level report</dfn> given an [=attribution source=] |source|,
43584343a [=moment=] |triggerTime|, a possibly null non-negative 64-bit integer
43594344<dfn for="obtain an event-level report"><var>triggerDebugKey</var></dfn> ,
4360- a 64-bit integer priority |priority|, and a [=trigger spec map=] [=map/entry=]
4361- |specEntry|:
4345+ a 64-bit integer priority |priority|, and a non-negative 64-bit integer |triggerData|:
43624346
436343471. Let |reportTime| be the result of running
4364- [=obtain an event-level report delivery time=] with |specEntry |'s
4365- [=map/value=] 's [=trigger spec /event-level report windows=] and
4348+ [=obtain an event-level report delivery time=] with |source |'s
4349+ [=attribution source /event-level report windows=] and
43664350 |triggerTime|.
436743511. Let |report| be a new [=event-level report=] struct whose items are:
43684352
43694353 : [=event-level report/event ID=]
43704354 :: |source|'s [=attribution source/event ID=] .
43714355 : [=event-level report/trigger data=]
4372- :: |specEntry|'s [=map/key=]
4356+ :: |triggerData|
43734357 : [=event-level report/randomized trigger rate=]
43744358 :: |source|'s [=attribution source/randomized trigger rate=] .
43754359 : [=event-level report/reporting origin=]
0 commit comments