Skip to content

EAS replica setup

A full clone of EAS's enterprise + 5 shops inside Avoca prod, used as a sandbox for prompt-variant testing and other experimental changes without touching real EAS customer data.

Procedure for the actual create-enterprise-and-shops flow lives in Create an enterprise and shops. This page captures the EAS-replica-specific decisions: naming conventions, which shops to mirror, CRM-mapping options, and current provisioning state.

Why a replica

Prompt iteration on EAS is dangerous against real customer traffic. Even with tool-call mocks, the assistant is the same one customers reach, and prompt edits ship to that real assistant. The replica is a parallel surface:

  • Same Avoca prod environment (same Vapi org, Supabase, Inngest, Datadog, Hamming) — architecture is identical.
  • New enterprise tagged for testing, owned by us.
  • One sub-team per EAS shop (5 total), each with its own voice assistant, prompt, blueprint, tool config.
  • Cloned from EAS's current state at setup time, then evolves independently.

When testing a prompt change at scale (Surface 1 A/B eval), push the variant to the replica enterprise, run Hamming against the replica, observe results, never touch real EAS until the variant is proven.

Naming convention

  • Enterprise: test-EAS.
  • Sub-teams: TEST - EAS - <Shop Name> (e.g., TEST - EAS - South Park). Mirrors the real shop name with a TEST - EAS - prefix so the test rows are grep-able and unmistakable.

Shops to mirror

From next/apps/web/lib/autoops/shop-routing.json:

  • EAS South Park
  • EAS Platte Canyon
  • EAS Chatfield
  • cl_eeacf0355fb34b15b84aaf352fca7244 = EAS - Ponderosa (team 2678, enabled autoops_team_configs row; confirmed against prod DB 2026-06-10).
  • Two additional shops at AutoOps client IDs cl_0a0d7384aca74d0ab1c04f9fe0dd70dc, cl_77e50c4aeea7496790ca45699d8633d8 — names to confirm.

CRM mapping

Original decision (2026-05-20) deferred AutoOps mapping (path A: mocks only). Superseded 2026-06-11: the replica teams now carry real EAS client mappings (path B, deliberately) so the replica can create real appointments when needed.

PathUse when
A. Skip AutoOps entirely; rely on tool-call mocksOriginal default. Mock-driven testing doesn't need real AutoOps.
B. Use real EAS client_idsCurrent state (2026-06-11). Enables real appointment creation from replica teams. Prod-tenant test discipline applies: only touch jobs you create.
C. Get test client_ids from AutoOps via Katie + insert rows manuallyIf/when Katie provisions a test tenant, migrate the rows to it for full isolation.

Implementation: autoops_credentials row id 2 for enterprise 142 (same encrypted api_key as EAS's row id 1 — the table is unique per enterprise, which also satisfies autoops_team_configs' unique (credential_id, client_id)). Five autoops_team_configs rows copy each prod mirror's client_id/client_name/client_key/time_zone. Safe to share client_ids across prod + TEST teams: all code paths resolve team_id → config; nothing reverse-looks-up by client_id (verified 2026-06-11).

Tool-call mocks still intercept first when a mock matches; the live client is the fallthrough.

Current provisioning state

  • Enterprise test-EAS — enterprise_id 142.
  • All five sub-teams provisioned, each with an enabled autoops_team_configs row (credential_id 2) pointing at its prod mirror's AutoOps client:
TEST teamteam_idMirrors (ent 117)AutoOps client
[TEST] - EAS - South Park2970EAS - South Park (2819)cl_e019c08b... South Park Tire & Auto Center
[TEST] - EAS - Chatfield2976EAS - Chatfield (2815)cl_b5b5123b... EAS Tire & Auto - Chatfield
[TEST] - EAS - Platte Canyon2977EAS - Platte (2817)cl_25f8cdcc... EAS Tire & Auto - Platte Canyon
[TEST] - EAS - Crestline2984EAS - Crestline (2816)cl_0a0d7384... EAS Tire & Auto - Crestline
[TEST] - EAS - Quebec2991EAS - Centennial (2818)cl_77e50c4a... EAS Tire & Auto - Centennial

Note the naming mismatch on the last row: the replica shop is named Quebec but mirrors prod's Centennial.

Relationship to other plans

  • hamming-test-setup (Surface 2 regression test): runs against real EAS with tool-call mocks. Replica not required.
  • Future A/B-at-scale eval plan (Surface 1): runs against the replica. Replica IS required.
  • This eas-replica-setup plan: precondition for the A/B plan. Opens after hamming-test-setup ships.

Open questions

  • Does Avoca's customer-onboarding flow support spinning up an "internal test" enterprise without going through full enterprise sales gating? Or is this a manual database-level op for Kareem?
  • Does the replica share Vapi phone numbers (separate pool?) or do we provision new ones per shop? (Likely the latter — see Create an enterprise and shops, Step 5.)
  • Cost: 5 shops × 2 numbers (inbound + test) ≈ ~$10/mo recurring Twilio. Worth confirming Avoca-side who absorbs replica phone costs.

Discipline

  • Keep the replica in sync with real EAS as the real one evolves, OR explicitly declare "replica is a snapshot, not a mirror." (Pending decision.)
  • Test pollution: even with mocks, calls to the replica generate calls rows. Tag them so the production change-log / observability dashboards filter them out.