From eec6699823f3e37919804f24d7a551167ddfe0fd Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Wed, 22 Sep 2021 11:26:05 -0400 Subject: [PATCH 1/7] Spec report ID for deduplication in the event of retries on network errors Fixes #228 --- index.bs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.bs b/index.bs index 75fdfc6ae..aeebfa7f9 100644 --- a/index.bs +++ b/index.bs @@ -377,6 +377,8 @@ An attribution report is a [=struct=] with the following items: :: A string. : delivered (default false) :: A boolean. +: report id +:: A string. @@ -844,6 +846,8 @@ To obtain a report given an [=attribution source=] |source| and an [= :: |trigger|'s [=attribution trigger/trigger time=]. : [=attribution report/source identifier=] :: |source|'s [=attribution source/source identifier=]. + : [=attribution report/report id=] + :: A random string. 1. Return |report|. # Report delivery # {#report-delivery} @@ -887,6 +891,8 @@ To serialize an [=attribution report=] |report|, run the following st :: |report|'s [=attribution report/event id=], [=serialize an integer|serialized=] : "`trigger_data`" :: |report|'s [=attribution report/trigger data=], [=serialize an integer|serialized=] + : "`report_id`" + :: |report|'s [=attribution report/report id=] 1. Return the [=byte sequence=] resulting from executing [=serialize an infra value to JSON bytes=] on |data|. From f32074b5abd1387a141d345fb08d54c094b0c038 Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Thu, 11 Nov 2021 12:05:49 -0500 Subject: [PATCH 2/7] Add note on purpose of report_id field --- index.bs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.bs b/index.bs index aeebfa7f9..1f1cab67c 100644 --- a/index.bs +++ b/index.bs @@ -896,6 +896,11 @@ To serialize an [=attribution report=] |report|, run the following st 1. Return the [=byte sequence=] resulting from executing [=serialize an infra value to JSON bytes=] on |data|. +Note: The inclusion of "`report_id`" in the report body is intended to allow the report recipient +to perform deduplication and prevent double counting, in the event that the user agent retries +reports on failure. To prevent the report recipient from learning additional information about +whether a user is online, retries should be limited in number and subject to random delays. +

Get report request URL

To generate a report URL for a given [=attribution report=] |report|, run the following steps: From c84e94ab26419d3a23d62bfeab4ceba97b5f6878 Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Thu, 11 Nov 2021 13:01:36 -0500 Subject: [PATCH 3/7] Specify report ID as UUID --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 1f1cab67c..c9baec6a1 100644 --- a/index.bs +++ b/index.bs @@ -847,7 +847,7 @@ To obtain a report given an [=attribution source=] |source| and an [= : [=attribution report/source identifier=] :: |source|'s [=attribution source/source identifier=]. : [=attribution report/report id=] - :: A random string. + :: The result of [=generating a random UUID=]. 1. Return |report|. # Report delivery # {#report-delivery} From cc94f26dc01e871ce266f5bf61bd0b45fc9f7f24 Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Thu, 11 Nov 2021 13:04:46 -0500 Subject: [PATCH 4/7] fix uuid reference --- index.bs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.bs b/index.bs index c9baec6a1..45e81822a 100644 --- a/index.bs +++ b/index.bs @@ -17,6 +17,8 @@ Assume Explicit For: on Introduction {#intro} From 6ab074662185d1e8b072136d3c3b262039a7ec41 Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Thu, 11 Nov 2021 13:48:56 -0500 Subject: [PATCH 5/7] fix reference harder --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 45e81822a..050fbf6a9 100644 --- a/index.bs +++ b/index.bs @@ -18,7 +18,7 @@ Assume Explicit For: on Introduction {#intro} From 0ac9dbcb52c91d32422e570aafca360188c76687 Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Thu, 11 Nov 2021 13:52:05 -0500 Subject: [PATCH 6/7] try again --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 050fbf6a9..319674ea8 100644 --- a/index.bs +++ b/index.bs @@ -18,7 +18,7 @@ Assume Explicit For: on Introduction {#intro} From d00ade66a0e375a178144e1444d433ceef5e5aca Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Thu, 11 Nov 2021 13:53:58 -0500 Subject: [PATCH 7/7] pre anchors --- index.bs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.bs b/index.bs index 319674ea8..b55cc1c4e 100644 --- a/index.bs +++ b/index.bs @@ -17,6 +17,8 @@ Assume Explicit For: on +
 spec: uuid; type: dfn; urlPrefix: https://wicg.github.io/uuid/
     text: generate a random UUID; url: #dfn-generate-a-random-uuid