# devvm _proxy: each VM's proxy, hidden. --help lists its one # flag, -config. exec devvm _proxy --help stdout '-config' ! stdout '-auth-file' ! stdout '-init-ca|-login|-redact' ! stderr . exec devvm --help ! stdout _proxy # The proxy runs only with its config (proxy.Config), which holds the VM's # password: none, one others may read, one without a password, and one of # another version are refused. ! exec devvm _proxy stderr '^devvm: proxy_failed reason=-config is required$' ! exec devvm _proxy -listen 127.0.0.1:0 stderr '^devvm: proxy_failed reason=flag provided but not defined: -listen$' chmod 0600 nopw.json chmod 0600 v2.json chmod 0644 open.json ! exec devvm _proxy --config open.json stderr '^devvm: proxy_failed reason=open.json: another user may read or change it$' ! exec devvm _proxy --config nopw.json stderr '^devvm: proxy_failed reason=nopw.json: no password$' ! exec devvm _proxy -config v2.json stderr '^devvm: proxy_failed reason=v2.json: version 2, not 1$' ! exec devvm _proxy -nope stderr '^devvm: proxy_failed reason=flag provided but not defined: -nope$' # What only the host does (devvm's CA, agents' logins, redaction) runs in # devvm itself: none of it is reachable from the proxy's arguments. ! exec devvm _proxy -init-ca ca stderr '^devvm: proxy_failed reason=flag provided but not defined: -init-ca$' ! exists ca ! exec devvm _proxy -login codex -login-file auth.json -login-vm stderr '^devvm: proxy_failed reason=flag provided but not defined: -login$' ! stdout . ! exec devvm _proxy -redact json stderr '^devvm: proxy_failed reason=flag provided but not defined: -redact$' # Its child, devvm _proxy-child, run by hand without the broker's socket and # listener as its descriptors 3 and 4, refuses before it touches either. ! exec devvm _proxy-child -for proxy.json stderr '^devvm: proxy_failed reason=descriptor 3, the socket to the broker: .*; only devvm _proxy starts devvm _proxy-child$' ! stderr 'fatal error|goroutine' -- open.json -- {"version": 1, "listen": "127.0.0.1:0", "password": "k3y"} -- nopw.json -- {"version": 1, "listen": "127.0.0.1:0"} -- v2.json -- {"version": 2, "listen": "127.0.0.1:0", "password": "k3y"} -- auth.json -- {"OPENAI_API_KEY": "sk-real"}