Gray Rollout for AI Subscription Promotions: Keeping Promises, Config, and Live Behavior Consistent
This article breaks down why a two-stage AI subscription promotion failed at launch and turns the lesson into an engineering practice: model campaigns as declarative, versioned configuration; funnel every price decision through a single entry point backed by an explicit state machine; validate audience targeting with a dry run before the window opens; roll out in stages; monitor business-semantic correctness rather than error rates alone; and keep rollback, compensation, and public announcements ready in advance. A launch checklist is included.
1. The Real Problem: Config and Expectations Drifted Apart
A two-stage subscription promotion was announced publicly: stage one offered a discount to existing paying users only, and the official announcement promised that stage two would extend the offer to users who had never subscribed. When the stage-two window opened, the discount configuration never took effect. The page still showed the original price, users who had been waiting for the window missed out entirely, and the community reaction escalated quickly.
From an engineering standpoint this was not a single point of failure. Three layers failed at the same time:
- Config and announcement were decoupled. The promised time was written in marketing copy; the actual activation condition lived in configuration. Nothing enforced that the two came from the same source.
- Audience selection rules were never validated. Existing subscribers and never-subscribed users are mutually exclusive groups, and the rule switch had no pre-check for “does the target audience actually match anyone.”
- No fallback for the time window. Auto-expiry at the end of a campaign was treated as normal behavior, while “should be live but isn’t” raised no alert at all.
So the core engineering goal of a promotion reduces to one sentence: keep the public promise, the internal configuration, and what is actually live in production consistent at all times, and detect any inconsistency automatically.
2. Campaign Configuration Model: Express Promotions as Declarative Data
A promotion should not be hard-coded into application branches. It should be a versioned, auditable piece of declarative configuration. A minimal viable model has five dimensions:
campaign:id: bf-2026-phase2version: 7 # config version, every change is traceablewindow:start: "2026-11-27T00:00:00-08:00"end: "2026-11-30T23:59:59-08:00"timezone_policy: fixed # fixed timezone, avoids drift across regionsaudience:include: [never_subscribed]exclude: [active_paid, in_trial]offer:plan: pro_annualdiscount: 0.5max_stack: 1rollout:stage: 0 # 0=off 1=internal 2=5% 3=50% 4=100%fallback:on_error: keep_original_price # on failure keep original price, never show a wrong price
Key design points:
- Use absolute timestamps plus a fixed timezone for the window. Do not evaluate against “the server’s current date,” which causes boundary drift in multi-region deployments.
- Express audiences as set operations (include/exclude). Mutually exclusive groups are declared explicitly, which makes conflicts statically checkable.
- Keep
rollout.stageseparate fromwindow. Reaching the start time does not mean full release; rollout is an independent, controllable second gate. - Define failure semantics in
fallback. If configuration cannot be read, keep the original price. Selling less is acceptable; showing a wrong price is not.
3. Activation Decision: One Entry Point Plus a State Machine
Every price display, order validation, and discount redemption must call the same decision function. This eliminates the classic inconsistency where the page uses one logic and checkout uses another.
public OfferDecision decide(User u, Plan p, Instant now, Campaign c) {if (now.isBefore(c.window().start()) || now.isAfter(c.window().end()))return OfferDecision.inactive("OUT_OF_WINDOW");if (!c.audience().matches(u)) return OfferDecision.inactive("NOT_IN_AUDIENCE");if (!c.rollout().hit(u.id())) return OfferDecision.inactive("NOT_IN_ROLLOUT");if (u.hasActiveSubscription(p)) return OfferDecision.inactive("ALREADY_PAID");return OfferDecision.applied(c.offer());}
Pair this with an explicit state machine for the campaign lifecycle, instead of inferring campaign state from whether a banner happens to be rendered:
DRAFT → SCHEDULED → LIVE(stage 1..4) → EXPIRED↘ ROLLED_BACK
Transitions are allowed only through the configuration center, and each transition writes an audit log entry (operator, timestamp, before/after version, size of the affected audience), so any incident can be reconstructed precisely.
4. Rollout Strategy and Pre-Validation
Twenty-four hours before the window opens, run a shadow validation (dry-run): replay the decision logic against sampled real traffic or a snapshot of historical users, and report match counts per audience.
- If the match count for
never_subscribedis 0, block the launch and alert. This is the only chance to catch “new users get nothing” in advance. - Ramp progressively 1% → 5% → 50% → 100%, observing core metrics (order conversion rate, discount redemption success rate, checkout error rate) at each step before advancing.
- Keep the rollout switch separate from the discount switch. When something looks wrong, narrow the rollout first rather than changing the price.
5. Observability: Monitor “Should Be Live but Isn’t”
Conventional monitoring watches error rates. Promotions need to watch business-semantic correctness:
| Metric | Expected | Alert condition |
|---|---|---|
| Campaign state matches current time | 100% | State is not LIVE inside the window |
| Target audience match rate | > 0 | Match count drops sharply or hits 0 |
| Displayed discount price matches checkout price | 100% | Any inconsistent sample appears |
| Discount redemption success rate | Near baseline | Drops for 5 consecutive minutes |
| Config version propagation delay | Seconds | Exceeds threshold |
On the logging side, standardize the fields (campaign_id, config_version, stage, decision_reason) and aggregate the decision_reason distribution through the log service. If OUT_OF_WINDOW starts rising inside the window, trigger human intervention immediately. The general approach at Baidu AI Cloud in these scenarios is also to connect configuration changes, monitoring alerts, and log search into a closed loop.
6. Rollback and User Communication Plan
- Roll back before fixing. Restore the last stable configuration version first (usually effective within seconds), then find the root cause, so you are not debugging during peak traffic.
- Define compensation in advance. If the promise is not met, fix the compensation terms ahead of time (extended trial, equivalent benefit, priority in the next campaign) and write them as an executable script rather than an ad-hoc decision.
- Generate announcements from config. Time points in public copy are generated from configuration; manual entry is prohibited, which removes the “copy promises, config doesn’t” gap at the source.
- One information channel. Publish campaign progress on a single status page so multiple channels cannot diverge and amplify the backlash.
7. Launch Checklist
- Configuration is versioned and has passed static conflict checks (mutually exclusive audiences, valid time window).
- The dry-run report shows target audience match counts in line with expectations.
- Decision logic has a single entry point shared by the page and checkout.
- Monitoring and alerting cover the “should be live but isn’t” semantics.
- Rollback scripts and the compensation plan are ready and have been rehearsed.
- The public announcement is generated from configuration, with time points synced automatically.
The hard part of a promotion was never the discount. It is keeping promise and implementation consistent under high concurrency, multiple regions, and multiple audiences. Make the campaign configuration-driven, the decision single-entry, the rollout controllable, and anomalies observable, and the price and rules a user sees on any given refresh will be exactly right.
