@checkstack/healthcheck-script-backend 0.8.7 → 0.8.9

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,65 @@
1
1
  # @checkstack/healthcheck-script-backend
2
2
 
3
+ ## 0.8.9
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [390d9cf]
8
+ - Updated dependencies [fc64fad]
9
+ - Updated dependencies [9d30324]
10
+ - @checkstack/backend-api@0.30.0
11
+ - @checkstack/healthcheck-common@1.14.0
12
+ - @checkstack/script-packages-backend@0.3.24
13
+
14
+ ## 0.8.8
15
+
16
+ ### Patch Changes
17
+
18
+ - c55d7c6: Unify the healthcheck chart system on the `@checkstack/ui` SVG kit and
19
+ redesign the HealthCheck drawer.
20
+
21
+ - `@checkstack/ui` gains six chart primitives (each with a Storybook story):
22
+ `StackedTimeline` (stacked status counts per bucket on the colorblind-safe
23
+ status triad), `ChartTooltip` + `useBandHover` (the one shared chart
24
+ tooltip and its cursor hit-testing), `ChartCard` / `chartCardChromeClass`
25
+ (the premium gradient card chrome, flat on low-power devices), `StatTile`
26
+ (number-led metric tile with delta chip, sparkline/ribbon footer, and
27
+ click-to-expand disclosure), `DistributionBar` (stacked horizontal
28
+ distribution + legend, replaces pies), and `CategoryRibbon` (categorical
29
+ history ribbon). `TimeSeriesChart` gains a hover tooltip with a crosshair
30
+ marker.
31
+ - `@checkstack/common` adds four optional chart metadata keys to
32
+ `BaseHealthResultMeta`: `x-chart-priority` (tile sort weight, lower first,
33
+ default 100), `x-chart-good-direction` (`"up" | "down"`, which direction
34
+ of change is an improvement; consumers fall back to
35
+ `x-anomaly-direction`), and `x-chart-true-label` / `x-chart-false-label`
36
+ (prose for a boolean field's values wherever they surface in text, e.g. a
37
+ dominance chip reading "Usually successful (98%)" instead of "Usually
38
+ true"). Built-in collector backends annotate their headline metrics and
39
+ boolean fields accordingly (purely additive metadata).
40
+ - `@checkstack/healthcheck-frontend` rebuilds the drawer: a hero status
41
+ banner (status pill, healthy %, avg latency, interval, last run with the
42
+ exact datetime on hover, full-width status ribbon) replaces the metric
43
+ tiles; the status timeline and latency heroes share the `ChartCard`
44
+ chrome; the auto-generated charts become a prioritized, click-to-expand
45
+ 2-up tile grid (collector ids demoted to hover titles); the anomaly
46
+ Expected/Trend derivation is consolidated into one tested module shared by
47
+ the latency hero and the tiles.
48
+
49
+ BREAKING CHANGES: `recharts` is removed from `@checkstack/healthcheck-frontend`
50
+ (and the unused dependency from `@checkstack/ui`); the
51
+ `HealthCheckStatusTimeline` and `SparklineTooltip` components are deleted.
52
+ Extensions rendering into `HealthCheckDiagramSlot` should build on the
53
+ `@checkstack/ui` chart primitives instead.
54
+
55
+ - Updated dependencies [c55d7c6]
56
+ - Updated dependencies [c55d7c6]
57
+ - @checkstack/healthcheck-common@1.13.0
58
+ - @checkstack/common@0.21.0
59
+ - @checkstack/backend-api@0.29.1
60
+ - @checkstack/script-packages-backend@0.3.23
61
+ - @checkstack/secrets-common@0.3.1
62
+
3
63
  ## 0.8.7
4
64
 
5
65
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/healthcheck-script-backend",
3
- "version": "0.8.7",
3
+ "version": "0.8.9",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "checkstack": {
@@ -14,17 +14,17 @@
14
14
  "pack": "bunx @checkstack/scripts plugin-pack"
15
15
  },
16
16
  "dependencies": {
17
- "@checkstack/backend-api": "0.29.0",
18
- "@checkstack/common": "0.20.0",
19
- "@checkstack/healthcheck-common": "1.12.0",
20
- "@checkstack/script-packages-backend": "0.3.22",
21
- "@checkstack/secrets-common": "0.3.0"
17
+ "@checkstack/backend-api": "0.30.0",
18
+ "@checkstack/common": "0.21.0",
19
+ "@checkstack/healthcheck-common": "1.14.0",
20
+ "@checkstack/script-packages-backend": "0.3.24",
21
+ "@checkstack/secrets-common": "0.3.1"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/bun": "^1.0.0",
25
25
  "typescript": "^5.0.0",
26
26
  "@checkstack/tsconfig": "0.0.7",
27
- "@checkstack/scripts": "0.7.1"
27
+ "@checkstack/scripts": "0.7.2"
28
28
  },
29
29
  "description": "Checkstack healthcheck-script-backend plugin",
30
30
  "author": {
@@ -179,6 +179,8 @@ const executeResultSchema = healthResultSchema({
179
179
  // covered by `success`. Charting it stays useful; alerting on it just
180
180
  // double-fires (and flaps for scripts that vary their nonzero codes).
181
181
  "x-anomaly-enabled": false,
182
+ "x-chart-priority": 20,
183
+ "x-chart-good-direction": "down",
182
184
  }),
183
185
  stdout: healthResultString({
184
186
  "x-chart-type": "text",
@@ -202,20 +204,29 @@ const executeResultSchema = healthResultSchema({
202
204
  "x-anomaly-confirmation-window": 3,
203
205
  "x-anomaly-min-absolute-delta": 50,
204
206
  "x-anomaly-min-relative-delta": 0.5,
207
+ "x-chart-priority": 10,
205
208
  }),
206
209
  success: healthResultBoolean({
207
210
  "x-chart-type": "boolean",
208
211
  "x-chart-label": "Success",
212
+ "x-chart-true-label": "successful",
213
+ "x-chart-false-label": "failing",
209
214
  "x-anomaly-enabled": true,
210
215
  "x-anomaly-direction": "dominance",
216
+ "x-chart-priority": 20,
217
+ "x-chart-good-direction": "up",
211
218
  }),
212
219
  timedOut: healthResultBoolean({
213
220
  "x-chart-type": "boolean",
214
221
  "x-chart-label": "Timed Out",
222
+ "x-chart-true-label": "timed out",
223
+ "x-chart-false-label": "completed in time",
215
224
  // A timeout always implies `success: false`, so alerting here on top of
216
225
  // `success` double-fires on the same incident. Keep it chartable, let
217
226
  // `success` carry the alert.
218
227
  "x-anomaly-enabled": false,
228
+ "x-chart-priority": 90,
229
+ "x-chart-good-direction": "down",
219
230
  }),
220
231
  });
221
232
 
@@ -233,6 +244,7 @@ const executeAggregatedFields = {
233
244
  "x-anomaly-confirmation-window": 3,
234
245
  "x-anomaly-min-absolute-delta": 50,
235
246
  "x-anomaly-min-relative-delta": 0.5,
247
+ "x-chart-priority": 10,
236
248
  }),
237
249
  successRate: aggregatedRate({
238
250
  "x-chart-type": "gauge",
@@ -244,6 +256,7 @@ const executeAggregatedFields = {
244
256
  // jitter in the rate.
245
257
  "x-anomaly-confirmation-window": 3,
246
258
  "x-anomaly-min-absolute-delta": 5,
259
+ "x-chart-priority": 20,
247
260
  }),
248
261
  };
249
262
 
@@ -142,8 +142,12 @@ const inlineScriptResultSchema = healthResultSchema({
142
142
  success: healthResultBoolean({
143
143
  "x-chart-type": "boolean",
144
144
  "x-chart-label": "Success",
145
+ "x-chart-true-label": "successful",
146
+ "x-chart-false-label": "failing",
145
147
  "x-anomaly-enabled": true,
146
148
  "x-anomaly-direction": "dominance",
149
+ "x-chart-priority": 20,
150
+ "x-chart-good-direction": "up",
147
151
  }),
148
152
  message: healthResultString({
149
153
  "x-chart-type": "text",
@@ -170,13 +174,18 @@ const inlineScriptResultSchema = healthResultSchema({
170
174
  "x-anomaly-confirmation-window": 3,
171
175
  "x-anomaly-min-absolute-delta": 50,
172
176
  "x-anomaly-min-relative-delta": 0.5,
177
+ "x-chart-priority": 10,
173
178
  }),
174
179
  timedOut: healthResultBoolean({
175
180
  "x-chart-type": "boolean",
176
181
  "x-chart-label": "Timed Out",
182
+ "x-chart-true-label": "timed out",
183
+ "x-chart-false-label": "completed in time",
177
184
  // Always implies `success: false`; alerting here as well double-fires
178
185
  // on the same incident. Keep chartable, let `success` carry the alert.
179
186
  "x-anomaly-enabled": false,
187
+ "x-chart-priority": 90,
188
+ "x-chart-good-direction": "down",
180
189
  }),
181
190
  });
182
191
 
@@ -194,6 +203,7 @@ const inlineScriptAggregatedFields = {
194
203
  "x-anomaly-confirmation-window": 3,
195
204
  "x-anomaly-min-absolute-delta": 50,
196
205
  "x-anomaly-min-relative-delta": 0.5,
206
+ "x-chart-priority": 10,
197
207
  }),
198
208
  successRate: aggregatedRate({
199
209
  "x-chart-type": "gauge",
@@ -203,6 +213,7 @@ const inlineScriptAggregatedFields = {
203
213
  "x-anomaly-direction": "higher-is-better",
204
214
  "x-anomaly-confirmation-window": 3,
205
215
  "x-anomaly-min-absolute-delta": 5,
216
+ "x-chart-priority": 20,
206
217
  }),
207
218
  };
208
219
 
package/src/strategy.ts CHANGED
@@ -64,8 +64,12 @@ const scriptResultSchema = healthResultSchema({
64
64
  executed: healthResultBoolean({
65
65
  "x-chart-type": "boolean",
66
66
  "x-chart-label": "Executed",
67
+ "x-chart-true-label": "executed",
68
+ "x-chart-false-label": "not executed",
67
69
  "x-anomaly-enabled": true,
68
70
  "x-anomaly-direction": "dominance",
71
+ "x-chart-priority": 30,
72
+ "x-chart-good-direction": "up",
69
73
  }),
70
74
  executionTimeMs: healthResultNumber({
71
75
  "x-chart-type": "line",
@@ -77,6 +81,7 @@ const scriptResultSchema = healthResultSchema({
77
81
  "x-anomaly-confirmation-window": 3,
78
82
  "x-anomaly-min-absolute-delta": 50,
79
83
  "x-anomaly-min-relative-delta": 0.5,
84
+ "x-chart-priority": 10,
80
85
  }),
81
86
  exitCode: healthResultNumber({
82
87
  "x-chart-type": "counter",
@@ -84,19 +89,29 @@ const scriptResultSchema = healthResultSchema({
84
89
  // Arbitrary integer with no stable distribution; the pass/fail signal
85
90
  // it carries is already covered by `success`. Keep chartable only.
86
91
  "x-anomaly-enabled": false,
92
+ "x-chart-priority": 20,
93
+ "x-chart-good-direction": "down",
87
94
  }).optional(),
88
95
  success: healthResultBoolean({
89
96
  "x-chart-type": "boolean",
90
97
  "x-chart-label": "Success",
98
+ "x-chart-true-label": "successful",
99
+ "x-chart-false-label": "failing",
91
100
  "x-anomaly-enabled": true,
92
101
  "x-anomaly-direction": "dominance",
102
+ "x-chart-priority": 20,
103
+ "x-chart-good-direction": "up",
93
104
  }),
94
105
  timedOut: healthResultBoolean({
95
106
  "x-chart-type": "boolean",
96
107
  "x-chart-label": "Timed Out",
108
+ "x-chart-true-label": "timed out",
109
+ "x-chart-false-label": "completed in time",
97
110
  // Always implies `success: false`; alerting here as well double-fires
98
111
  // on the same incident. Keep chartable, let `success` carry the alert.
99
112
  "x-anomaly-enabled": false,
113
+ "x-chart-priority": 90,
114
+ "x-chart-good-direction": "down",
100
115
  }),
101
116
  error: healthResultString({
102
117
  "x-chart-type": "status",
@@ -119,6 +134,7 @@ const scriptAggregatedFields = {
119
134
  "x-anomaly-confirmation-window": 3,
120
135
  "x-anomaly-min-absolute-delta": 50,
121
136
  "x-anomaly-min-relative-delta": 0.5,
137
+ "x-chart-priority": 10,
122
138
  }),
123
139
  successRate: aggregatedRate({
124
140
  "x-chart-type": "gauge",
@@ -128,6 +144,7 @@ const scriptAggregatedFields = {
128
144
  "x-anomaly-direction": "higher-is-better",
129
145
  "x-anomaly-confirmation-window": 3,
130
146
  "x-anomaly-min-absolute-delta": 5,
147
+ "x-chart-priority": 20,
131
148
  }),
132
149
  errorCount: aggregatedCounter({
133
150
  "x-chart-type": "counter",
@@ -136,6 +153,8 @@ const scriptAggregatedFields = {
136
153
  // with bucket volume and has no stable baseline. Prefer the percent
137
154
  // form (`successRate`) for alerting and keep this chartable only.
138
155
  "x-anomaly-enabled": false,
156
+ "x-chart-priority": 90,
157
+ "x-chart-good-direction": "down",
139
158
  }),
140
159
  timeoutCount: aggregatedCounter({
141
160
  "x-chart-type": "counter",
@@ -143,6 +162,8 @@ const scriptAggregatedFields = {
143
162
  // Same as errorCount: a volume-scaled absolute twin of the failure
144
163
  // rate already expressed by `successRate`. Chartable only.
145
164
  "x-anomaly-enabled": false,
165
+ "x-chart-priority": 90,
166
+ "x-chart-good-direction": "down",
146
167
  }),
147
168
  };
148
169