Core Architecture & Invariant CI / validate (push) Successful in 15s
- Update ADR-0003 and ADR-0004 Status lines from closed placeholder #5 to active M2 capture issue #12 - Fix LG Developer Mode documentation URLs from developer.lg.com to developer.lge.com in docs/designs/lg-smtv-mcp.md - Clarify Developer Mode asyncssh/SFTP session lifecycle (lazily opened on first capture, reused while online, swept on connect/reconnect, and closed on STANDBY_OFFLINE), define FastMCP, and align state-diagram backoff terminology - Document trusted home-LAN transport boundary, wss://:3001 self-signed TLS + client-key model, known_hosts=None vs. SSH_KNOWN_HOSTS_PATH host-key pinning trade-offs, and single-TV-per-daemon scalability limit - Separate completed M1 baseline (#1-#4, matching actual tests/ layout and mime_type="image/jpeg") from actionable M2 specifications (#12 CaptureClient/AsyncSshCaptureTransport contracts and shielded cleanup, #13 systemd unit, #11 E2E hardening)
1.6 KiB
1.6 KiB
ADR-0003: Asyncssh Protocol Boundary for Dev Mode Capture
- Status: Accepted (Protocol seams
CaptureTransport/FrameCapturerimplemented in M1;CaptureClient/AsyncSshCaptureTransportplanned for M2#12) - 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
ControlMastersocket management; cleanly mockable inpytest; degrades gracefully toSCREENSHOT_UNAVAILABLEwhen Developer Mode expires. - Negative: Requires explicit legacy
ssh-rsaalgorithm configuration inasyncsshandknown_hosts=Nonedefault on LAN (overridable viaSSH_KNOWN_HOSTS_PATH).
Alternatives Considered
- OpenSSH
ControlMastersubprocesses: Rejected because managing background control sockets, parsing subprocess output/exit codes, and writing offline unit tests is more brittle.
Related Decisions
- Documented in docs/designs/lg-smtv-mcp.md (Alternative C) and ADR-0004.