cloudflare-email 0.4.0 → 0.4.2
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 +59 -2
- data/README.md +63 -379
- data/SECURITY.md +1 -9
- data/docs/activerecord-tenanted.md +0 -11
- data/docs/custom-ingress.md +1 -15
- data/docs/delivery-events.md +2 -5
- data/docs/features.md +49 -123
- data/docs/getting-started.md +90 -172
- data/docs/mailboxes.md +24 -60
- data/docs/management-engine.md +1 -3
- data/docs/outbox.md +5 -6
- data/docs/reference.md +190 -0
- data/docs/routing-diagnostics.md +0 -2
- data/docs/thread-correlation.md +2 -4
- data/docs/troubleshooting.md +4 -4
- data/lib/cloudflare/email/client.rb +23 -5
- data/lib/cloudflare/email/ingress.rb +16 -4
- data/lib/cloudflare/email/version.rb +1 -1
- data/templates/deploy-to-cloudflare/README.md +8 -10
- data/templates/deploy-to-cloudflare/docs/domain-setup.md +86 -166
- data/templates/worker/README.md +6 -8
- data/templates/worker/docs/domain-setup.md +86 -166
- data/templates/worker/docs/durable-inbound.md +4 -16
- metadata +4 -19
- data/docs/architecture.md +0 -105
- data/docs/tenant-mailboxes-plan.md +0 -149
- data/docs/upgrading-0.2.md +0 -101
- data/docs/upgrading-0.3.md +0 -55
- data/docs/verification/2026-09-10-followup.md +0 -49
- data/docs/verification/2026-09-10-install-upgrade.md +0 -86
- data/docs/verification/2026-09-10-live.md +0 -102
- data/docs/verification/2026-09-10.md +0 -175
- data/docs/verification/2026-09-11-custom-ingress.md +0 -49
- data/docs/verification/2026-09-11-extraction.md +0 -32
- data/docs/verification/2026-09-11-outbound-ledger.md +0 -60
- data/docs/verification/2026-09-11-security.md +0 -76
- data/docs/verification/2026-09-11-tenant-mailboxes.md +0 -75
- data/docs/verification/2026-09-12-destination-context.md +0 -46
- data/docs/verification/2026-09-13-action-mailbox-core.md +0 -96
- data/docs/verification/2026-09-13-durable-inbound-and-routing.md +0 -71
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# Durable inbound and Routing delivery verification
|
|
2
|
-
|
|
3
|
-
This change brings the verified Routing-delivery correlation from Rebulk into an
|
|
4
|
-
optional gem API and adds inbound storage/recovery for Rails outages. All tests
|
|
5
|
-
below use synthetic messages and disposable local storage. This report does not
|
|
6
|
-
claim the new Worker configuration is deployed in Rebulk production.
|
|
7
|
-
|
|
8
|
-
## Boundaries verified
|
|
9
|
-
|
|
10
|
-
- Shared sending/queue HTTP requests stream bounded responses, including gzip
|
|
11
|
-
expansion, and enforce a total network deadline. Real socket tests cover
|
|
12
|
-
slow streams, socket cleanup, oversized replies and uncertain queue ACKs.
|
|
13
|
-
No ambiguous failure automatically resends an accepted email.
|
|
14
|
-
- Authenticated Routing analytics validates account/zone, provider ID, sender,
|
|
15
|
-
request window and a single saved envelope recipient. Dedicated encrypted
|
|
16
|
-
receipts preserve provider evidence and support idempotent projection.
|
|
17
|
-
- Inbound R2 persistence finishes before successful Email Worker return. Queue
|
|
18
|
-
messages contain only a storage pointer. Failed enqueue, Rails errors, lost
|
|
19
|
-
responses, failed deletion and exhausted retries retain the pending payload.
|
|
20
|
-
Scheduled pagination advances over poison messages and retries retained mail.
|
|
21
|
-
- A real local workerd instance uses R2 and Queues against Rails with SQLite and
|
|
22
|
-
disk-backed Active Storage. With queue retries disabled, Rails 503 leaves mail
|
|
23
|
-
in R2; invoking the scheduled handler after recovery persists one message and
|
|
24
|
-
removes the pending object. Returning 503 after Rails commits also replays to
|
|
25
|
-
one record. MIME and binary attachments remain byte-identical.
|
|
26
|
-
- Missing Message-ID fallback remains stable when Rails hostnames change. Valid
|
|
27
|
-
Message-IDs and raw MIME are preserved. Pre-upgrade fallback IDs require care
|
|
28
|
-
when replaying historical archive records.
|
|
29
|
-
- Local workerd capacity checks pass for one 25 MiB message and two concurrent
|
|
30
|
-
25 MiB receipts, followed by concurrent handoffs. The receiver verifies exact
|
|
31
|
-
SHA256 and HMAC values, and R2 pending objects clear after acknowledgement.
|
|
32
|
-
Local workerd does not certify production memory-limit enforcement.
|
|
33
|
-
|
|
34
|
-
## Reproduce
|
|
35
|
-
|
|
36
|
-
Use Ruby 3.4 and Node 22 or another supported version:
|
|
37
|
-
|
|
38
|
-
```sh
|
|
39
|
-
BUNDLE_GEMFILE=gemfiles/local_ingress.gemfile bundle install
|
|
40
|
-
npm ci --prefix templates/worker
|
|
41
|
-
BUNDLE_GEMFILE=gemfiles/local_ingress.gemfile bundle exec rake test
|
|
42
|
-
npm test --prefix templates/worker
|
|
43
|
-
npm run check --prefix templates/worker
|
|
44
|
-
node script/verify_durable_capacity.mjs
|
|
45
|
-
BUNDLE_GEMFILE=gemfiles/local_ingress.gemfile bundle exec ruby script/verify_local_ingress.rb
|
|
46
|
-
BUNDLE_GEMFILE=gemfiles/local_ingress.gemfile bundle exec ruby script/verify_package.rb
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
The local runtime harness invokes the real scheduled handler through a temporary
|
|
50
|
-
test-only endpoint. It does not test Cloudflare's production cron scheduler or
|
|
51
|
-
SMTP delivery behavior. No test endpoint is shipped in the Worker.
|
|
52
|
-
|
|
53
|
-
## Before production enablement
|
|
54
|
-
|
|
55
|
-
Provision a private R2 bucket, queue and schedule per environment, and keep
|
|
56
|
-
pending objects free of lifecycle expiration. Deploy the updated Rails ingress
|
|
57
|
-
first. Verify maximum message size and recovery throughput with expected traffic,
|
|
58
|
-
then perform a staging outage drill through the actual Cloudflare email route.
|
|
59
|
-
Monitor storage errors and pending object age as well as queue backlog. Keep
|
|
60
|
-
Rails deduplication records throughout the recovery horizon and monitor mailbox
|
|
61
|
-
routing jobs after durable ingestion.
|
|
62
|
-
|
|
63
|
-
Routing tracking is separately opt-in and needs encryption keys, its migration,
|
|
64
|
-
a restricted analytics read credential, and host scheduling. Cross-database
|
|
65
|
-
applications must retain their durable business projection boundary and enforce
|
|
66
|
-
provider-ID uniqueness across tenant databases. Missing delivery evidence stays
|
|
67
|
-
unresolved; it never authorizes another send.
|
|
68
|
-
|
|
69
|
-
R2 storage and retry protect mail after a successful storage commit. They cannot
|
|
70
|
-
promise absolute losslessness during upstream storage failure, deletion,
|
|
71
|
-
misconfiguration or account suspension. See the [operating guide](../../templates/worker/docs/durable-inbound.md).
|