{"record":{"id":"98424348e10a1f77","repo":"cloudflare/quiche","slug":"expected-stream-send-on-stream-to-fail-with-984243","errorCode":null,"errorMessage":"Expected stream_send on stream {} to fail with {:?}, got {:?}","messagePattern":"Expected stream_send on stream (.+?) to fail with (.+?), got (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"h3i/src/client/mod.rs","lineNumber":142,"sourceCode":"                Ok(actual_bytes) if actual_bytes == *expected_bytes => {},\n                Ok(actual_bytes) => panic!(\n                    \"Expected stream_send on stream {} to write {} bytes, got {}\",\n                    stream_id, expected_bytes, actual_bytes\n                ),\n                Err(err) => panic!(\n                    \"Expected stream_send on stream {} to write {} bytes, got error: {:?}\",\n                    stream_id, expected_bytes, err\n                ),\n            }\n        },\n        ExpectedStreamSendResult::Error(expected_err) => {\n            match result {\n                Ok(written) => panic!(\n                    \"Expected stream_send on stream {} to fail with {:?}, but wrote {} bytes\",\n                    stream_id, expected_err, written\n                ),\n                Err(actual_err) if &actual_err == expected_err => {},\n                Err(actual_err) => panic!(\n                    \"Expected stream_send on stream {} to fail with {:?}, got {:?}\",\n                    stream_id, expected_err, actual_err\n                ),\n            }\n        },\n    }\n}\n\npub(crate) fn execute_action<F: quiche::BufFactory>(\n    action: &Action, conn: &mut quiche::Connection<F>,\n    stream_parsers: &mut StreamParserMap,\n) {\n    match action {\n        Action::SendFrame {\n            stream_id,\n            fin_stream,\n            frame,\n            expected_result,","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/cloudflare/quiche/blob/9f96daa2c22a4468b0036fb0a0a3894eee6498b8/h3i/src/client/mod.rs#L124-L160","documentation":"h3i panics when a script expected stream_send to fail with one specific error but a different error was returned. The stream did fail, just not with the anticipated quiche::h3::Error variant, so the negative assertion is too narrow. This is a test-expectation mismatch, typically after protocol or quiche version changes.","triggerScenarios":"ExecuteAction with ExpectedStreamSendResult::Error(e) where stream_send returns Err(actual) and actual != e (e.g. FlowControl instead of StreamStopped).","commonSituations":"quiche error-enum variants changed between versions; the same failure surfaces through a different error path (connection-level vs stream-level); script reused against a server behaving slightly differently.","solutions":["Read the actual error in the panic message and update the expected error to match reality if the new behavior is correct.","Loosen the assertion logic in your harness if any error variant is acceptable for this scenario.","Confirm which quiche version the script targets and pin it, or migrate expected variants to the new enum values."],"exampleFix":"// before\nExpectedStreamSendResult::Error(quiche::h3::Error::StreamStopped),\n// after\nExpectedStreamSendResult::Error(quiche::h3::Error::FlowControl),","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin the quiche version scripts were written against, or update expected error variants on upgrade.","Keep a mapping of scenario -> expected error and re-verify after protocol changes."],"tags":["h3i","stream-send","assertion","error-mismatch"],"backgroundTag":"invalid-enum-value","analyzedSha":"9f96daa2c22a4468b0036fb0a0a3894eee6498b8","analyzedAt":"2026-09-08T11:27:09.536Z","contentChangedAt":"2026-09-08T11:27:09.536Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}