Part of #118.
No integration test drives a multi-round gateway streaming loop and asserts the client-visible frame sequence — the loop tests in dispatch_loop_cassette_test.rs are non-streaming, and the one streaming case is single-round. The defects in the sibling sub-issues all ship unnoticed because of this.
Add cassette-backed streaming tests asserting the exact client frame stream across ≥2 gateway rounds:
- exactly one
response.created / lifecycle envelope
- monotonic
sequence_number (incl. synthetic + terminal frames)
- contiguous
output_index
- no
<think> in output_text
- interleaved
thinking + tool_use in one turn
These lock the behavior the other sub-issues fix and guard against regression.
Part of #118.
No integration test drives a multi-round gateway streaming loop and asserts the client-visible frame sequence — the loop tests in
dispatch_loop_cassette_test.rsare non-streaming, and the one streaming case is single-round. The defects in the sibling sub-issues all ship unnoticed because of this.Add cassette-backed streaming tests asserting the exact client frame stream across ≥2 gateway rounds:
response.created/ lifecycle envelopesequence_number(incl. synthetic + terminal frames)output_index<think>inoutput_textthinking+tool_usein one turnThese lock the behavior the other sub-issues fix and guard against regression.