Skip to content

Commit 91ae0ad

Browse files
committed
Keep stdio_client strict-no-cover in sync with exercised behavior
The malformed-UTF8 regression test now executes the JSON-parse failure branch in stdio_client, so the old pragma no longer reflects reality and breaks CI's strict-no-cover gate. This follow-up removes the stale pragma without changing behavior. Constraint: Must not widen the PR scope beyond the already-proposed stdio robustness fix Rejected: Suppress strict-no-cover or weaken the regression test | hides real coverage drift instead of correcting it Confidence: high Scope-risk: narrow Reversibility: clean Directive: When adding malformed-input regression tests, re-audit nearby no-cover pragmas immediately Tested: coverage run of tests/client/test_stdio.py plus strict-no-cover locally up to the updated branch execution path Not-tested: Full upstream CI rerun after push
1 parent f474aa7 commit 91ae0ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mcp/client/stdio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ async def stdout_reader():
151151
for line in lines:
152152
try:
153153
message = types.jsonrpc_message_adapter.validate_json(line, by_name=False)
154-
except Exception as exc: # pragma: no cover
154+
except Exception as exc:
155155
logger.exception("Failed to parse JSONRPC message from server")
156156
await read_stream_writer.send(exc)
157157
continue

0 commit comments

Comments
 (0)