hailer 0.7.1 → 0.8.0

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: daf8db68dcf4bb575691305878c446eadad671fe038b71824c1fd21ceed1e6a4
4
- data.tar.gz: 4de06222b9e9f9d6c0a1cd6e6a4fb4243d204372112e00936040997164f56e67
3
+ metadata.gz: 7040caa31450c39c7584a6473a49ae17cb3fd74550f8081cf633fa67e50dd01d
4
+ data.tar.gz: cdffc1376da92c0248e34796f6a0d22d4653ff92c537b7ac10cb4c28f14bd072
5
5
  SHA512:
6
- metadata.gz: bab01d219f7c4874135f4ffc686cf273d771c6e9f7226ab951bb01814a619753907c6eeb813415b915124f8e3e7d226ff3027eb517835f3fd56f954b3fa1e287
7
- data.tar.gz: ef18dc30fdc2b71ddcd26caaebdfe2810b552fe6e62c50ac2d21ebf4da388be42e57bab20aae28d996e53cc2d74adbebac08105b69d74cb0ad04805d48f7a695
6
+ metadata.gz: b51170cf7e389c5df4ad1c7cb80772aead8580ed4d3e71f2da0df90d1e3c4e2f95549cf73527cf14cd8093914d3f18e4783ad555d21c047bd37125056de520c7
7
+ data.tar.gz: 46ce1ae89ecf529e3c0b7e5e95d5fb876f2c7d33d630a99891090bf52b74bf236c5ca2777b1e4ef2729e2e8cf034b144ea1182dc26990e2ac2a1391d78ca1c5c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ - Background workers restart one at a time under `supervisor-machines` (1 s doubling to 30 s; more than 3 restarts in 60 s still drains and exits). A panicking SQS consumer no longer takes the docking links and in-flight sends down with it.
6
+ - Synchronous sends run on one `deadline-machines` budget taken from Mothership's `MS_BAY_DRAIN_TIMEOUT`: verification and the provider call share it, and with under 2 s left the answer is 503 `budget_spent` with nothing sent, instead of a provider call Mothership has already abandoned.
7
+ - Opt-in fault injection (`[rogue]`, `rogue-machines`): `hailer arm-experiment`/`disarm-experiment`/`list-experiments` against the provider, SQS feedback or the verifier, with a mandatory expiry of at most 24 hours. Migration `06_rogue_experiments`.
8
+ - breaker-machines 0.22, behavior-machines 0.3, behavior-machines-circuit 0.4, chrono-machines 0.10, throttle-machines 0.5, state-machines 0.34: the whole family on one state-machines. Every other dependency at its latest compatible release.
9
+
10
+ ## [0.8.0](https://github.com/seuros/hailer/compare/v0.7.1...v0.8.0) (2026-11-18)
11
+
12
+
13
+ ### Features
14
+
15
+ * supervise workers, budget sync sends, opt-in fault injection ([8aba181](https://github.com/seuros/hailer/commit/8aba18154bf3dd3867024b745b374135129f8eed))
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * machines crates at their latest releases; workers back off through chrono-machines ([8eb0ccd](https://github.com/seuros/hailer/commit/8eb0ccdb97682702710135fd9e4170f40a0edc84))
21
+ * machines crates at their rebuilt releases ([8523c27](https://github.com/seuros/hailer/commit/8523c276ac7582103e9bf5558eb0804c6c827431))
22
+
3
23
  ## 0.7.1
4
24
 
5
25
  - `AWS_ENDPOINT_URL`, and `AWS_ENDPOINT_URL_SESV2`/`_SQS`/`_STS` before it, replace the AWS hosts again, as they did under the AWS SDK; `AWS_IGNORE_CONFIGURED_ENDPOINT_URLS=true` turns them off. 0.7.0 ignored them, so LocalStack and endpoint fixtures reached real AWS.
data/README.md CHANGED
@@ -312,6 +312,13 @@ the current feedback commit/ack within the configured deadline. Idle links
312
312
  close immediately. Deadline expiry aborts remaining tasks and exits nonzero;
313
313
  an interrupted send can have an unknown outcome.
314
314
 
315
+ Background workers (dispatcher, SQS feedback, rate discovery, suppression
316
+ reconciliation, rogue watcher) run under an OTP-style supervisor
317
+ (`supervisor-machines`): a worker that panics or exits is restarted on its
318
+ own, after 1 s doubling to 30 s while it keeps dying. More than 3 restarts in
319
+ 60 s, or the docking listener stopping, drains the whole ship and exits
320
+ nonzero for Mothership to relaunch.
321
+
315
322
  **Security:** the route currently has no application-level authentication.
316
323
  `/internal/` is a name, not an access control. Keep the bind private. The client
317
324
  does not follow redirects or use environment HTTP proxies.
@@ -463,6 +470,40 @@ Postmark sends are single-attempt too: throttling, a refused token and 5xx
463
470
  return 503, other refusals 502, and lost or unreadable answers the
464
471
  unknown-outcome code.
465
472
 
473
+ Every synchronous send runs on one budget (`deadline-machines`): Mothership's
474
+ `request_timeout` for the bay, read from `MS_BAY_DRAIN_TIMEOUT` (60 s when
475
+ unset), less one second to write the reply. It starts when the request
476
+ arrives; address verification and the provider call draw from what is left. Verification never
477
+ spends the last 5 s, and a lookup that cannot finish in what is left counts as
478
+ `unknown`. The provider call's timeout is cut to the remaining budget; with
479
+ under 2 s left nothing is sent and the answer is 503 `code: "budget_spent"`
480
+ (`Hailer::UnavailableError`, safe to retry). Queued dispatch keeps the
481
+ provider's own 20 s timeout.
482
+
483
+ ## Fault injection
484
+
485
+ `rogue-machines` lets an operator make a dependency fail, stall or lie on
486
+ purpose, to watch the breaker, the budgets and the Rails side react. Nothing
487
+ happens unless `[rogue]` is configured; replicas with it poll
488
+ `hailer.rogue_experiments` every `poll_interval_seconds` (default 5).
489
+
490
+ ```sh
491
+ hailer arm-experiment --target provider --fault raise --percent 10 --expires-in-seconds 300
492
+ hailer arm-experiment --target verifier --fault delay --delay-ms 4000 --expires-in-seconds 600
493
+ hailer list-experiments
494
+ hailer disarm-experiment --target provider # or no --target to disarm everything
495
+ ```
496
+
497
+ One experiment per target; arming again replaces it. Every experiment expires,
498
+ at most 24 hours after arming, and the expiry is counted down on each host's
499
+ monotonic clock from the time PostgreSQL says is left.
500
+
501
+ | Target | `raise` | `delay` | `garble` |
502
+ | --- | --- | --- | --- |
503
+ | `provider` (SES/Postmark) | unreachable: nothing sent; sync sends answer 503 and count against the breaker, queued dispatch retries | served inside the send timeout; at least as long is an unknown outcome (queued: `held_unknown`) | sent, but the id comes back as `rogue-<id>` |
504
+ | `feedback` (SQS) | receive fails, consumer backs off | receive starts late | bodies replaced and left unacknowledged, so SQS redelivers them |
505
+ | `verifier` (Emailable) | lookup fails open as `unknown` | served inside the lookup budget | refused: a garbled verdict would be cached past the experiment |
506
+
466
507
  ## Status
467
508
 
468
509
  The delivery contract, Hailer-side feedback processing, domain blocklist,
data/hailer.example.toml CHANGED
@@ -58,3 +58,9 @@ topic_arn = "arn:aws:sns:us-east-1:123456789012:mail-feedback"
58
58
  # [domain_intel]
59
59
  # provider = "rdap"
60
60
  # new_domain_threshold_days = 30
61
+
62
+ # Opt in: let operators arm fault-injection experiments against the provider,
63
+ # the feedback queue or the verifier (hailer arm-experiment). Without this
64
+ # block nothing reads hailer.rogue_experiments and every call passes.
65
+ # [rogue]
66
+ # poll_interval_seconds = 5
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hailer
4
- VERSION = '0.7.1'
4
+ VERSION = '0.8.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdelkader Boudih
@@ -201,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
201
  - !ruby/object:Gem::Version
202
202
  version: '0'
203
203
  requirements: []
204
- rubygems_version: 4.0.10
204
+ rubygems_version: 4.0.20
205
205
  specification_version: 4
206
206
  summary: ActionMailer delivery through the Hailer mail ship
207
207
  test_files: []