
neo773andClaude Opus 4.8
347669dcaa
feat(emailing-domain): rate limits + per-recipient credit metering
Input caps:
- @MaxLength on subject/text/html, @ArrayMaxSize on to/cc/bcc/replyTo, and a
hard EMAIL_MAX_TOTAL_RECIPIENTS guard on the deliverable total (SES's
50-recipient limit).
Throttle:
- Reuse ThrottlerService token bucket keyed emailing-domain-send:<workspaceId>,
one token per deliverable recipient, checked before the driver send.
Credit metering (3x AWS cost; 1 credit = $1):
- New EMAIL_SEND UsageOperationType (+ exhaustive USAGE_UNIT map entry).
- Emit USAGE_RECORDED via the global WorkspaceEventEmitter, quantity = accepted
recipients, creditsUsedMicro = 0.0001 * 3 * DOLLAR_TO_CREDIT_MULTIPLIER per
recipient (300 micro/recipient). Enforcement rides the existing
USAGE_RECORDED -> ClickHouse -> cap pipeline, as WORKFLOW_EXECUTION does.
- Pre-send BillingUsageService.canFeatureBeUsed gate (rejects inactive plans;
permissive when billing disabled).
Order in sendEmail: verified -> tenant-status -> from-domain -> suppression
filter -> recipient cap -> billing gate -> throttle -> send -> meter.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 02:43:09 +05:30
..
2026-04-14 09:20:33 +00:00
2026-05-29 02:43:09 +05:30
2026-04-19 20:55:10 +02:00
2026-05-22 00:21:33 +02:00
2026-05-29 02:43:09 +05:30
2026-05-28 17:41:16 +02:00
2026-05-27 06:47:47 +00:00
2026-05-19 12:56:44 +00:00
2026-05-27 18:52:53 +02:00
2026-05-11 14:23:21 +00:00
2026-05-22 00:21:33 +02:00
2026-05-20 17:58:27 +00:00
2026-05-20 17:58:27 +00:00
2026-04-02 11:20:08 +00:00
2026-05-25 12:36:53 +00:00
2026-05-22 00:21:33 +02:00
2026-04-02 11:20:08 +00:00