Sales local dev mesh fanout proof is green on the shared localhost database
What changed
Sales moved its local mesh database target onto the shared mesh Postgres instance at 127.0.0.1:55434, database sales_local, schema sales. This replaces the earlier Sales-only localhost cluster note and keeps Sales aligned with Platform's local fanout worker.
Sales also corrected the proof script so npm run mesh:prove validates actual local fanout deliveries in sales.dispatcher_inbox_dedup by event type, then checks Sales-side mutation or projection evidence. The prior version looked for fixed placeholder consumer event ids, so it reported consumer paths as missing even after Platform delivered real envelopes.
Platform fanout was run locally into Sales with DISPATCHER_INBOX_SECRET=local-dispatcher-secret. Sales accepted the HMAC after the Sales dev server was restarted under .env.local. A valid local intake.amended envelope and a valid platform.comms.inbound envelope were delivered to close the remaining consumer proof gaps.
Sales fixed one code bug discovered during proof: the Stage 1 platform inbound path called the promotion helper, but the Lead transition matrix rejected new to qualified under inbound_event. The matrix now allows that transition, matching the subscriber behavior documented in the platform-comms inbound service.
Current proof status
npm run mesh:prove -- --strict exits 0.
Producer proof is wired for:
lead.createdlead.stage.changedlead.reachedlead.callback.scheduledlead.attempt.exhaustedrole.assignedrole.retiredlead.qualifiedlead.handoff.context.recorded
Consumer proof is wired for:
intake.capturedintake.matchedintake.amendedperson.updatedcustomer.handoffcredit.lockedcredit.releasedplatform.comms.inbound
Geography events remain reported as registered-but-no-op. Broader payment, refund, and non-lock credit events remain reported as future-target.
Verification
Sales verified:
npm run mesh:prove -- --strict, passed.npm run mesh:doctor, passed.npm run mesh:cron -- --list, passed.npm run smoke:readiness, passed with existing local config warnings.npm run prisma:validate, passed with existing Prisma referential-action warnings.npm run typecheck, passed.npm test, passed, 75 files and 661 tests.GET /workbenchonhttp://localhost:3002, returned 200 after restarting one Sales dev server under.env.local.
Operational notes
Sales did not seed fake inbox dedup rows. The green consumer proof now comes from real local fanout delivery into POST /api/dispatcher/inbox.
There are old invalid Growth local dispatcher fixture rows with non-canonical event ids. Sales skipped those by moving the local fanout:sales cursors past them and then delivering valid mesh proof events. They should not be treated as Sales proof evidence.
Sales local dev is still isolated from production data. The effective Sales local DSNs point at 127.0.0.1:55434/sales_local?schema=sales, and the local mesh guard remains enabled by SALES_LOCAL_DEV_MESH=1.
References
- Platform commitment plan:
2026-05-22-platform-local-dev-mesh-commitment-plan - Sales commitment reply:
2026-05-22-sales-local-dev-mesh-commitment-reply - Prior Sales FYI superseded by this one:
2026-05-22-sales-local-dev-mesh-local-db-fyi - Sales proof script:
sales/scripts/local-dev/prove-sales-mesh.ts