Preconditions
Fixture event has invited, confirmed, declined, bounced, suppressed, custom-segment, and empty-audience guests.
Happy path
Open Guest Messaging.
Audience picker supports status filters and custom segments.
Compose a one-time message.
Recipient count, exclusions, and preview are visible before send.
Send now.
Async progress shows queued, sent, failed, and suppressed counts.
Failure modes
Send blocked on validation failure
Trigger: unresolved tokens or invalid audience criteria.
Resolution: send returns 400 and no partial-send occurs.
Bounced recipient tracked and suppressed
Trigger: a recipient bounces.
Resolution: email_events records bounce and suppression excludes future sends.
Scheduled-message edit window
Trigger: one-time message is converted to scheduled and edited too late.
Resolution: 409 PAST_EDIT_WINDOW with clear copy.
Retry on transient failure
Trigger: provider 5xx during fan-out.
Resolution: retries use same Idempotency-Key and recipients receive at most one message.
Idempotency-key on test-send
Trigger: Send test is clicked twice quickly.
Resolution: one test message is queued.
Recipient resolution empty
Trigger: audience filters resolve to zero.
Resolution: 409 NO_RECIPIENTS and UI says no recipients match this audience.
Token rendering fallback
Trigger: recipient lacks first name.
Resolution: fallback text renders instead of empty merge.
Cancel scheduled before send
Trigger: queued mailing is cancelled.
Resolution: pending count drains, reservations refund, and audit row is written.
Bulk send observability
Trigger: large audience fan-out has partial provider failures.
Resolution: async job tracker shows per-state counts and request ids.
Audience snapshot drift
Trigger: guest statuses change after preview but before send.
Resolution: send uses an explicit snapshot or forces recipient recount.
Deployed-runtime gap
Trigger: deployed run on 2026-04-29 observed mailing create 409 NO_RECIPIENTS because recipient resolver found no audience match; the probe locks this in until the gap is closed.
Resolution: status 409 remains expected until the deployed resolver can exercise the send path.
Stable test attributes
Visibility teeth. Each attribute must be effectively visible when active.
guest-messaging-page | Page | Messaging surface |
guest-message-audience-picker | Form | Status/segment filters |
guest-message-editor | Form | Message body |
guest-message-recipient-count | Preview | Audience count |
guest-message-preview | Preview | Rendered message |
guest-message-send-cta | Toolbar | Send now |
guest-message-test-send-cta | Toolbar | Test send |
guest-message-job-tracker | Page | Fan-out progress |
guest-message-warning | Page | Validation/empty audience |
guest-message-gap-panel | Page | Runtime gap |
Agent test plan
- guest-messaging-renders
- send-one-time-message
- track-send-progress
- deployed-runtime-gap