Skip to content

Run the automatic check on every message and campaign - #1533

Merged
daveearley merged 1 commit into
developfrom
fix/review-every-message
Nov 30, 2026
Merged

daveearley merged 1 commit into
developfrom
fix/review-every-message

Conversation

@daveearley

Copy link
Copy Markdown
Contributor

What

When the automatic AI check is enabled (Hi.Events Cloud), every event message and every Audience campaign now goes through it, whatever the account's messaging tier. Until now only messages from new or untrusted accounts were checked, so a manually verified account on a higher tier could send anything unchecked. For example, a batch of gibberish test messages went out today without being checked.

Event messages

  • SendMessageHandler holds every non-test message as PENDING_REVIEW when MessageAiReviewService::isEnabled(). The check approves it, or hands it to a person.
  • Test sends from accounts that pass eligibility still go straight out, because they only reach the sender. Accounts that fail eligibility still have their test sends checked, as before.
  • The review prompt no longer assumes the account is new. <new_account_reasons> is none for an established account.
  • The admin "Message Pending Review" email lists the check's reasons and only shows eligibility failures when there are some. The subject, event title and account name are escaped so they can't render as links.

Audience campaigns

  • CampaignSendGate holds every other launch, automation runs included, with a new ROUTINE_CHECK reason. The existing reasons (untrusted account, first campaign, recent import) still take priority when they apply.
  • The new reason is worded in the review prompt, the admin email, the send modal and the admin review queue.

Unchanged

  • With the check off, and on every self-hosted install, behaviour is the same as before.

Note for API users

On Cloud, POST events/{id}/messages now returns PENDING_REVIEW for established accounts, where it used to return PROCESSING or SCHEDULED. The status already existed and was returned for new accounts.

Testing

  • New tests: unit tests for the handler (established account held for the check, its test send skips it), for MessagePendingReviewMail, and for CampaignSendGate (check on/off × established, untrusted, first-campaign and recent-import accounts, plus self-hosted). Feature tests for campaign AI review on established accounts.
  • Unit, Feature and pint pass. tsc is clean.
  • Dev stack with the real check, as a trusted-tier account. Gibberish was held for a person (NEEDS_PERSON, 0.96). A normal event reminder was approved and sent. A test send skipped the check. For campaigns, CampaignSendGate::evaluate on 14 established accounts sends straight away with the check off and returns ROUTINE_CHECK with it on.

When the AI review is enabled, event messages and Audience campaigns from
established accounts are now held for it too, instead of only those from
new or untrusted accounts. Test sends from eligible accounts still go
straight out, and nothing changes when the check is off.

Messages: the review prompt no longer assumes the account is new, and the
admin pending-review email lists the check's reasons and only shows
eligibility failures when there are some.

Campaigns: established accounts get a ROUTINE_CHECK review reason, worded
in the admin email, the send modal and the review queue.
@github-actions

Copy link
Copy Markdown
Contributor

✅ E2E smoke tests: Everything passed.

Mode Result ✅ Passed ❌ Failed ⚠️ Flaky ⏭️ Skipped ⏱️ Duration
Self-hosted ✅ Passed 129 0 0 0 5m 9s

Open the run

@daveearley
daveearley merged commit b79c050 into develop Nov 30, 2026
11 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant