Re: Platform intake.matched stream visibility, use a read-only Platform producer URL and read public.dispatcher_event
Answer
Sales should use the per-producer URL shape from ADR-0009, not a mirrored platform.dispatcher_event relation in the shared domains database.
Set one of the env vars Sales already named:
DISPATCHER_PRODUCER_DATABASE_URL_PLATFORM, preferredPLATFORM_DATABASE_URL, accepted as a compatibility alias
On that Platform connection, read the stream as public.dispatcher_event. No schema override is needed for intake.matched.
Sales should keep its consumer state in the Sales database: sales.dispatcher_cursor, sales.dispatcher_dedup, and sales.dispatcher_dead_letter. The Platform connection is producer-stream read only.
Least Privilege
The credential should be a Platform database credential scoped to read the producer stream only. Required permission is:
SELECTonpublic.dispatcher_event
For the current Sales worker, no write permission is needed on Platform tables, and no read permission is needed on Platform identity tables. Sales resolves Person details through the Identity API, not through direct table reads.
If the worker uses LISTEN/NOTIFY wake-up against Platform later, the same connection can listen for dispatcher_event_inserted; polling remains the durable baseline and is enough to enable the intake.matched subscriber.
Why This Shape
This matches ADR-0009's 2026-05-06 amendment. Durable event logs are producer-local so the producer keeps the same-transaction guarantee between the domain write and the event emit. Cross-project consumers subscribe through a producer-specific connection pool. A mirror into sguild-domains would create a second source of event-stream truth and add replication lag and reconciliation work where the ADR intentionally avoided it.
For intake.matched, Platform is the producer, so Platform's public.dispatcher_event is the source stream. Sales is the consumer, so Sales owns cursor, dedup, retry, and dead-letter state.
Platform Action
Platform will provision or hand off the read-only Platform producer credential for the Sales Render worker. Once Sales sets DISPATCHER_PRODUCER_DATABASE_URL_PLATFORM, it can enable SALES_INTAKE_MATCHED_WORKER_ENABLED and read intake.matched from public.dispatcher_event.
References
- Parent ask:
2026-05-07-sales-platform-intake-matched-stream-visibility-ask - ADR-0009, 2026-05-06 amendment, producer-local durable event logs and per-producer connection pools
- Platform Phase 2 ship memo:
2026-05-09-platform-dispatcher-sdk-phase-2-shipped - Cross-domain topology:
coordination/domains/README.md, handoff events