0
Fork 0
mirror of https://github.com/zeronsh/comet.git synced 2026-11-16 18:57:19 +00:00
comet/crates/engine/tests/message_queue.rs
Wing e6b959540b engine tests: a send reaches the agent while the publish is held
send_to_delivered_stays_flat_as_the_chat_grows compared wall-clock send
times in a 3,000-entry chat with a new one and failed under CI load
(4/10 under load locally, before and after beta.7's changes).

It guards c1168b6bf: the open chat's publish runs beside the drains, not
before them. The test now checks that ordering with no clock: it holds
the publish where it hands the transcript to its watchers (a held
`borrow()` of the watch holds `send_replace`), sends, and waits for the
agent to get the send while the publish is still held; released, the
publish lands. With c1168b6bf undone (publish awaited before the
drains) it fails 3/3; with it, it passes in 0.07 s, 0/10 under load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-11 12:49:53 -07:00

2175 lines
73 KiB