Commit f46e987
* fix(plugin-webhooks): re-arm an encrypted-secret webhook when the CryptoProvider registers (#8022)
A webhook whose signing secret is encrypted was unsubscribed for ~60s after
every restart: a record change in that window produced no delivery and no
`sys_http_delivery` row, while the row still read `active: true`.
Not a race — an ordering. Plugins run inside `kernel:ready`, which
`runtime.start()` completes, and every host wires `setCryptoProvider` only after
`runtime.start()` returns. So `AutoEnqueuer`'s first cache build always preceded
the capability it needs, correctly dropped every secret-bearing subscription
(#7799 fail-closed), and nothing re-read until the periodic refresh.
`ObjectQL.onCryptoProviderChange(listener)` reports the registration; the
auto-enqueuer subscribes before its first build and rebuilds when it fires,
without joining the in-flight pre-registration refresh. Feature-detected, as
`resolveSecretField` already was.
The fail-closed drop itself is unchanged. It now reports at `error` with the
consequence and the fix, carries the ADR-0112 `INTERNAL_ERROR`/500 pair, and is
said once per outage rather than every refresh.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FuYKU5d8xPfHSZyASNsyia
* test(plugin-webhooks): drop the mid-flight re-arm case — it passes on main too (#8022)
Every harness that can inject the CryptoProvider registration while the first
cache build is in flight also moves the secret resolution to after it, so the
naive `() => this.refresh()` passes the test as well. A case that cannot
separate the two revisions is a false green, so it is removed rather than kept
as coverage it does not provide. The guard in `rearmAfterCryptoRegistered`
stays, with the reasoning stated where it lives.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FuYKU5d8xPfHSZyASNsyia
* fix(plugin-webhooks): prune the dropped-webhook report set on refresh (#8022)
The set that makes the fail-closed drop report once per outage instead of once
per refresh kept every id it ever saw. Two consequences: it grows for the life
of the process, and a webhook deactivated while broken and later reactivated
still broken has its first report suppressed as a repeat. Each refresh now
forgets ids the read no longer returns.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FuYKU5d8xPfHSZyASNsyia
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 22f0daa commit f46e987
5 files changed
Lines changed: 421 additions & 9 deletions
File tree
- .changeset
- packages
- objectql/src
- plugins/plugin-webhooks/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1666 | 1666 | | |
1667 | 1667 | | |
1668 | 1668 | | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
1669 | 1679 | | |
1670 | 1680 | | |
1671 | 1681 | | |
| |||
4618 | 4628 | | |
4619 | 4629 | | |
4620 | 4630 | | |
| 4631 | + | |
| 4632 | + | |
| 4633 | + | |
| 4634 | + | |
4621 | 4635 | | |
4622 | 4636 | | |
4623 | 4637 | | |
4624 | 4638 | | |
| 4639 | + | |
| 4640 | + | |
| 4641 | + | |
| 4642 | + | |
| 4643 | + | |
| 4644 | + | |
| 4645 | + | |
| 4646 | + | |
| 4647 | + | |
| 4648 | + | |
| 4649 | + | |
| 4650 | + | |
| 4651 | + | |
| 4652 | + | |
| 4653 | + | |
| 4654 | + | |
| 4655 | + | |
| 4656 | + | |
| 4657 | + | |
| 4658 | + | |
| 4659 | + | |
| 4660 | + | |
| 4661 | + | |
| 4662 | + | |
| 4663 | + | |
| 4664 | + | |
| 4665 | + | |
| 4666 | + | |
| 4667 | + | |
| 4668 | + | |
| 4669 | + | |
| 4670 | + | |
| 4671 | + | |
| 4672 | + | |
| 4673 | + | |
| 4674 | + | |
| 4675 | + | |
4625 | 4676 | | |
4626 | 4677 | | |
4627 | 4678 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
7 | 14 | | |
8 | 15 | | |
9 | 16 | | |
| |||
116 | 123 | | |
117 | 124 | | |
118 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
119 | 136 | | |
120 | 137 | | |
121 | 138 | | |
| |||
135 | 152 | | |
136 | 153 | | |
137 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
138 | 166 | | |
139 | 167 | | |
140 | 168 | | |
| |||
167 | 195 | | |
168 | 196 | | |
169 | 197 | | |
| 198 | + | |
170 | 199 | | |
171 | 200 | | |
172 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
173 | 230 | | |
174 | 231 | | |
175 | 232 | | |
| |||
220 | 277 | | |
221 | 278 | | |
222 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
223 | 291 | | |
224 | 292 | | |
225 | 293 | | |
| |||
258 | 326 | | |
259 | 327 | | |
260 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
261 | 332 | | |
262 | 333 | | |
263 | 334 | | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
| 335 | + | |
270 | 336 | | |
271 | 337 | | |
272 | 338 | | |
| |||
281 | 347 | | |
282 | 348 | | |
283 | 349 | | |
| 350 | + | |
284 | 351 | | |
285 | 352 | | |
286 | 353 | | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
287 | 416 | | |
288 | 417 | | |
289 | 418 | | |
| |||
0 commit comments