Reproduction
DatabaseRuntimeEventStream checks Run delivery settlement after each limited
event page. If a full page contains a terminal event and the Run is already
settled, the generator returns even when a delivery event is on the next page.
Minimal case with batch_size=2:
- Persist
status_changed, run_completed, delivery_succeeded in order.
- The stored Run delivery status is
delivered.
- Stream the Run. Only the first two events are yielded.
stream_web_chat_run raises runtime_stream_ended_without_delivery instead
of loading the delivered message and publishing done.
The same boundary exists with the default 100-row page and with failed/cancelled
Runs or failed delivery. Full backlog pages also wait the idle poll interval.
Nine new regression cases fail against main, including the real Web Chat
adapter. Draining full pages before closure fixes them without changing the
existing short-page, cursor, tenant or delivery contracts.
Reproduction
DatabaseRuntimeEventStreamchecks Run delivery settlement after each limitedevent page. If a full page contains a terminal event and the Run is already
settled, the generator returns even when a delivery event is on the next page.
Minimal case with
batch_size=2:status_changed,run_completed,delivery_succeededin order.delivered.stream_web_chat_runraisesruntime_stream_ended_without_deliveryinsteadof loading the delivered message and publishing
done.The same boundary exists with the default 100-row page and with failed/cancelled
Runs or failed delivery. Full backlog pages also wait the idle poll interval.
Nine new regression cases fail against main, including the real Web Chat
adapter. Draining full pages before closure fixes them without changing the
existing short-page, cursor, tenant or delivery contracts.