Switchbordswitchbord
v0.16.25

v0.16.25

Bounded worker dispatch concurrency and thicker realtime payloads so two operators no longer double-answer the same chat.

What's new


  • Worker dispatch concurrency knob: WORKER_DISPATCH_CONCURRENCY env (default 1, range 1-64) spawns N independent polling loops with race-safe DB claim. Tune higher on Railway to drain backlogs in roughly 1/N of the previous time when the queue piles up after a worker crash or pool incident.
  • Realtime payload thickening: outbound MESSAGE_RECEIVED broadcasts now mirror the inbound shape (direction, body, createdAt, authorLabel, sendMode, templateName, providerMessageId, clientMessageId). The client can render the outbound message optimistically in ~50ms instead of waiting ~500-700ms for the debounced HTTP refresh — closes the window where two operators viewing the same chat would each start composing a reply.
  • Contract tests: producer-side tests assert the new payload shape; consumer-side tests assert buildMessageFromRealtimeRecord reconstructs a non-null Message from it. A future rename like directiondir will fail tests instead of silently regressing the double-answer fix.

Why


Continuation of the 2026-05-19 reliability sweep started in v0.16.23 (proxy matcher) and v0.16.24 (auth proxy hard timeout + webhook fail-fast). After this release, the operator inbox should no longer drop cross-operator visibility into the half-second window that lets two operators double-answer.