Skip to content

Commit 41dc262

Browse files
committed
Remove incomplete Full Flexible Event algorithms from specification
1 parent 67fba3a commit 41dc262

File tree

1 file changed

+12
-137
lines changed

1 file changed

+12
-137
lines changed

index.bs

Lines changed: 12 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -691,38 +691,6 @@ a [=report window=] [=struct=] with the following fields:
691691
[=report windows=], because there are no gaps in time between any of the
692692
[=report windows|windows=].
693693

694-
<h3 id="summary-operator-header">Summary operator</h3>
695-
696-
A <dfn>summary operator</dfn> summarizes the triggers attributed to an
697-
[=attribution source=]. Its value is one of the following:
698-
699-
<dl dfn-for="summary operator">
700-
: "<dfn><code>count</code></dfn>"
701-
:: Number of triggers attributed.
702-
: "<dfn><code>value_sum</code></dfn>"
703-
:: Sum of the value of triggers.
704-
705-
</dl>
706-
707-
<h3 id="summary-bucket-header">Summary bucket</h3>
708-
709-
A <dfn>summary bucket</dfn> is a [=struct=] with the following items:
710-
711-
<dl dfn-for="summary bucket">
712-
: <dfn>start</dfn>
713-
:: An unsigned 32-bit integer.
714-
: <dfn>end</dfn>
715-
:: An unsigned 32-bit integer.
716-
717-
</dl>
718-
719-
A <dfn>summary bucket list</dfn> is a [=list=] of [=summary buckets=].
720-
It has the following constraints:
721-
722-
* Elements are strictly in ascending order based on their [=summary bucket/start=].
723-
* Every element's [=summary bucket/end=] is equal to the next element's [=summary bucket/start=] - 1, if it exists.
724-
* There is at least one element in the list.
725-
726694
<h3 id="trigger-data-matching-mode-header">Trigger-data matching mode</h3>
727695

728696
A <dfn>trigger-data matching mode</dfn> is one of the following:
@@ -969,8 +937,6 @@ An event-level trigger configuration is a [=struct=] with the following items:
969937
:: A [=list=] of [=filter configs=].
970938
: <dfn>negated filters</dfn>
971939
:: A [=list=] of [=filter configs=].
972-
: <dfn>value</dfn>
973-
:: A positive unsigned 32-bit integer.
974940

975941
</dl>
976942

@@ -2437,11 +2403,8 @@ A <dfn>source-registration JSON key</dfn> is one of the following:
24372403
<li>"<dfn><code>priority</code></dfn>"
24382404
<li>"<dfn><code>source_event_id</code></dfn>"
24392405
<li>"<dfn><code>start_time</code></dfn>"
2440-
<li>"<dfn><code>summary_buckets</code></dfn>"
2441-
<li>"<dfn><code>summary_operator</code></dfn>"
24422406
<li>"<dfn><code>trigger_data</code></dfn>"
24432407
<li>"<dfn><code>trigger_data_matching</code></dfn>"
2444-
<li>"<dfn><code>trigger_specs</code></dfn>"
24452408
<li>"<dfn><code>values</code></dfn>"
24462409
</ul>
24472410

@@ -2594,48 +2557,6 @@ To <dfn>parse report windows</dfn> given a |value|, a
25942557
1. Set |startDuration| to |endDuration|.
25952558
1. Return |windows|.
25962559

2597-
The user-agent has an associated boolean
2598-
<dfn>experimental Flexible Event support</dfn> (default false) that exposes
2599-
non-normative behavior described in the
2600-
<a href="https://github.com/WICG/attribution-reporting-api/blob/main/flexible_event_config.md">Flexible event-level configurations</a>
2601-
proposal.
2602-
2603-
To <dfn>parse summary operator</dfn> given a [=map=] |map|:
2604-
2605-
1. Let |value| be "<code>[=summary operator/count=]</code>".
2606-
1. If |map|["<code>[=source-registration JSON key/summary_operator=]</code>"] [=map/exists=]:
2607-
1. If |map|["<code>[=source-registration JSON key/summary_operator=]</code>"] is not a [=string=], return an
2608-
error.
2609-
1. If |map|["<code>[=source-registration JSON key/summary_operator=]</code>"] is not a
2610-
[=summary operator=], return an error.
2611-
1. Set |value| to |map|["<code>[=source-registration JSON key/summary_operator=]</code>"].
2612-
1. Return |value|.
2613-
2614-
To <dfn>parse summary buckets</dfn> given a [=map=] |map| and an integer |maxEventLevelReports|:
2615-
2616-
1. Let |values| be [=the inclusive range|the range=] 1 to
2617-
|maxEventLevelReports|, inclusive.
2618-
1. If |map|["<code>[=source-registration JSON key/summary_buckets=]</code>"] [=map/exists=]:
2619-
1. If |map|["<code>[=source-registration JSON key/summary_buckets=]</code>"] is not a [=list=], [=list/is empty=], or
2620-
its [=list/size=] is greater than |maxEventLevelReports|, return an
2621-
error.
2622-
1. Set |values| to |map|["<code>[=source-registration JSON key/summary_buckets=]</code>"].
2623-
1. Let |prev| be 0.
2624-
1. Let |summaryBuckets| be a new [=list=].
2625-
1. [=list/iterate|For each=] |item| of |values|:
2626-
1. If |item| is not an integer or cannot be represented by an unsigned
2627-
32-bit integer, or is less than or equal to |prev|, return an error.
2628-
1. Let |summaryBucket| be a new [=summary bucket=] whose items are
2629-
2630-
: [=summary bucket/start=]
2631-
:: |prev|
2632-
: [=summary bucket/end=]
2633-
:: |item| - 1
2634-
2635-
1. [=list/Append=] |summaryBucket| to |summaryBuckets|.
2636-
1. Set |prev| to |item|.
2637-
1. Return |summaryBuckets|.
2638-
26392560
To <dfn>parse trigger data into a trigger spec map</dfn> given a
26402561
|triggerDataList|, a [=trigger spec=] |spec|, a [=trigger spec map=]
26412562
|specs|, and a [=boolean=] |allowEmpty|:
@@ -2662,55 +2583,27 @@ To <dfn>parse trigger specs</dfn> given a [=map=] |map|, a [=moment=]
26622583
and |expiry|.
26632584
1. If |defaultReportWindows| is an error, return an error.
26642585
1. Let |specs| be a new [=trigger spec map=].
2665-
1. If [=experimental Flexible Event support=] is true and
2666-
|map|["<code>[=source-registration JSON key/trigger_specs=]</code>"] [=map/exists=]:
2667-
1. If |map|["<code>[=source-registration JSON key/trigger_data=]</code>"] [=map/exists=], return an error.
2668-
1. If |map|["<code>[=source-registration JSON key/trigger_specs=]</code>"] is not a [=list=] or its
2669-
[=list/size=] is greater than [=max distinct trigger data per source=],
2586+
1. Let |spec| be a new [=trigger spec=] with the following items:
2587+
: [=trigger spec/event-level report windows=]
2588+
:: |defaultReportWindows|
2589+
1. If |map|["<code>[=source-registration JSON key/trigger_data=]</code>"] [=map/exists=]:
2590+
1. Let |allowEmpty| be true.
2591+
1. If the result of running
2592+
[=parse trigger data into a trigger spec map=] with
2593+
|map|["<code>[=source-registration JSON key/trigger_data=]</code>"], |spec|, |specs|, and |allowEmpty| is false,
26702594
return an error.
2671-
1. [=list/iterate|For each=] |item| of |map|["<code>[=source-registration JSON key/trigger_specs=]</code>"]:
2672-
1. If |item| is not a [=map=], return an error.
2673-
1. Let |spec| be a new [=trigger spec=] with the following items:
2674-
: [=trigger spec/event-level report windows=]
2675-
:: |defaultReportWindows|
2676-
1. If |item|["<code>[=source-registration JSON key/event_report_windows=]</code>"] [=map/exists=]:
2677-
1. Let |reportWindows| be the result of
2678-
[=parsing report windows=] with |item|["<code>[=source-registration JSON key/event_report_windows=]</code>"],
2679-
|sourceTime|, and |expiry|.
2680-
1. If |reportWindows| is an error, return it.
2681-
1. Set |spec|'s [=trigger spec/event-level report windows=] to
2682-
|reportWindows|.
2683-
1. If |item|["<code>[=source-registration JSON key/trigger_data=]</code>"] does not [=map/exist=], return an error.
2684-
1. Let |allowEmpty| be false.
2685-
1. If the result of running
2686-
[=parse trigger data into a trigger spec map=] with
2687-
|item|["<code>[=source-registration JSON key/trigger_data=]</code>"], |spec|, |specs|, and |allowEmpty| is
2688-
false, return an error.
26892595
1. Otherwise:
2690-
1. Let |spec| be a new [=trigger spec=] with the following items:
2691-
: [=trigger spec/event-level report windows=]
2692-
:: |defaultReportWindows|
2693-
1. If |map|["<code>[=source-registration JSON key/trigger_data=]</code>"] [=map/exists=]:
2694-
1. Let |allowEmpty| be true.
2695-
1. If the result of running
2696-
[=parse trigger data into a trigger spec map=] with
2697-
|map|["<code>[=source-registration JSON key/trigger_data=]</code>"], |spec|, |specs|, and |allowEmpty| is false,
2698-
return an error.
2699-
1. Otherwise:
2700-
1. [=set/iterate|For each=] integer |triggerData| of
2701-
[=the exclusive range|the range=] 0 to
2702-
[=default trigger data cardinality=][|sourceType|], exclusive:
2703-
1. [=map/Set=] |specs|[|triggerData|] to |spec|.
2596+
1. [=set/iterate|For each=] integer |triggerData| of
2597+
[=the exclusive range|the range=] 0 to
2598+
[=default trigger data cardinality=][|sourceType|], exclusive:
2599+
1. [=map/Set=] |specs|[|triggerData|] to |spec|.
27042600
1. If |matchingMode| is "<code>[=trigger-data matching mode/modulus=]</code>":
27052601
1. Let |i| be 0.
27062602
1. [=map/iterate|For each=] |triggerData| of |specs|'s [=map/get the keys|keys=]:
27072603
1. If |triggerData| does not equal |i|, return an error.
27082604
1. Set |i| to |i| + 1.
27092605
1. Return |specs|.
27102606

2711-
Issue: Invoke [=parse summary buckets=] and [=parse summary operator=]
2712-
from this algorithm.
2713-
27142607
To <dfn>parse a source aggregatable debug reporting config</dfn> given |value|, a
27152608
non-negative integer |defaultBudget|, and an [=aggregatable debug reporting config=]
27162609
|defaultConfig|:
@@ -3471,15 +3364,6 @@ A <dfn>trigger-registration JSON key</dfn> is one of the following:
34713364

34723365
<h3 algorithm id="attribution-trigger-creation">Creating an attribution trigger</h3>
34733366

3474-
To <dfn>parse an event-trigger value</dfn> given a [=map=] |map|:
3475-
3476-
1. If [=experimental Flexible Event support=] is false or |map|["<code>[=trigger-registration JSON key/value=]</code>"] does
3477-
not [=map/exists|exist=], return 1.
3478-
1. Let |value| be |map|["<code>[=trigger-registration JSON key/value=]</code>"].
3479-
1. If |value| is not an integer, cannot be represented by an unsigned 32-bit
3480-
integer, or is less than or equal to zero, return an error.
3481-
1. Return |value|.
3482-
34833367
To <dfn>parse event triggers</dfn> given a [=map=] |map|:
34843368

34853369
1. Let |eventTriggers| be a new [=set=].
@@ -3504,9 +3388,6 @@ To <dfn>parse event triggers</dfn> given a [=map=] |map|:
35043388
1. Let |filterPair| be the result of running [=parse a filter pair=] with
35053389
|value|.
35063390
1. If |filterPair| is an error, return it.
3507-
1. Let |triggerValue| be the result of running
3508-
[=parse an event-trigger value=] with |value|.
3509-
1. If |triggerValue| is an error, return it.
35103391
1. Let |eventTrigger| be a new [=event-level trigger configuration=] with
35113392
the items:
35123393
: [=event-level trigger configuration/trigger data=]
@@ -3519,8 +3400,6 @@ To <dfn>parse event triggers</dfn> given a [=map=] |map|:
35193400
:: |filterPair|[0]
35203401
: [=event-level trigger configuration/negated filters=]
35213402
:: |filterPair|[1]
3522-
: [=event-level trigger configuration/value=]
3523-
:: |triggerValue|
35243403
1. [=set/Append=] |eventTrigger| to |eventTriggers|.
35253404
1. Return |eventTriggers|.
35263405

@@ -4107,10 +3986,6 @@ To <dfn>maybe replace event-level report</dfn> given an [=attribution source=]
41073986
1. [=set/Remove=] |rateLimitRecord| from the [=attribution rate-limit cache=].
41083987
1. Return "<code>[=event-level-report-replacement result/add-new-report=]</code>".
41093988

4110-
Issue: This algorithm is not compatible with the behavior proposed for
4111-
[=experimental Flexible Event support=] with differing
4112-
[=trigger spec/event-level report windows=] for a given source.
4113-
41143989
To <dfn>trigger event-level attribution</dfn> given an [=attribution trigger=] |trigger| and an
41153990
[=attribution source=] |sourceToAttribute|, run the following steps:
41163991

0 commit comments

Comments
 (0)