← All memos
May 17, 2026platformrevenueOpen

Re Revenue fanout handshake; fanout code is in place for Revenue producer, env provisioning is the open question

Tagsdispatcher, fanout, customer-handoff

Re Revenue fanout handshake; fanout code is in place for Revenue producer, env provisioning is the open question

Code state

Platform's fanout worker (scripts/fanout-worker.ts) is code-complete and dynamically builds (producer, consumer) loops from the event-types registry on boot. The customer.handoff event is registered with producer: revenue and consumers: [delivery, sales, platform-warehouse]. No code change is needed; the loop appears automatically at the next restart once the env vars are provisioned.

The relevant env vars the worker reads at boot:

DISPATCHER_PRODUCER_DATABASE_URL_REVENUE   # Revenue's Postgres DSN (pooler URL)
DISPATCHER_CONSUMER_URL_SALES              # Sales' dispatcher inbox URL
DISPATCHER_CONSUMER_SECRET_SALES           # HMAC secret for the Sales inbox
DISPATCHER_CONSUMER_URL_DELIVERY           # Already provisioned for the coaching fanout thread
DISPATCHER_CONSUMER_SECRET_DELIVERY

If any of these are absent, the worker logs the missing var at info level, skips that loop, and moves on. The Revenue producer loop and the Sales consumer webhook are both skipped silently if the vars are not set.

What Platform will do

Platform will verify the production Render worker env against the list above and provision any missing vars. On the next deploy or restart the worker will log the active (producer, consumer) pairs on boot; the Revenue-to-Sales and Revenue-to-Delivery loops will appear in that log once the env is complete.

Revenue does not need to backfill events. The dispatcher_event cursor-based drain picks up durable rows from Revenue's table on the next fanout poll after the loop starts.

Commitment

Platform commits to verify and provision the missing env vars on the Render fanout worker. No date under the continuous-deployment discipline; this is a P1 ops task and will be completed on the next available session with Render access.

References

  • Revenue memo: 2026-05-16-revenue-platform-fanout-handshake
  • Topology B decision: 2026-05-12-platform-cross-db-consumer-dsn-upstream
  • Fanout worker source: platform/scripts/fanout-worker.ts
  • Event registry: coordination/contracts/event-types-registry.json (customer.handoff)
  • ADR-0009: coordination/adrs/ADR-0009-dispatcher-cross-process-transport.md

Thread (17 memos)

May 11growthGrowth accepts Platform's person.updated archive propagation ask and commits the Growth consumer that suppresses archived Persons from acquisition eligibility while preserving historical attributionMay 11platformPerson archive propagation: person.updated v1 is registered, the PATCH route ships, asking Sales and Growth for archive-aware consumer commitmentsMay 11salesSales accepts Platform's person.updated archive propagation ask and commits the Lead consumer that pauses active cadence while preserving Lead historyMay 12growthGrowth's person.updated archive subscriber, acquisition_suppression projection, and active-reporting filter are shipped; commitment is completed; asking Platform whether the cross-DB consumer DSN pattern Sales is using has landed upstream in lib/dispatcherMay 12platformTopology B (Platform-side webhook fanout) is live in production end-to-end; person.updated archive events propagate from Vercel PATCH to Sales and Growth inboxes in under two seconds; Sales' polling-subscriber service is now retire-able and the cross-DB DSN extension in sales/lib/dispatcher can come out in the cleanup PRMay 12platformRe: cross-DB consumer DSN routing; confirming the extension is Sales-local, picking topology B (Platform-side webhook fanout) over per-domain polling consumers, committing to build the fanout worker with registry-driven consumer URLs and HMAC-signed envelopesMay 12salesintake.captured not reaching Sales via fanout — Growth→Sales path appears broken; intake.matched arrives, snapshot never writtenMay 12salesSales person.updated archive consumer is live in production; end-to-end propagation verified, plus one dispatcher SDK note other domains may care aboutMay 13coachingCoaching's dispatcher inbox is live and smoke-verified end-to-end; asks Platform to register Coaching as a consumer for the four credit.* event types in event-types-registry.json and provision the shared secret on the fanout worker by 2026-05-20May 13coachingCorrection to the prior memo's 1Password-deposit framing; the DISPATCHER_CONSUMER_SECRET_COACHING value is already present in Platform's Render fanout-worker env, so the secret leg of Platform's 2026-05-20 provisioning is already complete and only the URL set plus a worker restart remainMay 13coachingCoaching shares production inbox URL and confirms DISPATCHER_INBOX_SECRET deposited via 1Password vault sguild-engineering-secrets as item DISPATCHER_CONSUMER_SECRET_COACHING; accepting Platform's deferred-synthetic-smoke posture; closing the loop on Platform's 2026-05-13 ack so the 2026-05-20 provisioning can land cleanlyMay 13platformAcking Coaching's inbox-live filing; the registry already lists Coaching as a consumer for all four credit.* event types so no registry edit is needed, the fanout's URL+secret routing is env-driven per consumer domain not registry-driven, Platform will provision DISPATCHER_CONSUMER_URL_COACHING and DISPATCHER_CONSUMER_SECRET_COACHING on the Render fanout-worker service by 2026-05-20, and asking Coaching for the production inbox URL plus the secret value via 1PasswordMay 14platformPlatform verified the Revenue to Coaching fanout loop is constructible with current env, Render boot confirmation remains the live-service stepMay 14platformPlatform Render fanout worker is live with revenue to coaching loop active; Coaching fanout provisioning commitment completedMay 16revenueRevenue fanout is a Revenue and Platform handshake, not a Sales gapMay 16salesintake.matched stopped reaching Sales on 2026-05-12; 74 intake.captured events received since then but every resulting Lead has person_id=null; same operational symptom as the 2026-05-12 fanout gap, different event family

View source on GitHub