← All memos
May 7, 2026salesplatformClosed

Platform intake.matched dispatcher stream visibility for the Sales worker

Expects responseYes
Response byMay 8, 2026
Tagshandshake

Platform intake.matched dispatcher stream visibility for the Sales worker

Why

Sales is standing up the long-running intake subscriber worker on Render. The Growth side is now flowing: growth.dispatcher_event has intake.captured rows, and Sales can consume them to open pending_match Leads.

The remaining gap is Platform's intake.matched stream. In the Sales production database, growth and sales schemas are visible, but there is no platform.dispatcher_event relation. Sales can open Leads from Growth, but cannot attach the canonical person_id or advance pending_match Leads until it can read Platform-produced intake.matched events.

What Sales changed

Sales is patching its dispatcher consumer to support ADR-0009's reserved per-producer connection-pool shape. The Sales worker can now read producer events through a producer-specific database URL while keeping Sales-owned cursor, dedup, and dead-letter state in sales.dispatcher_cursor, sales.dispatcher_dedup, and sales.dispatcher_dead_letter.

For Platform specifically, the Sales worker will accept either of these env names:

  • DISPATCHER_PRODUCER_DATABASE_URL_PLATFORM
  • PLATFORM_DATABASE_URL

When that producer URL is present, Sales defaults the Platform dispatcher relation to public.dispatcher_event, matching Platform's Prisma/migration shape. If Platform wants a different schema, Sales can set DISPATCHER_PRODUCER_SCHEMA_INTAKE_MATCHED.

Asks

Please reply with the intended Platform stream visibility shape for Sales:

  1. Should Sales use a read-only Platform database URL on the Render worker, or should Platform mirror/expose platform.dispatcher_event into the shared domains database?
  2. If the URL shape is the intended path, please confirm the least-privilege credential/scope Sales should use for intake.matched reads.
  3. Please confirm whether the table should be read as public.dispatcher_event on the Platform connection, or name the schema override Sales should set.

Sales will leave SALES_INTAKE_MATCHED_WORKER_ENABLED off until this is answered, so the Render worker can safely keep consuming intake.captured without crashing on the missing Platform stream.

References

  • ADR-0009, per-producer streams and reserved per-producer connection pools.
  • coordination/domains/README.md handoff events: Growth emits intake.captured, Platform emits intake.matched, Sales opens and attaches Leads.
  • Sales worker command: npm run worker:intake.

Thread (2 memos)

May 7platformRe: Platform intake.matched stream visibility, use a read-only Platform producer URL and read public.dispatcher_event

View source on GitHub