From 03cdad21eadeac34c5e90a8a56409bb6583436f3 Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Mon, 2 Oct 2023 11:50:24 -0400 Subject: [PATCH 1/5] Specify trigger-data matching Note that no verbose debug report is sent when exact matching fails, but this could be added later. --- index.bs | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/index.bs b/index.bs index e505f72ec..94ae4449d 100644 --- a/index.bs +++ b/index.bs @@ -744,6 +744,21 @@ It has the following constraints: * Every element's [=report window/start=] is equal to the previous element's [=report window/end=], if it exists. * There is at least one element in the list. +

Trigger-data matching mode

+ +A trigger-data matching mode is one of the following: + +
+: "exact" +:: [=event-level trigger configuration/Trigger data=] must be >= 0 and the + [=default trigger data cardinality=]. Otherwise, no event-level attribution + takes place. +: "modulus" +:: [=event-level trigger configuration/Trigger data=] is taken modulo the + [=default trigger data cardinality=]. + +
+

Attribution source

An attribution source is a [=struct=] with the following items: @@ -798,6 +813,8 @@ An attribution source is a [=struct=] with the following items: :: A [=boolean=]. : number of aggregatable reports :: Number of [=aggregatable reports=] created for this [=attribution source=]. +: trigger-data matching mode +:: A [=trigger-data matching mode=]. @@ -1965,7 +1982,11 @@ To parse source-registration JSON given a [=byte sequence=] 1. Let |epsilon| be the user agent's [=randomized response epsilon=]. 1. If the result of [=computing the channel capacity of a source=] with |randomizedResponseConfig| and |epsilon| is greater than [=max event-level channel capacity per source=][|sourceType|], return null. - +1. Let |triggerDataMatchingMode| be [=trigger-data matching mode/modulus=]. +1. If |value|["`trigger_data_matching`"] [=map/exists=]: + 1. If |value|["`trigger_data_matching`"] is not a [=string=], return null. + 1. If |value|["`trigger_data_matching`"] is not a [=trigger-data matching mode=], return null. + 1. Set |triggerDataMatchingMode| to |value|["`trigger_data_matching`"]. 1. Let |source| be a new [=attribution source=] struct whose items are: : [=attribution source/source identifier=] @@ -2006,6 +2027,8 @@ To parse source-registration JSON given a [=byte sequence=] :: 0 : [=attribution source/debug reporting enabled=] :: |debugReportingEnabled| + : [=attribution source/trigger-data matching mode=] + :: |triggerDataMatchingMode| 1. Return |source|. Issue: Determine proper charset-handling for the JSON header value. @@ -2102,6 +2125,7 @@ a [=trigger state=] |triggerState|: :: "[=aggregatable source registration time configuration/exclude=]" 1. Let |fakeReport| be the result of running [=obtain an event-level report=] with |source|, |fakeTrigger|, and |fakeConfig|. +1. [=Assert=]: |fakeReport| is not null. 1. Set |fakeReport|'s [=event-level report/report time=] to the result of running [=obtain the report time at a window=] with |source| and |triggerState|'s [=trigger state/report window=]. @@ -2760,6 +2784,8 @@ To trigger event-level attribution given an [=attribution trigger=] | return it. 1. Let |report| be the result of running [=obtain an event-level report=] with |sourceToAttribute|, |trigger|, and |matchedConfig|. +1. If |report| is null, return the [=triggering result=] + ("[=triggering status/dropped=]", null). 1. If |sourceToAttribute|'s [=attribution source/event-level attributable=] value is false: 1. Let |debugData| be the result of running [=obtain debug data on trigger registration=] @@ -3020,15 +3046,23 @@ To obtain an aggregatable report delivery time given a [=moment=] To obtain an event-level report given an [=attribution source=] |source|, an [=attribution trigger=] |trigger|, and an [=event-level trigger configuration=] |config|: +1. Let |triggerData| be |config|'s [=event-level trigger configuration/trigger data=]. 1. Let |triggerDataCardinality| be the user agent's [=default trigger data cardinality=][|source|'s [=attribution source/source type=]]. +1. If |source|'s [=attribution source/trigger-data matching mode=] is: +
+ : "[=trigger-data matching mode/exact=]": + :: If |triggerData| is greater than or equal to |triggerDataCardinality|, return null. + : "[=trigger-data matching mode/modulus=]": + :: Set |triggerData| to the remainder when dividing |triggerData| by |triggerDataCardinality|. + +
1. Let |reportTime| be the result of running [=obtain an event-level report delivery time=] with |source| and |trigger|'s [=attribution trigger/trigger time=]. 1. Let |report| be a new [=event-level report=] struct whose items are: : [=event-level report/event ID=] :: |source|'s [=attribution source/event ID=]. : [=event-level report/trigger data=] - :: The remainder when dividing |config|'s [=event-level trigger configuration/trigger data=] by - |triggerDataCardinality|. + :: |triggerData| : [=event-level report/randomized trigger rate=] :: |source|'s [=attribution source/randomized trigger rate=]. : [=event-level report/reporting origin=] From e7ff4c4000d1c9fe10c28d1357f3ea78f752c050 Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Mon, 9 Oct 2023 13:11:47 -0400 Subject: [PATCH 2/5] typo --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 94ae4449d..6a403775c 100644 --- a/index.bs +++ b/index.bs @@ -750,7 +750,7 @@ A trigger-data matching mode is one of the following:
: "exact" -:: [=event-level trigger configuration/Trigger data=] must be >= 0 and the +:: [=event-level trigger configuration/Trigger data=] must be >= 0 and < the [=default trigger data cardinality=]. Otherwise, no event-level attribution takes place. : "modulus" From 41c21a7ea58951bb8ee8db08f35b596617fd70c9 Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Mon, 9 Oct 2023 13:14:53 -0400 Subject: [PATCH 3/5] link --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 6a403775c..7720850fe 100644 --- a/index.bs +++ b/index.bs @@ -1982,7 +1982,7 @@ To parse source-registration JSON given a [=byte sequence=] 1. Let |epsilon| be the user agent's [=randomized response epsilon=]. 1. If the result of [=computing the channel capacity of a source=] with |randomizedResponseConfig| and |epsilon| is greater than [=max event-level channel capacity per source=][|sourceType|], return null. -1. Let |triggerDataMatchingMode| be [=trigger-data matching mode/modulus=]. +1. Let |triggerDataMatchingMode| be "[=trigger-data matching mode/modulus=]". 1. If |value|["`trigger_data_matching`"] [=map/exists=]: 1. If |value|["`trigger_data_matching`"] is not a [=string=], return null. 1. If |value|["`trigger_data_matching`"] is not a [=trigger-data matching mode=], return null. From c216cab1b9ba20648e095bb365ad14475fd83325 Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Mon, 9 Oct 2023 13:17:49 -0400 Subject: [PATCH 4/5] nit --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 7720850fe..f8b2eb37e 100644 --- a/index.bs +++ b/index.bs @@ -750,7 +750,7 @@ A trigger-data matching mode is one of the following:
: "exact" -:: [=event-level trigger configuration/Trigger data=] must be >= 0 and < the +:: [=event-level trigger configuration/Trigger data=] must be less than the [=default trigger data cardinality=]. Otherwise, no event-level attribution takes place. : "modulus" From deb2bf029d06bb4c6b61e1c07eb5282dd86c41de Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Tue, 10 Oct 2023 10:17:05 -0400 Subject: [PATCH 5/5] verbose debug report --- index.bs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index f8b2eb37e..18bb196b9 100644 --- a/index.bs +++ b/index.bs @@ -1076,6 +1076,7 @@ Possible values are:
  • "trigger-event-excessive-reports"
  • "trigger-event-low-priority"
  • "trigger-event-no-matching-configurations" +
  • "trigger-event-no-matching-trigger-data"
  • "trigger-event-noise"
  • "trigger-event-report-window-not-started"
  • "trigger-event-report-window-passed" @@ -2784,8 +2785,11 @@ To trigger event-level attribution given an [=attribution trigger=] | return it. 1. Let |report| be the result of running [=obtain an event-level report=] with |sourceToAttribute|, |trigger|, and |matchedConfig|. -1. If |report| is null, return the [=triggering result=] - ("[=triggering status/dropped=]", null). +1. If |report| is null: + 1. Let |debugData| be the result of running [=obtain debug data on trigger registration=] + with "[=trigger debug data type/trigger-event-no-matching-trigger-data=]", |trigger|, |sourceToAttribute| and + [=obtain debug data on trigger registration/report=] set to null. + 1. Return the [=triggering result=] ("[=triggering status/dropped=]", |debugData|). 1. If |sourceToAttribute|'s [=attribution source/event-level attributable=] value is false: 1. Let |debugData| be the result of running [=obtain debug data on trigger registration=]