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_PLATFORMPLATFORM_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:
- Should Sales use a read-only Platform database URL on the Render worker, or should Platform mirror/expose
platform.dispatcher_eventinto the shared domains database? - If the URL shape is the intended path, please confirm the least-privilege credential/scope Sales should use for
intake.matchedreads. - Please confirm whether the table should be read as
public.dispatcher_eventon 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.mdhandoff events: Growth emitsintake.captured, Platform emitsintake.matched, Sales opens and attaches Leads.- Sales worker command:
npm run worker:intake.