Files
lg-smtv-mcp/docs/adr/0003-asyncssh-protocol-boundary-for-dev-mode-capture.md
T
kiskaadee 1ab5246fbf
Core Architecture & Invariant CI / validate (push) Successful in 15s
docs: reconcile M1 architecture, roadmap, ADRs, and design spec
- Add ARCHITECTURE.md documenting canonical present-state M1 topology, components, boundaries, and ADR index
- Add ROADMAP.md recording M1 (#1-#4) completion and M2 (#5, #11) trajectory
- Extract Alternatives A-E from docs/designs/lg-smtv-mcp.md into docs/adr/0001-0005 MADR records
- Update README.md milestone status (#1-#4 merged on main, #5/#11 in M2) and Documentation links
- Reconcile docs/designs/lg-smtv-mcp.md module statuses, FrameCapturer seam, and KeysResult/TextResult.image_bytes
2026-11-16 13:52:16 -05:00

1.5 KiB

ADR-0003: Asyncssh Protocol Boundary for Dev Mode Capture

  • Status: Accepted (Protocol seams CaptureTransport / FrameCapturer implemented in M1; CaptureClient / AsyncSshCaptureTransport planned for M2 #5)
  • Date: 2026-11-15
  • Deciders: kiskaadee

Context and Problem Statement

Retail LG webOS TVs do not serve /tmp screenshots over HTTPS (:3001), requiring SFTP retrieval from the Developer Mode SSH server (prisoner@<TV_IP>:9922) using legacy ssh-rsa algorithms.

Decision Outcome

Chosen option: "Use asyncssh (config=[], explicit ssh-rsa host-key and signature algorithms) wrapped behind CaptureTransport / FrameCapturer Protocol interfaces", because it keeps SFTP sessions persistent in-process and enables deterministic offline contract testing via protocol doubles.

Consequences

  • Positive: Eliminates per-capture SSH subprocess startup and ControlMaster socket management; cleanly mockable in pytest; degrades gracefully to SCREENSHOT_UNAVAILABLE when Developer Mode expires.
  • Negative: Requires explicit legacy ssh-rsa algorithm configuration in asyncssh and known_hosts=None default on LAN (overridable via SSH_KNOWN_HOSTS_PATH).

Alternatives Considered

  • OpenSSH ControlMaster subprocesses: Rejected because managing background control sockets, parsing subprocess output/exit codes, and writing offline unit tests is more brittle.