From 510254cbd4f7ed31bb0b7b2b356ac29bbd546290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Thu, 16 Jul 2026 19:17:00 +0000 Subject: [PATCH] note the x11vnc orphan/duplicate risk in TODO Co-Authored-By: Claude Opus 4.8 --- TODO.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/TODO.md b/TODO.md index c89e8c29..0267adea 100644 --- a/TODO.md +++ b/TODO.md @@ -31,6 +31,16 @@ Deferred work. Context: Officer is collapsing from multi-tenant / open-source-re paths and an outdated package name, so `installPi` always fires and floods the logs with `EEXIST` noise. Should detect `@earendil-works/pi-coding-agent` at the real npm prefix. +- [ ] **VNC mirror can orphan/duplicate x11vnc across sidecar restarts.** `vnc-manager.startSession` + tracks the running mirror in module-level state and skips spawning only if that pid is alive. + On a vnc-sidecar restart the state resets to null while the old x11vnc keeps running orphaned; + the next `startSession` spawns a second one. Worse, `waitForPort` treats *any* listener on 5900 + as success, so the platform can believe it started a mirror that is actually a stale process — + desyncing into multiple contending x11vnc instances on `:0` (suspected cause of click-lag on + 2026-07-16, cleared by killing all but one). Fix: before spawning, kill any existing + `x11vnc -display :0` / free port 5900 (an `ExecStartPre`-style cleanup, like the old + officer-vnc.service unit did with `vncserver -kill`). + ## Infra (alpha) - [ ] **Delete `/etc/systemd/system/officer-vnc.service`.** Hand-installed unit (not in this repo)