Commit 65f03fe
committed
Filter Windows PTY cursor sequences
Review finding: The Windows Python backend now emits raw ConPTY cursor-control sequences in normal replies, breaking an existing Python backend test and polluting user-visible output.
Review comment: - [P1] Strip ConPTY cursor-control bytes from Python output C:\Users\kalin\Documents\GitHub\mcp-repl\src\worker_process.rs:7337-7339 When the Windows PTY path is used, this raw reader forwards VT control sequences emitted by ConPTY (e.g. \u001b[?25l\u001b[15;1H\u001b[?25h) directly into MCP replies; a simple Python reply now includes these bytes and python_backend_runs_inside_mcp_repl_worker fails on Windows. Please filter/suppress the ConPTY screen-control traffic before appending stdout, otherwise Windows Python sessions leak terminal escape codes to clients.
Response: Added a Windows PTY output filter that strips ConPTY screen-control CSI sequences before append_raw_text, including split sequences, while preserving SGR sequences. Added regression assertions in python_backend_runs_inside_mcp_repl_worker and unit coverage for split ConPTY cursor sequences.1 parent a100aaf commit 65f03fe
2 files changed
Lines changed: 110 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7323 | 7323 | | |
7324 | 7324 | | |
7325 | 7325 | | |
| 7326 | + | |
| 7327 | + | |
| 7328 | + | |
| 7329 | + | |
| 7330 | + | |
| 7331 | + | |
| 7332 | + | |
| 7333 | + | |
| 7334 | + | |
| 7335 | + | |
| 7336 | + | |
| 7337 | + | |
| 7338 | + | |
| 7339 | + | |
| 7340 | + | |
| 7341 | + | |
| 7342 | + | |
| 7343 | + | |
| 7344 | + | |
| 7345 | + | |
| 7346 | + | |
| 7347 | + | |
| 7348 | + | |
| 7349 | + | |
| 7350 | + | |
| 7351 | + | |
| 7352 | + | |
| 7353 | + | |
| 7354 | + | |
| 7355 | + | |
| 7356 | + | |
| 7357 | + | |
| 7358 | + | |
| 7359 | + | |
| 7360 | + | |
| 7361 | + | |
| 7362 | + | |
| 7363 | + | |
| 7364 | + | |
| 7365 | + | |
| 7366 | + | |
| 7367 | + | |
| 7368 | + | |
| 7369 | + | |
| 7370 | + | |
| 7371 | + | |
| 7372 | + | |
| 7373 | + | |
| 7374 | + | |
| 7375 | + | |
| 7376 | + | |
| 7377 | + | |
| 7378 | + | |
| 7379 | + | |
| 7380 | + | |
| 7381 | + | |
| 7382 | + | |
| 7383 | + | |
| 7384 | + | |
| 7385 | + | |
| 7386 | + | |
| 7387 | + | |
| 7388 | + | |
| 7389 | + | |
| 7390 | + | |
| 7391 | + | |
| 7392 | + | |
| 7393 | + | |
| 7394 | + | |
| 7395 | + | |
| 7396 | + | |
| 7397 | + | |
| 7398 | + | |
| 7399 | + | |
| 7400 | + | |
| 7401 | + | |
| 7402 | + | |
| 7403 | + | |
| 7404 | + | |
| 7405 | + | |
7326 | 7406 | | |
7327 | 7407 | | |
7328 | 7408 | | |
| |||
7339 | 7419 | | |
7340 | 7420 | | |
7341 | 7421 | | |
| 7422 | + | |
7342 | 7423 | | |
7343 | 7424 | | |
7344 | 7425 | | |
7345 | | - | |
| 7426 | + | |
| 7427 | + | |
| 7428 | + | |
| 7429 | + | |
| 7430 | + | |
| 7431 | + | |
7346 | 7432 | | |
7347 | 7433 | | |
7348 | 7434 | | |
| |||
8124 | 8210 | | |
8125 | 8211 | | |
8126 | 8212 | | |
| 8213 | + | |
| 8214 | + | |
| 8215 | + | |
| 8216 | + | |
| 8217 | + | |
| 8218 | + | |
| 8219 | + | |
| 8220 | + | |
| 8221 | + | |
| 8222 | + | |
| 8223 | + | |
| 8224 | + | |
| 8225 | + | |
| 8226 | + | |
| 8227 | + | |
| 8228 | + | |
| 8229 | + | |
| 8230 | + | |
| 8231 | + | |
8127 | 8232 | | |
8128 | 8233 | | |
8129 | 8234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
779 | 779 | | |
780 | 780 | | |
781 | 781 | | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
782 | 786 | | |
783 | 787 | | |
784 | 788 | | |
| |||
0 commit comments