getfluxly 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b116ab1581f3a4774402e520e226448ebb08e91f41472871b550fa2f5b90138
4
- data.tar.gz: 2e727e895ae664cb6bbb6f8520b550466e39c4ef68e3940b29f07f93f50f3607
3
+ metadata.gz: 7b553cd969af21278e3071f204d9d411f3834b4adfa8bf550c0b89c19808080f
4
+ data.tar.gz: ad1dd0761594bbdb6e51bdfa96ce953f5c024835eb1a6fd4a3dc9c881155a51c
5
5
  SHA512:
6
- metadata.gz: a604060bfeccf108f38d1df090afcab54eaefe7bebb85320005978c7d250654df08faf26341b63e1dfe3a27306dac0207427e2bbf0d9f90871cf03ec4e0d8422
7
- data.tar.gz: c3ae7ff9b11b088c972800e8bf4167d9ca4a6a58d8eb6cadb19ec836cf3616981575fa4aa3251a633130c5c58fb1fe5ac4883115c44ebc53223319a533a55545
6
+ metadata.gz: 28d163f2f11fb101529abc046586c4e095a64a5a16bd42b9b605f1f0862f7d5ef63eb2d90e04a585619080618bd38eade3d86a0fa989a4140316c95ffe1b75a8
7
+ data.tar.gz: 4434c2e2c16c502e1e2ae00c88d86b6c65fd6526c651e7c7f064fddd3db8886f33eb1a35767e84f051cb012e81aa79093dcef5ccaff1a71de8a76014ac2b935b
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to `getfluxly` (Ruby) will be documented in this file.
4
4
 
5
+ ## [0.1.1] - 2026-06-23
6
+
7
+ ### Added
8
+ - Each event payload now carries a stable `message_id` (UUID v4, snake_case key)
9
+ generated at build time in `track` and `identify`. The backend derives the
10
+ stored row id from `(project_id + message_id)` to deduplicate duplicate
11
+ deliveries. The per-batch `X-Idempotency-Key` header is unchanged.
12
+
5
13
  ## [0.1.0] - 2026-05-16
6
14
 
7
15
  ### Added
data/README.md CHANGED
@@ -69,6 +69,10 @@ Defaults match Node and Python.
69
69
 
70
70
  Retries: 408, 425, 429, and 5xx with exponential backoff and +/- 25% jitter. `Retry-After` is honored. Each batch carries a unique `X-Idempotency-Key`.
71
71
 
72
+ ## Event deduplication
73
+
74
+ Every event built by `track` and `identify` includes a `message_id` field (UUID v4) generated once when the payload is created. The backend derives the stored row id from `(project_id + message_id)` so retried batches are idempotent — duplicate deliveries of the same event are dropped automatically.
75
+
72
76
  ## Errors
73
77
 
74
78
  ```ruby
@@ -50,7 +50,7 @@ module GetFluxly
50
50
  user_id: user_id
51
51
  )
52
52
 
53
- payload = { "event" => event }
53
+ payload = { "event" => event, "message_id" => Http.generate_message_id }
54
54
  payload["anonymous_id"] = anonymous_id if anonymous_id
55
55
  payload["external_id"] = external_id if external_id
56
56
  payload["user_id"] = user_id if user_id
@@ -68,7 +68,13 @@ module GetFluxly
68
68
  user_id: user_id
69
69
  )
70
70
 
71
- payload = { "event" => "$identify" }
71
+ # FIXME: identify is not wired end to end. The backend treats only
72
+ # event == "identify" as an identify, but this sends "$identify", so
73
+ # identity stitching never runs. A plain rename will not fix it: the
74
+ # backend identify path requires BOTH anonymous_id and external_id,
75
+ # which a server identify usually lacks. Needs a server side identify
76
+ # contract first; until then use track() (see the SDK docs callout).
77
+ payload = { "event" => "$identify", "message_id" => Http.generate_message_id }
72
78
  payload["anonymous_id"] = anonymous_id if anonymous_id
73
79
  payload["external_id"] = external_id if external_id
74
80
  payload["user_id"] = user_id if user_id
@@ -54,6 +54,10 @@ module GetFluxly
54
54
  SecureRandom.uuid
55
55
  end
56
56
 
57
+ def self.generate_message_id
58
+ SecureRandom.uuid
59
+ end
60
+
57
61
  private
58
62
 
59
63
  def perform(uri, payload, headers)
@@ -4,5 +4,5 @@
4
4
  # run `ruby scripts/sync_version.rb` to regenerate.
5
5
 
6
6
  module GetFluxly
7
- VERSION = "0.1.0"
7
+ VERSION = "0.1.1"
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: getfluxly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GetFluxly