Files
npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7andWill Pfleger 7d3b782ac8 test(agent): add chunk-emission, Auto→Responses upgrade, and config validation tests
StreamEmitter::test_channel() helper: returns a live mpsc receiver so
tests can assert which agent_message_chunk messages were emitted, unlike
noop() which drops the receiver.

Chunk-emission (2 tests): verify one chunk per text delta with correct
content, and that empty/absent text emits nothing.

Auto→Responses upgrade (2 tests): verify that Auto mode retries on
/responses when /chat/completions returns a 400 with an
is_responses_required body, and that the sticky auto_upgraded flag
causes subsequent calls to skip /chat/completions entirely. Both tests
assert which paths the fake server saw — the discriminating assertion
per Thufir's review.

Config validation (2 tests): stream_chunk_timeout=0 and
llm_body_chunk_timeout=0 both rejected with the documented error message.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-06-10 15:25:06 -04:00
..