-
fix: update shell test command for windows compatibility (#1755)
发布于
2026-05-09 22:49:31 +00:00 -
fix: update shell test command for windows compatibility
-
fix: satisfy mypy on Windows for agents probe, lifecycle, REPL menus
- Resolve psutil.Process.num_fds via getattr so win32 platform checks pass
- Use getattr(signal, "SIGKILL", SIGTERM) for terminate escalation on Windows
- Annotate POSIX termios/tty key reader with targeted ignores and cast
Validates: mypy app/ --platform win32, make lint, make test-cov
Co-authored-by: Cursor cursoragent@cursor.com- test(agents): skip POSIX signal lifecycle tests on Windows
Spawning Python children that rely on SIGTERM handlers plus os.kill
escalation matches POSIX; on win32 the same tests can hang and surface
as KeyboardInterrupt under pytest-xdist.Co-authored-by: Cursor cursoragent@cursor.com
- fix(cli): Windows CI for streaming, lifecycle probe, and history CRLF
- stream_to_console: import win32 NoConsoleScreenBufferError only on win32;
use Rich Live without patch_stdout for non-tty targets (StringIO, GHA);
keep patch_stdout for real TTYs; fall back to print-throttle if Live fails - terminate: map WinError 87 from os.kill(pid,0) to ProcessLookupError;
fix _pid_alive ordering vs PermissionError - History: rstrip CR/LF when loading strings (RedactingFileHistory + disk load)
Co-authored-by: Cursor cursoragent@cursor.com
Co-authored-by: Vaibhav Upreti vaibhav.upreti16@gmail.com
Co-authored-by: Cursor cursoragent@cursor.com下载附件
-