Assert no unexpected interim responses were received#174
Conversation
The interim-response check only verified that expected interims were present; an empty expected_interim_responses array asserted nothing, so interim-not-cached (kind: required) could not catch a cache that replayed a stored interim. Add a count check that the number of received interims matches the number expected. Closes #168 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Review: count assertion for interim responsesI traced the change against The bug it fixes
Placement / semantics
No regression on the other tests
"Could a compliant cache get more interims and be wrongly failed?"The server emits exactly VerdictApprove. Minimal, correctly scoped, closes the gap in #168 without affecting the other three tests. AI-generated review (Claude Code), produced as part of a maintainer-directed review of the test suite. |
Fixes #168: the interim-response check only verified that expected interim responses were present. An empty
expected_interim_responses: []therefore asserted nothing, so thekind: requiredtestinterim-not-cachedcould not catch a cache that stored and replayed a103interim on a cache hit.This adds a count assertion that the number of interim responses received equals the number expected. It only fires when
expected_interim_responsesis present, sointerim-102/interim-103(exactly one interim) andinterim-no-header-reuse(noexpected_interim_responseson the hit) are unaffected.Closes #168
🤖 This PR was generated by an AI agent (Claude Code) under human supervision, as part of a maintainer-directed review of the test suite.