You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## What changed
- split email creation into side-effect-free preparation and commit
phases
- preflight every message in a strict batch before persisting or
queueing any sibling
- document strict-only batch validation and add service/API regression
coverage
## Why
`createBatch` previously called `create` for every message concurrently.
If one message referenced a missing or unpublished template, or an
invalid uploaded attachment, another valid message could already be
stored and queued even though the batch request returned an error. A
caller retry could then duplicate delivery.
The official Resend API uses strict batch validation by default, where
one invalid message prevents the batch from being sent. HayaSend now
matches that safety behavior for its service-level validation.
## Impact
Successful single-email and batch response shapes are unchanged. Invalid
batches now fail before any valid sibling is accepted. Permissive batch
mode and distributed transaction handling for infrastructure failures
remain out of scope.
## Validation
- `npm run check`
- `npm test` — 21 files, 144 tests
- `npm run build`
- `npm audit --omit=dev --audit-level=high` — 0 vulnerabilities
- `cfn-lint==1.53.2 template.yaml`
- Redocly 2.12.5 OpenAPI lint
- Lambda entry-point bundles
- `actionlint`
- `gitleaks git --staged`
- signed commit with DCO sign-off
Signed-off-by: Yusuke Hayashi <yusuke8h@gmail.com>
0 commit comments