What's new
- Worker dispatch concurrency knob:
WORKER_DISPATCH_CONCURRENCYenv (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_RECEIVEDbroadcasts 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
buildMessageFromRealtimeRecordreconstructs a non-nullMessagefrom it. A future rename likedirection→dirwill 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.