chat_notifier 0.4.0 → 0.4.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 +4 -4
- data/CHANGELOG.md +6 -6
- data/README.md +9 -3
- data/lib/chat_notifier/messenger.rb +17 -3
- data/lib/chat_notifier/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7edc6944f3cf725395443ed30f7aaa41dc8d357d0420c1bf3b6b020e397a01ba
|
|
4
|
+
data.tar.gz: ce30c767667ce563d983df0db9d688f4a22c72e80a8cd45115a2a2b4cb23caf5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: da79615e96a6d4d7e17c20c4bd58bfb3bf817d0bc8f84bcbb40800bbe16f353d93981c575ebed64cee755c149969714c2d39dcc2c09260e370f596e1e2affc65
|
|
7
|
+
data.tar.gz: 72a2318579a9a3ec0aacd0c352df714dcd8431f39d89d25e299218bc7daee9418077d263155a03d3ebab3fc562ab48dc0c8405b22fbccf314790aa89e0ea5d29
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.4.1] - 2026-07-27
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Status reports sharing a job name fold per run, so any worker's failure fails the job (2e9a81d)
|
|
13
|
+
|
|
8
14
|
## [0.4.0] - 2026-07-24
|
|
9
15
|
|
|
10
16
|
### Added
|
|
@@ -22,9 +28,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
22
28
|
- Malformed NOTIFY_SLACK_THREAD_GROUP_SIZE falls back to the default (b2d5a6d)
|
|
23
29
|
- Replies are skipped when the parent response has no ts, instead of posting unthreaded (b2d5a6d)
|
|
24
30
|
- Notifications no longer fail silently: branch and sha now resolve from CI env or git instead of raising on the app name (8cb8603)
|
|
25
|
-
|
|
26
|
-
## [0.3.0] - 2026-07-24
|
|
27
|
-
|
|
28
|
-
### Added
|
|
29
|
-
|
|
30
|
-
- Threaded Slack failure notifications via a Slack bot token (NOTIFY_SLACK_BOT_TOKEN), grouping failing files into batched thread replies (e453cd0)
|
data/README.md
CHANGED
|
@@ -96,9 +96,15 @@ back to its own thread.
|
|
|
96
96
|
Caveats: verbose mode (`NOTIFIER_VERBOSE`) posts plain messages and bypasses
|
|
97
97
|
episode resolution, and a thread store passed programmatically
|
|
98
98
|
(`ChatNotifier.call(thread_store: ...)`) takes precedence over
|
|
99
|
-
`NOTIFY_THREAD_STORE=none`.
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
`NOTIFY_THREAD_STORE=none`.
|
|
100
|
+
|
|
101
|
+
Reporting more than once under one job identity is safe. Parallel runners
|
|
102
|
+
(`parallel_tests`, Knapsack) spawn a process per worker, each with its own
|
|
103
|
+
formatter, and a single job running both RSpec and Minitest posts twice.
|
|
104
|
+
Reports sharing a job name are folded per run — failure counts sum and any
|
|
105
|
+
failure fails the job — so the digest keeps one line per job and a worker that
|
|
106
|
+
passed cannot resolve the episode its sibling opened. Set `NOTIFY_JOB_NAME` if
|
|
107
|
+
you would rather they appear as separate lines.
|
|
102
108
|
|
|
103
109
|
### Debug your Slack setup
|
|
104
110
|
|
|
@@ -144,9 +144,23 @@ module ChatNotifier
|
|
|
144
144
|
latest_id = grouped.keys.max_by { |id| [id.length, id] }
|
|
145
145
|
# [length, value] orders numeric strings correctly ("9" < "10") and
|
|
146
146
|
# sorts nil run_ids ("") as the oldest run.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
grouped.fetch(latest_id, []).group_by { |report| report["job"] }.map do |job, group|
|
|
148
|
+
fold(job, group)
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# A job identity can report more than once per run: parallel test runners
|
|
153
|
+
# (parallel_tests, Knapsack) spawn a process per worker, each with its own
|
|
154
|
+
# formatter, all sharing one job name. Any worker failing fails the job, so
|
|
155
|
+
# fold the group rather than keeping whichever arrived first — otherwise a
|
|
156
|
+
# worker that passed silently resolves the episode its sibling just opened.
|
|
157
|
+
# Commutative, so every writer converges on the same digest.
|
|
158
|
+
def fold(job, group)
|
|
159
|
+
{
|
|
160
|
+
"job" => job,
|
|
161
|
+
"status" => (group.any? { |report| report["status"] != "passed" }) ? "failed" : "passed",
|
|
162
|
+
"failures" => group.sum { |report| report["failures"].to_i }
|
|
163
|
+
}
|
|
150
164
|
end
|
|
151
165
|
end
|
|
152
166
|
end
|