Skip to main content
Liorry Herisnor
Runtime state: Built, dormantPlatforms

Campaign Autopilot Braking

A user-authored rule engine that pauses, stops or alerts on a campaign when a metric crosses a threshold — with a simulate mode, an audit trail, and no scheduler.

Runtime state: Built and working, but effectively unused: one rule exists and it is disabled, and there is no ticker or worker that evaluates rules — it fires only when a person clicks. The braking that actually protects production is the orchestration protection engine, which does run on a tick.

Business objective
Give an operator a self-service way to express an emergency brake on their own campaigns, without needing a code change to add a rule.
Trigger
A human clicking run or simulate against a specific rule.
Inputs
  • A rule of conditions and actions, authored by the operator who owns it
  • Live campaign statistics for the targeted or running campaigns
  • A simulate flag
Outputs
  • Whether every condition was met, and which campaign triggered it
  • Executed pause, stop or alert actions
  • A before-and-after audit record

What it is, and what it is not

This is the self-service sibling of the delivery protection rules. The protection engine is fourteen rules in Go, banded by consequence, running on a tick. This is an operator writing their own rule in the interface and running it.

The distinction matters because the two are constantly confused, including by the naming inside the codebase — there is a separate governance component that also carries the word "autopilot" and does something entirely unrelated. This page is about the campaign rule engine.

The workflow

Rule to executed action

Simulate is the only dry run, and it is opt-in per invocation rather than enforced.

  1. Human action

    Operator authors a rule

    Conditions of metric, operator and threshold; actions of pause, stop or alert. Scoped to one campaign or to any running campaign.

  2. Human action

    Operator clicks run or simulate

    Decision point: There is no scheduler. Nothing evaluates a rule unless a person asks it to — which is the single biggest limitation of this design.

  3. Approval gate

    Ownership check

    Decision point: A rule can only be evaluated by the person who created it.

  4. Automated software

    Evaluate each condition

    Eleven metrics available: bounce, open, click and unsubscribe rates; complaint, block, hard-bounce, soft-bounce, delivered, sent and deferred counts. Five comparison operators.

  5. Automated software

    Any-campaign matching

    Decision point: For a scope of any running campaign, a condition is met if a single campaign satisfies it — and that campaign becomes the action target. Scanning is capped, so the blast radius is bounded.

  6. Automated software

    Combine conditions

    Decision point: All conditions must be met. A logical AND across the set, not a score.

  7. Approval gate

    Simulate?

    Decision point: If simulating, return the evaluation and execute nothing. This is how a rule is checked before it is trusted.

  8. Automated software

    Execute the actions

    Pause the campaign, stop it, or raise an alert. A closed set of three — it cannot change rates, budgets or content.

  9. Data store

    Write the audit record

    Before and after: which conditions were met with per-condition results, and which actions executed.

  • Human action
  • Automated software
  • Data store
  • Approval gate

Decision points

  • Which metric, and against what threshold? Authored by the operator.
  • One campaign or any running campaign? Scope determines the blast radius.
  • Simulate or execute? Per invocation.
  • Which campaign gets the action? The first match, when scoped broadly.

Responsibilities

AI / LLM

  • Nothing. This is threshold comparison over campaign statistics.

Deterministic

  • Metric extraction from campaign statistics.
  • All comparisons and the logical AND across conditions.
  • Ownership enforcement.
  • The scan cap.
  • Action execution, from a closed set of three.
  • The before-and-after audit record.

Human approval points

  1. Authoring the rule.
  2. Every evaluation — there is no scheduler, so a human is always the trigger.
  3. Resuming anything it paused.

Failure handling

FailureResponse
Metric unavailable for a campaignThe condition cannot be met and does not fire.
Rule scoped too broadlyThe scan cap bounds it, and only the first matching campaign is acted on.
Statistics staleEvaluated against whatever the campaign statistics report; there is no freshness check, which is a gap.
An action targets a campaign already pausedThe action is idempotent in effect.

Monitoring

Rule count and how many are enabled, evaluations run versus simulated, conditions met, actions executed by type, and audit-record completeness. The most telling metric for this feature is how rarely it is invoked at all.

More workflow designs

Back to the library