LeadRefinery — How the Platform Works

Rehearsals

Traced at commit ffe4e48 · apps/dry-run-api/* · libs/temporal/src/activities/campaign-dry-run.ts · libs/temporal/src/activities/dial-gate.ts

Summary

  1. A rehearsal runs the real platform code.
  2. The same workflow starts. The same gate checks run. The platform writes the same tables.
  3. A local service impersonates the providers.
  4. A local service answers as the voice provider, the carrier and the language model.
  5. The service returns the same message shapes and signs them the same way.
  6. The platform cannot tell the difference. This is the purpose of a rehearsal.
  7. Every row a rehearsal writes carries dry_run = true.
  8. A rehearsal proves the plumbing. It does not prove the conversation.
A rehearsal runs the real platform code. The same workflow starts, the same safety gate checks run, the same signatures are verified, the same outcome resolution runs and the same tables are written, with every row marked as a rehearsal. The one gate exception is that the safety breaker is skipped, because otherwise nothing could be tested while a breaker is open. Only the providers are impersonated by a local service that returns the same message shapes. No phone rings. Four things a rehearsal cannot test are listed: real speech, real network conditions, the provider concurrency limit, and real billing.
The real path against impersonated providers.

What is identical to a real call

  1. The worker starts the same workflow. A rehearsal uses no separate code path.
  2. The safety gate runs the same 13 checks.
  3. The impersonated providers sign their messages. The platform verifies those signatures normally.
  4. The messages use the same de-duplication keys.
  5. The same outcome resolution runs, in the same order.
  6. The platform writes the same tables.

The one exception in the gate

  1. Check 13 is the safety breaker.
  2. A rehearsal skips check 13.
  3. Without the exception, a rehearsal cannot test anything while a breaker is open.
  4. A breaker has been open since 4 September.
  5. The platform records breakerBypassedForDryRun on the attempt.
  6. A rehearsal can therefore never be mistaken for a live dial that passed the breaker.

What a rehearsal cannot test

  1. Real speech. A rehearsal has no audio, no accents and no background noise.
  2. Real network conditions. A rehearsal has no jitter and no packet loss.
  3. The provider concurrency limit. The impersonator has no limit.
  4. Rehearsals therefore reach 1,625% of the real ceiling of 20 concurrent calls.
  5. Real billing. The price per second is a constant in the simulator.
  6. No invoice ever arrives, so nothing can disagree with the platform record.

Read every current figure with this in mind. The platform has placed 4 real dials in total. Every other number on every dashboard comes from rehearsal traffic. Each one carries a label that says so.

Deployment pipeline — a rehearsal is the gate a change must pass before it can reach production.