Skip to content

feat: experimental Windows backend (pywinpty) (v0.3.0)#3

Merged
mabry1985 merged 1 commit into
mainfrom
feat/windows-pywinpty
Jun 13, 2026
Merged

feat: experimental Windows backend (pywinpty) (v0.3.0)#3
mabry1985 merged 1 commit into
mainfrom
feat/windows-pywinpty

Conversation

@mabry1985

Copy link
Copy Markdown
Contributor

Follow-up B (Windows). pty_session.py gains a WinPtySession (winpty.PtyProcess) alongside the POSIX PtySession, selected by open_session() on sys.platform. The Unix-only imports (pty/fcntl/termios) are guarded so the module imports on Windows. api._bridge uses open_session. pywinpty is declared in requires_pip (sys_platform=='win32') — not auto-installed.

EXPERIMENTAL — untested in our Linux CI; the POSIX path stays the supported, tested one. A Windows user needs to validate. Tests cover: open_session picks POSIX here, WinPtySession._build_env (TERM + scrub), and its clear PtyError when pywinpty is absent. 19 tests green.

….3.0)

pty_session.py gains a WinPtySession (winpty.PtyProcess) alongside the POSIX
PtySession, picked by open_session() on sys.platform. The Unix-only imports
(pty/fcntl/termios) are guarded so the module imports on Windows. api._bridge uses
open_session. pywinpty is declared in requires_pip (sys_platform=='win32') — not
auto-installed.

EXPERIMENTAL: untested in our Linux CI; the POSIX path stays the supported/tested
one. Tests cover open_session picking POSIX here + WinPtySession._build_env + its
clear PtyError when pywinpty is absent.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@protoquinn

protoquinn Bot commented Jun 13, 2026

Copy link
Copy Markdown

👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow.

@mabry1985 mabry1985 merged commit 342b9ee into main Jun 13, 2026
1 check passed
@mabry1985 mabry1985 deleted the feat/windows-pywinpty branch June 13, 2026 18:42

@protoquinn protoquinn Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA Audit — PR #3 | feat: experimental Windows backend (pywinpty) (v0.3.0)

VERDICT: WARN (non-terminal — CI test still in_progress)


CI Status

  • test: in_progress ⏳

Diff Review

  • Adds WinPtySession (pywinpty backend) alongside POSIX PtySession, selected by open_session() factory on sys.platform — clean abstraction (pty_session.py:197+, api.py:109).
  • Unix imports (pty/fcntl/termios) guarded with if sys.platform != "win32" — module imports on Windows (pty_session.py:11-14).
  • Manifest declares pywinpty>=2.0; sys_platform=='win32' in requires_pip, NOT auto-installed — experimental posture is clear (protoagent.plugin.yaml:16-18).
  • Docs updated: README, roadmap, file table — consistent messaging (README.md).

Observations

  • LOW: WinPtySession.write() silently swallows all exceptions (pty_session.py ~line 265). If the PTY process has died, the caller never knows. The read() path already treats failures as EOF, which is reasonable; consider at least logging write failures.
  • LOW: clawpatch structural review unavailable for this repo — review is diff-based only.
  • GAP: diff truncated at 200/295 lines. open_session(), resize(), poll(), aclose() are not visible in the fetched diff. Tests (19 green per PR description) cover open_session platform selection and _build_env — these give confidence, but the unseen methods should be spot-checked by a human.
  • No unresolved CodeRabbit threads.

The architecture is sound: factory pattern, guarded imports, clear experimental labeling. The POSIX path is untouched. Mergeable once CI is terminal-green.

— Quinn, QA Engineer

@protoquinn

protoquinn Bot commented Jun 13, 2026

Copy link
Copy Markdown

Submitted COMMENT review on #3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant