fix(guard): never auto-pause established customers
What
The Guard can pause only new teams (first 14 days) again. useSend now refuses a Guard pause of an established customer, even with evidence.
Why: the Guard paused Arali (#374, a customer since Nov 2025) for "cold outreach" based on one email. That email was an internal CRM lead-assignment notification to their own salesperson: normal transactional mail. The founder's rule: never pause a long-time customer with a clean account on that basis. Alert, and let the founder decide.
recordTeamActionPAUSE always callsassertGuardMayAct: new teams only, with or withoutabuse.- New teams can still be paused for a terms break, with their own emails as evidence. They get the customer email, and Discord is told.
- ALERT works for every team, as before.
The Guard side is already deployed. Its tool scope refuses pause_team for established customers, it needs 2+ emails to pause a new team, and internal notifications are explicitly not outreach. This PR is the server-side backstop.
Incident
- Paused at 05:58:14 UTC, resumed at 06:00:45 (an admin RESUME is logged), and the cache cleared by about 06:03.
- No campaigns were affected.
- An apology email was sent and delivered.
Verification
guard-serviceand route tests: 46 passed. New tests: an established customer is never paused, even with phishing evidence; a new team needs its own emails as evidence.- Full suite and production build: running.
Migration
None.
Ask Polylane for an impact assessment of this pull request:
Summary by cubic
Restricts the Guard so it can never auto-pause established customers. Only teams in their first 14 days can be paused, with or without abuse evidence; any other team gets an alert and the founder decides.
- The team's age is rechecked atomically in the pause update, so a team can't age past 14 days between the initial check and the pause.
- The Guard's tool scope already refused these pauses, so this is the server-side backstop.
Incident
The Guard paused Arali (a customer since Nov 2025) for "cold outreach" based on one email that was an internal CRM lead-assignment notification to their own salesperson. The pause lasted about two and a half minutes, no campaigns were affected, and an apology email was delivered.
Summary by CodeRabbit
- Guard
- Teams can be paused only during their first 14 days, and the eligibility window is checked when a pause is applied.
- Established teams may receive alerts about abuse, but are not paused—even when supporting evidence is provided.
- New teams may still be paused for terms violations when the required evidence is provided.