Conversation
thesiti92
added this pull request to stack #943
October 5, 2026 19:37
thesiti92
force-pushed
the
remote/2-headless-server-gateway
branch
4 times, most recently
from
October 5, 2026 20:41
8be70d2 to
49abf5c
Compare
`server start --detach` runs the headless server in the background, in its state directory. `server stop` ends only a server the CLI or Desktop started. `remote attach` starts a server when none is healthy, fetches diffr into the state directory when the package cannot hold it, and prints one JSON line between sentinel lines. Agent-Session: 01a0fd55-7d25-70c3-bf87-46cdb881d91e Agent-Session: 10f346e1-a3d6-4004-b9ae-e69332b86ef7 Agent-Session: 61ddd1f7-126b-4756-8f8e-ed5123004afa Agent-Session: 459ae7ec-7302-42c5-b473-4e315a7e4e19 Agent-Session: 01a0fde5-5de7-7a00-8f1e-508af5d4455c Agent-Session: 7d6b1dc9-dc43-474e-a7cf-897a3eb667e1 Agent-Session: 562fd736-d78c-4f16-b9ce-e91003f2f6ed Agent-Session: c0c53908-0c7b-4e80-a860-a7011b05f0ab Agent-Session: 6397de47-e94d-43cc-86ac-eba461d48cfe Agent-Session: 01a0eeba-97ec-71b2-acee-4f5d9a99d47b Agent-Session: 01a0fde5-49f5-7691-b5d7-6bed5e5e4448 Agent-Session: 01a10c6b-6286-7d63-bec6-b36570f309dc Agent-Session: fe2ac599-fe10-4bdd-a496-a121682ac842 Agent-Session: c7d5d811-b851-4c36-93a4-ea2325ac973a Agent-Session: 01a10cab-5911-7c00-92f4-5e3404373ba2 Agent-Session: 17be59a9-37ae-45bc-ad47-3cdb1660c6c2 Agent-Session: 0742d3f8-2ac6-4fee-8102-c6e930f316ad Agent-Session: 01a10cc6-7bb1-7652-8fe2-f99e54e4d14e Agent-Session: bc41ade8-aab1-4279-b31a-ea472fcfaacc Agent-Session: 96eed70a-4af6-4249-a91d-8064746610b6 Agent-Session: 04f92d25-41e1-4ba0-aef1-7a1a1d409286 Agent-Session: 01a10d75-7d32-7f11-8d5a-7aa1c81b5390 Agent-Session: 8a675162-2f63-4f2c-8be7-66b7ae4cdd6a
When no Desktop is running, recorded or installed, the CLI starts the default headless server instead of failing. Every other case keeps the old diagnosis. Agent-Session: 01a0fd55-7d25-70c3-bf87-46cdb881d91e Agent-Session: 10f346e1-a3d6-4004-b9ae-e69332b86ef7 Agent-Session: 61ddd1f7-126b-4756-8f8e-ed5123004afa Agent-Session: 459ae7ec-7302-42c5-b473-4e315a7e4e19 Agent-Session: 01a0fde5-5de7-7a00-8f1e-508af5d4455c Agent-Session: 7d6b1dc9-dc43-474e-a7cf-897a3eb667e1 Agent-Session: 562fd736-d78c-4f16-b9ce-e91003f2f6ed Agent-Session: c0c53908-0c7b-4e80-a860-a7011b05f0ab Agent-Session: 6397de47-e94d-43cc-86ac-eba461d48cfe Agent-Session: 01a0eeba-97ec-71b2-acee-4f5d9a99d47b Agent-Session: 01a0fde5-49f5-7691-b5d7-6bed5e5e4448 Agent-Session: 01a10c6b-6286-7d63-bec6-b36570f309dc Agent-Session: fe2ac599-fe10-4bdd-a496-a121682ac842 Agent-Session: c7d5d811-b851-4c36-93a4-ea2325ac973a Agent-Session: 01a10cab-5911-7c00-92f4-5e3404373ba2 Agent-Session: 17be59a9-37ae-45bc-ad47-3cdb1660c6c2 Agent-Session: 0742d3f8-2ac6-4fee-8102-c6e930f316ad Agent-Session: 01a10cc6-7bb1-7652-8fe2-f99e54e4d14e Agent-Session: bc41ade8-aab1-4279-b31a-ea472fcfaacc Agent-Session: 96eed70a-4af6-4249-a91d-8064746610b6 Agent-Session: 04f92d25-41e1-4ba0-aef1-7a1a1d409286 Agent-Session: 01a10d75-7d32-7f11-8d5a-7aa1c81b5390 Agent-Session: 8a675162-2f63-4f2c-8be7-66b7ae4cdd6a
Deleting a review removes its whole checkout directory, including the checkouts structural diff makes outside the workspace records. Agent-Session: 459ae7ec-7302-42c5-b473-4e315a7e4e19 Agent-Session: 6397de47-e94d-43cc-86ac-eba461d48cfe Agent-Session: 9337555e-60dd-434d-a008-93bdb8ef67e7 Agent-Session: e5763a02-51be-4297-883b-afc6f62e6e37 Agent-Session: 01a0efea-dc89-7e20-a049-3138fe84ceb4 Agent-Session: 01a0fd55-7d25-70c3-bf87-46cdb881d91e Agent-Session: 10f346e1-a3d6-4004-b9ae-e69332b86ef7 Agent-Session: 01a0fde5-49f5-7691-b5d7-6bed5e5e4448 Agent-Session: 61ddd1f7-126b-4756-8f8e-ed5123004afa Agent-Session: 01a0fde5-5de7-7a00-8f1e-508af5d4455c Agent-Session: 7d6b1dc9-dc43-474e-a7cf-897a3eb667e1 Agent-Session: 01a10c6b-6286-7d63-bec6-b36570f309dc Agent-Session: fe2ac599-fe10-4bdd-a496-a121682ac842 Agent-Session: c7d5d811-b851-4c36-93a4-ea2325ac973a Agent-Session: 01a10cab-5911-7c00-92f4-5e3404373ba2 Agent-Session: 17be59a9-37ae-45bc-ad47-3cdb1660c6c2 Agent-Session: 0742d3f8-2ac6-4fee-8102-c6e930f316ad Agent-Session: 01a10cc6-7bb1-7652-8fe2-f99e54e4d14e Agent-Session: bc41ade8-aab1-4279-b31a-ea472fcfaacc Agent-Session: 96eed70a-4af6-4249-a91d-8064746610b6 Agent-Session: 04f92d25-41e1-4ba0-aef1-7a1a1d409286 Agent-Session: 01a10d75-7d32-7f11-8d5a-7aa1c81b5390 Agent-Session: 8a675162-2f63-4f2c-8be7-66b7ae4cdd6a
The headless server prepares and frees a review's pinned checkouts as Desktop does, and takes over the leases of an owner that died. A remote caller gets a checkout's state, never its paths or logs. Agent-Session: 459ae7ec-7302-42c5-b473-4e315a7e4e19 Agent-Session: 6397de47-e94d-43cc-86ac-eba461d48cfe Agent-Session: 9337555e-60dd-434d-a008-93bdb8ef67e7 Agent-Session: e5763a02-51be-4297-883b-afc6f62e6e37 Agent-Session: 01a0efea-dc89-7e20-a049-3138fe84ceb4 Agent-Session: 01a0fd55-7d25-70c3-bf87-46cdb881d91e Agent-Session: 10f346e1-a3d6-4004-b9ae-e69332b86ef7 Agent-Session: 01a0fde5-49f5-7691-b5d7-6bed5e5e4448 Agent-Session: 61ddd1f7-126b-4756-8f8e-ed5123004afa Agent-Session: 01a0fde5-5de7-7a00-8f1e-508af5d4455c Agent-Session: 7d6b1dc9-dc43-474e-a7cf-897a3eb667e1 Agent-Session: 01a10c6b-6286-7d63-bec6-b36570f309dc Agent-Session: fe2ac599-fe10-4bdd-a496-a121682ac842 Agent-Session: c7d5d811-b851-4c36-93a4-ea2325ac973a Agent-Session: 01a10cab-5911-7c00-92f4-5e3404373ba2 Agent-Session: 17be59a9-37ae-45bc-ad47-3cdb1660c6c2 Agent-Session: 0742d3f8-2ac6-4fee-8102-c6e930f316ad Agent-Session: 01a10cc6-7bb1-7652-8fe2-f99e54e4d14e Agent-Session: bc41ade8-aab1-4279-b31a-ea472fcfaacc Agent-Session: 96eed70a-4af6-4249-a91d-8064746610b6 Agent-Session: 04f92d25-41e1-4ba0-aef1-7a1a1d409286 Agent-Session: 01a10d75-7d32-7f11-8d5a-7aa1c81b5390 Agent-Session: 8a675162-2f63-4f2c-8be7-66b7ae4cdd6a
Each /watch line names the list or review it carries, so a gateway can merge the streams of several servers. Repeated subscriptions share one line, an unchanged list is not sent again, and a missing review is an error line on an open stream. The client routes each line to its listeners. The two single-purpose streams had no callers and are gone. Agent-Session: 459ae7ec-7302-42c5-b473-4e315a7e4e19 Agent-Session: 9337555e-60dd-434d-a008-93bdb8ef67e7 Agent-Session: e5763a02-51be-4297-883b-afc6f62e6e37 Agent-Session: 01a0efea-dc89-7e20-a049-3138fe84ceb4 Agent-Session: 100108d6-116a-4d9b-895d-7626fd8634ee Agent-Session: 01a0fd55-7d25-70c3-bf87-46cdb881d91e Agent-Session: 10f346e1-a3d6-4004-b9ae-e69332b86ef7 Agent-Session: 01a0fde5-49f5-7691-b5d7-6bed5e5e4448 Agent-Session: 61ddd1f7-126b-4756-8f8e-ed5123004afa Agent-Session: 01a0fde5-5de7-7a00-8f1e-508af5d4455c Agent-Session: 7d6b1dc9-dc43-474e-a7cf-897a3eb667e1 Agent-Session: 01a10c6b-6286-7d63-bec6-b36570f309dc Agent-Session: fe2ac599-fe10-4bdd-a496-a121682ac842 Agent-Session: c7d5d811-b851-4c36-93a4-ea2325ac973a Agent-Session: 01a10cab-5911-7c00-92f4-5e3404373ba2 Agent-Session: 17be59a9-37ae-45bc-ad47-3cdb1660c6c2 Agent-Session: 0742d3f8-2ac6-4fee-8102-c6e930f316ad Agent-Session: 01a10cc6-7bb1-7652-8fe2-f99e54e4d14e Agent-Session: bc41ade8-aab1-4279-b31a-ea472fcfaacc Agent-Session: 96eed70a-4af6-4249-a91d-8064746610b6 Agent-Session: 04f92d25-41e1-4ba0-aef1-7a1a1d409286 Agent-Session: 01a10d75-7d32-7f11-8d5a-7aa1c81b5390 Agent-Session: 8a675162-2f63-4f2c-8be7-66b7ae4cdd6a
A memory file in the review home maps each remote's stable server id to its reviews and its last alias, so a review still names its host while that host is down or renamed. Agent-Session: 01a0fd55-7d25-70c3-bf87-46cdb881d91e Agent-Session: 10f346e1-a3d6-4004-b9ae-e69332b86ef7 Agent-Session: 61ddd1f7-126b-4756-8f8e-ed5123004afa Agent-Session: 459ae7ec-7302-42c5-b473-4e315a7e4e19 Agent-Session: 01a0fde5-5de7-7a00-8f1e-508af5d4455c Agent-Session: 7d6b1dc9-dc43-474e-a7cf-897a3eb667e1 Agent-Session: 9337555e-60dd-434d-a008-93bdb8ef67e7 Agent-Session: e5763a02-51be-4297-883b-afc6f62e6e37 Agent-Session: 01a0efea-dc89-7e20-a049-3138fe84ceb4 Agent-Session: 100108d6-116a-4d9b-895d-7626fd8634ee Agent-Session: 01a0fde5-49f5-7691-b5d7-6bed5e5e4448 Agent-Session: 01a10c6b-6286-7d63-bec6-b36570f309dc Agent-Session: fe2ac599-fe10-4bdd-a496-a121682ac842 Agent-Session: c7d5d811-b851-4c36-93a4-ea2325ac973a Agent-Session: 01a10cab-5911-7c00-92f4-5e3404373ba2 Agent-Session: 17be59a9-37ae-45bc-ad47-3cdb1660c6c2 Agent-Session: 0742d3f8-2ac6-4fee-8102-c6e930f316ad Agent-Session: 01a10cc6-7bb1-7652-8fe2-f99e54e4d14e Agent-Session: bc41ade8-aab1-4279-b31a-ea472fcfaacc Agent-Session: 96eed70a-4af6-4249-a91d-8064746610b6 Agent-Session: 04f92d25-41e1-4ba0-aef1-7a1a1d409286 Agent-Session: 01a10d75-7d32-7f11-8d5a-7aa1c81b5390 Agent-Session: 8a675162-2f63-4f2c-8be7-66b7ae4cdd6a
Each configured alias is checked through /health, with backoff while it is down. One server under two aliases is one machine; a copied store is a duplicate, decided by the order of the setting. Agent-Session: 01a0fd55-7d25-70c3-bf87-46cdb881d91e Agent-Session: 10f346e1-a3d6-4004-b9ae-e69332b86ef7 Agent-Session: 61ddd1f7-126b-4756-8f8e-ed5123004afa Agent-Session: 459ae7ec-7302-42c5-b473-4e315a7e4e19 Agent-Session: 01a0fde5-5de7-7a00-8f1e-508af5d4455c Agent-Session: 7d6b1dc9-dc43-474e-a7cf-897a3eb667e1 Agent-Session: 9337555e-60dd-434d-a008-93bdb8ef67e7 Agent-Session: e5763a02-51be-4297-883b-afc6f62e6e37 Agent-Session: 01a0efea-dc89-7e20-a049-3138fe84ceb4 Agent-Session: 100108d6-116a-4d9b-895d-7626fd8634ee Agent-Session: 01a0fde5-49f5-7691-b5d7-6bed5e5e4448 Agent-Session: 01a10c6b-6286-7d63-bec6-b36570f309dc Agent-Session: fe2ac599-fe10-4bdd-a496-a121682ac842 Agent-Session: c7d5d811-b851-4c36-93a4-ea2325ac973a Agent-Session: 01a10cab-5911-7c00-92f4-5e3404373ba2 Agent-Session: 17be59a9-37ae-45bc-ad47-3cdb1660c6c2 Agent-Session: 0742d3f8-2ac6-4fee-8102-c6e930f316ad Agent-Session: 01a10cc6-7bb1-7652-8fe2-f99e54e4d14e Agent-Session: bc41ade8-aab1-4279-b31a-ea472fcfaacc Agent-Session: 96eed70a-4af6-4249-a91d-8064746610b6 Agent-Session: 04f92d25-41e1-4ba0-aef1-7a1a1d409286 Agent-Session: 01a10d75-7d32-7f11-8d5a-7aa1c81b5390 Agent-Session: 8a675162-2f63-4f2c-8be7-66b7ae4cdd6a
The Desktop server mounts a gateway that sends each review request in process to the laptop's routes or over HTTP to the remote that owns the review, with the remote's token and the caller marked remote. Redirects and answers that name local paths are refused. GET /remote-hosts reports each host's state. Agent-Session: 01a0fd55-7d25-70c3-bf87-46cdb881d91e Agent-Session: 10f346e1-a3d6-4004-b9ae-e69332b86ef7 Agent-Session: 61ddd1f7-126b-4756-8f8e-ed5123004afa Agent-Session: 459ae7ec-7302-42c5-b473-4e315a7e4e19 Agent-Session: 01a0fde5-5de7-7a00-8f1e-508af5d4455c Agent-Session: 7d6b1dc9-dc43-474e-a7cf-897a3eb667e1 Agent-Session: 9337555e-60dd-434d-a008-93bdb8ef67e7 Agent-Session: e5763a02-51be-4297-883b-afc6f62e6e37 Agent-Session: 01a0efea-dc89-7e20-a049-3138fe84ceb4 Agent-Session: 100108d6-116a-4d9b-895d-7626fd8634ee Agent-Session: 01a0fde5-49f5-7691-b5d7-6bed5e5e4448 Agent-Session: 01a10c6b-6286-7d63-bec6-b36570f309dc Agent-Session: fe2ac599-fe10-4bdd-a496-a121682ac842 Agent-Session: c7d5d811-b851-4c36-93a4-ea2325ac973a Agent-Session: 01a10cab-5911-7c00-92f4-5e3404373ba2 Agent-Session: 17be59a9-37ae-45bc-ad47-3cdb1660c6c2 Agent-Session: 0742d3f8-2ac6-4fee-8102-c6e930f316ad Agent-Session: 01a10cc6-7bb1-7652-8fe2-f99e54e4d14e Agent-Session: bc41ade8-aab1-4279-b31a-ea472fcfaacc Agent-Session: 96eed70a-4af6-4249-a91d-8064746610b6 Agent-Session: 04f92d25-41e1-4ba0-aef1-7a1a1d409286 Agent-Session: 01a10d75-7d32-7f11-8d5a-7aa1c81b5390 Agent-Session: 8a675162-2f63-4f2c-8be7-66b7ae4cdd6a
The memory file also keeps the last list each server sent, so the owner of any review in it is known after a restart. Agent-Session: 01a0fd55-7d25-70c3-bf87-46cdb881d91e Agent-Session: 10f346e1-a3d6-4004-b9ae-e69332b86ef7 Agent-Session: 61ddd1f7-126b-4756-8f8e-ed5123004afa Agent-Session: 459ae7ec-7302-42c5-b473-4e315a7e4e19 Agent-Session: 01a0fde5-5de7-7a00-8f1e-508af5d4455c Agent-Session: 7d6b1dc9-dc43-474e-a7cf-897a3eb667e1 Agent-Session: 01a0fde5-49f5-7691-b5d7-6bed5e5e4448 Agent-Session: 01a10c6b-6286-7d63-bec6-b36570f309dc Agent-Session: fe2ac599-fe10-4bdd-a496-a121682ac842 Agent-Session: c7d5d811-b851-4c36-93a4-ea2325ac973a Agent-Session: 01a10cab-5911-7c00-92f4-5e3404373ba2 Agent-Session: 17be59a9-37ae-45bc-ad47-3cdb1660c6c2 Agent-Session: 0742d3f8-2ac6-4fee-8102-c6e930f316ad Agent-Session: 01a10cc6-7bb1-7652-8fe2-f99e54e4d14e Agent-Session: bc41ade8-aab1-4279-b31a-ea472fcfaacc Agent-Session: 96eed70a-4af6-4249-a91d-8064746610b6 Agent-Session: 04f92d25-41e1-4ba0-aef1-7a1a1d409286 Agent-Session: 01a10d75-7d32-7f11-8d5a-7aa1c81b5390 Agent-Session: 8a675162-2f63-4f2c-8be7-66b7ae4cdd6a
The gateway lists the laptop's reviews, then each host's in the setting's order, with the host's state. Each client stream opens one stream to each machine that owns a review it follows, forwards remote lines as sent, and marks the reviews of a host that stops answering. Agent-Session: 01a0fd55-7d25-70c3-bf87-46cdb881d91e Agent-Session: 10f346e1-a3d6-4004-b9ae-e69332b86ef7 Agent-Session: 61ddd1f7-126b-4756-8f8e-ed5123004afa Agent-Session: 459ae7ec-7302-42c5-b473-4e315a7e4e19 Agent-Session: 01a0fde5-5de7-7a00-8f1e-508af5d4455c Agent-Session: 7d6b1dc9-dc43-474e-a7cf-897a3eb667e1 Agent-Session: 01a0fde5-49f5-7691-b5d7-6bed5e5e4448 Agent-Session: 01a10c6b-6286-7d63-bec6-b36570f309dc Agent-Session: fe2ac599-fe10-4bdd-a496-a121682ac842 Agent-Session: c7d5d811-b851-4c36-93a4-ea2325ac973a Agent-Session: 01a10cab-5911-7c00-92f4-5e3404373ba2 Agent-Session: 17be59a9-37ae-45bc-ad47-3cdb1660c6c2 Agent-Session: 0742d3f8-2ac6-4fee-8102-c6e930f316ad Agent-Session: 01a10cc6-7bb1-7652-8fe2-f99e54e4d14e Agent-Session: bc41ade8-aab1-4279-b31a-ea472fcfaacc Agent-Session: 96eed70a-4af6-4249-a91d-8064746610b6 Agent-Session: 04f92d25-41e1-4ba0-aef1-7a1a1d409286 Agent-Session: 01a10d75-7d32-7f11-8d5a-7aa1c81b5390 Agent-Session: 8a675162-2f63-4f2c-8be7-66b7ae4cdd6a
While a window is attached to the laptop, the gateway attaches to each online remote's /control stream and relays only capabilities, focus and opening a review the remote owns. The gateway serves the merged list and streams. Agent-Session: 01a0fd55-7d25-70c3-bf87-46cdb881d91e Agent-Session: 10f346e1-a3d6-4004-b9ae-e69332b86ef7 Agent-Session: 61ddd1f7-126b-4756-8f8e-ed5123004afa Agent-Session: 459ae7ec-7302-42c5-b473-4e315a7e4e19 Agent-Session: 01a0fde5-5de7-7a00-8f1e-508af5d4455c Agent-Session: 7d6b1dc9-dc43-474e-a7cf-897a3eb667e1 Agent-Session: 01a0fde5-49f5-7691-b5d7-6bed5e5e4448 Agent-Session: 01a10c6b-6286-7d63-bec6-b36570f309dc Agent-Session: fe2ac599-fe10-4bdd-a496-a121682ac842 Agent-Session: c7d5d811-b851-4c36-93a4-ea2325ac973a Agent-Session: 01a10cab-5911-7c00-92f4-5e3404373ba2 Agent-Session: 17be59a9-37ae-45bc-ad47-3cdb1660c6c2 Agent-Session: 0742d3f8-2ac6-4fee-8102-c6e930f316ad Agent-Session: 01a10cc6-7bb1-7652-8fe2-f99e54e4d14e Agent-Session: bc41ade8-aab1-4279-b31a-ea472fcfaacc Agent-Session: 96eed70a-4af6-4249-a91d-8064746610b6 Agent-Session: 04f92d25-41e1-4ba0-aef1-7a1a1d409286 Agent-Session: 01a10d75-7d32-7f11-8d5a-7aa1c81b5390 Agent-Session: 8a675162-2f63-4f2c-8be7-66b7ae4cdd6a
The laptop's own reviews win over any remote's claim at every decision. A forwarded answer is cut when it stalls, not by a fixed limit, and a stream ends when its host goes offline. A remote snapshot of another review is refused, and its tutorial marker is dropped. With no host set, the laptop's list and stream pass through as they are. Agent-Session: 203ee435-a867-494c-bb56-ddde9edf962e Agent-Session: 879f8dc8-4a2e-4c1d-a221-935df47f9854 Agent-Session: 459ae7ec-7302-42c5-b473-4e315a7e4e19 Agent-Session: 01a0f84f-dd30-7a41-b2fe-0d7af3946366 Agent-Session: b74726e7-9218-4d00-81bd-c3fc64dcd8d7 Agent-Session: 01a0f894-9661-79c0-a6c4-71002d15105c Agent-Session: 00102a68-dcd0-4748-a95e-fc417ddbb706 Agent-Session: 01a0fd55-7d25-70c3-bf87-46cdb881d91e Agent-Session: 10f346e1-a3d6-4004-b9ae-e69332b86ef7 Agent-Session: 61ddd1f7-126b-4756-8f8e-ed5123004afa Agent-Session: 01a0fde5-5de7-7a00-8f1e-508af5d4455c Agent-Session: 7d6b1dc9-dc43-474e-a7cf-897a3eb667e1 Agent-Session: 945245a7-5fc9-4d4e-bb9a-8fa4987ac199 Agent-Session: 01a0f7e4-a040-7c70-958e-c32707c30fa1 Agent-Session: 01a0fde5-49f5-7691-b5d7-6bed5e5e4448 Agent-Session: 01a10c6b-6286-7d63-bec6-b36570f309dc Agent-Session: fe2ac599-fe10-4bdd-a496-a121682ac842 Agent-Session: c7d5d811-b851-4c36-93a4-ea2325ac973a Agent-Session: 01a10cab-5911-7c00-92f4-5e3404373ba2 Agent-Session: 17be59a9-37ae-45bc-ad47-3cdb1660c6c2 Agent-Session: 0742d3f8-2ac6-4fee-8102-c6e930f316ad Agent-Session: 01a10cc6-7bb1-7652-8fe2-f99e54e4d14e Agent-Session: bc41ade8-aab1-4279-b31a-ea472fcfaacc Agent-Session: 96eed70a-4af6-4249-a91d-8064746610b6 Agent-Session: 04f92d25-41e1-4ba0-aef1-7a1a1d409286 Agent-Session: 01a10d75-7d32-7f11-8d5a-7aa1c81b5390 Agent-Session: 01a10db4-61fc-7181-82a9-ac2de659fb25 Agent-Session: 8a675162-2f63-4f2c-8be7-66b7ae4cdd6a
Agent-Session: 459ae7ec-7302-42c5-b473-4e315a7e4e19 Agent-Session: bc41ade8-aab1-4279-b31a-ea472fcfaacc Agent-Session: 01a10d6d-cc61-7a60-8be6-0d3d48878694 Agent-Session: 0742d3f8-2ac6-4fee-8102-c6e930f316ad Agent-Session: 96eed70a-4af6-4249-a91d-8064746610b6 Agent-Session: 04f92d25-41e1-4ba0-aef1-7a1a1d409286 Agent-Session: 01a10d75-7d32-7f11-8d5a-7aa1c81b5390 Agent-Session: 01a10db4-61fc-7181-82a9-ac2de659fb25 Agent-Session: 8a675162-2f63-4f2c-8be7-66b7ae4cdd6a
Agent-Session: 459ae7ec-7302-42c5-b473-4e315a7e4e19 Agent-Session: bc41ade8-aab1-4279-b31a-ea472fcfaacc Agent-Session: 96eed70a-4af6-4249-a91d-8064746610b6 Agent-Session: 04f92d25-41e1-4ba0-aef1-7a1a1d409286 Agent-Session: 01a10d75-7d32-7f11-8d5a-7aa1c81b5390 Agent-Session: 8a675162-2f63-4f2c-8be7-66b7ae4cdd6a
thesiti92
force-pushed
the
remote/2-headless-server-gateway
branch
from
October 5, 2026 21:38
49abf5c to
dad34df
Compare
The per-host agent now has a timeout, so Node applies the server's Keep-Alive hint and retires idle sockets before the host closes them. Agent-Session: 459ae7ec-7302-42c5-b473-4e315a7e4e19 Agent-Session: bc41ade8-aab1-4279-b31a-ea472fcfaacc Agent-Session: 96eed70a-4af6-4249-a91d-8064746610b6 Agent-Session: 04f92d25-41e1-4ba0-aef1-7a1a1d409286 Agent-Session: a5134983-fbca-42d2-ac6c-fe14cf3ce20e Agent-Session: 01a0fd55-7d25-70c3-bf87-46cdb881d91e
Agent-Session: 459ae7ec-7302-42c5-b473-4e315a7e4e19 Agent-Session: 96eed70a-4af6-4249-a91d-8064746610b6 Agent-Session: a5134983-fbca-42d2-ac6c-fe14cf3ce20e Agent-Session: 01a0fd55-7d25-70c3-bf87-46cdb881d91e Agent-Session: 9c8a2d13-4198-4d4b-bf1d-4de6fccd0f19 Agent-Session: 99df4638-b570-4eeb-b115-0311294ee04d
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked PR 2 of 9 for remote reviews (base:
main; #934, the rename, is merged). Review in order; each PR builds and passes its suites on its own.Manual test plan
Purpose. The CLI can run the review server in the background on any machine (
server start --detach,server stop,server reset-id,remote attach), and Desktop's local server gains a gateway that merges, routes and streams other machines' reviews. There is no SSH yet: the dev-onlyDEV_FAST_REVIEW_REMOTE_HOSTS_FILEhands the gateway its hosts.Setup. Worktree at
origin/remote/2-headless-server-gateway.R up a && R install a. Create the remote review (ID=...).Steps.
R ssh a -- whiteboard server status --json→ready: truewithserverId: the fixture'swhiteboard apistarted a headless server, since no Desktop is on the host.R ssh a -- whiteboard server stop→Stopped the Whiteboard server (process N).;server statusnow fails as not ready.R ssh a -- whiteboard remote attach --json→ one JSON line betweenWHITEBOARD-REMOTE-BEGINandWHITEBOARD-REMOTE-END:event: "remote.attach",url: http://127.0.0.1:<port>,token,startedServer: true,diffr. Again →startedServer: false, same url.P=$(R forward a <port>)→ prints a free local port.printf '[{"alias":"devbox","endpoint":{"url":"http://127.0.0.1:%s","token":"%s"}}]' $P <token> > $H/hosts.json.DEV_REVIEW_HOME=$H DEV_FAST_REVIEW_REMOTE_HOSTS_FILE=$H/hosts.json pnpm dev; set the Desktop API helpers.api /remote-hosts→[{"alias":"devbox","serverId":"…","state":"online"}].api /reviews-api→ the array holdsRemote-orderwith"host":"devbox","hostState":"online".api /reviews-api/$ID→ the remote review, answered through the forward.edit wb-test-a $ID "Edited on the remote."→ the text appears in the open tab without a reload.S wb-test-a 'bash -s -- Pushed' < /tmp/wb-push.sh→ a tab "Pushed" opens in Desktop.Negative checks.
curl -s -X DELETE -H "x-review-token: $TOK" $URL/reviews-api/$ID→ 404This route is not available for a review on another machine.state: "offline", detaildevbox is offline: it did not accept the token.devbox2with the same endpoint →devbox2isduplicate("… report the same server id …"); Remote-order is listed once.R pause a→offlinewithin about 35 s (30 s heartbeat + 3 s health timeout); the review stays listed withhostState: "offline".R resume a→online.R ssh a -- whiteboard server reset-idwhile the server runs → refusedA Whiteboard server is using … Stop it first, then run whiteboard server reset-id again.R install a --version 0.0.2-e2e; R ssh a -- whiteboard server stop, rerun step 3–5 →incompatible, detaildevbox runs Whiteboard 0.0.2-e2e; this Desktop runs 0.2.0. Install Whiteboard 0.2.0 on devbox.not jsonto the hosts file → Desktop's output (thepnpm devterminal) logs[Whiteboard gateway] Cannot read remote hosts from …: SyntaxError., with no file contents.authoringCapabilities,openApiReviewandfocusWindow, and never open another machine's review: not manually drivable; covered bysrc/server/review-gateway-pushes.test.tsandsrc/server/global-verb-relay.test.ts.Cleanup. Common cleanup;
rm $H/hosts.jsonfirst (it holds a token).Common setup for all plans
Common setup (read once)
git -C <core> worktree add --detach ../review-prN origin/<head>, thenpnpm installthere. Run everything below from that worktree root.DEV_REVIEW_HOME=$H DEV_FAST_REVIEW_SSH_CONFIG=/tmp/wbt.$WB_TEST_RUN/ssh_config pnpm dev(prefixDEV_FAST_REVIEW_DESKTOP_BACKGROUND=1to keep it from taking focus).D=$(ls $H/review-desktop/instances/dev-*.json); URL=$(node -p "require('$D').url"); TOK=$(node -p "require('$D').token"); api() { curl -s -H "x-review-token: $TOK" "$URL$1"; }ID=$(S wb-test-a 'bash -s -- Remote-order' < /tmp/wb-review.sh | head -1)(repo~/wbrepo, review "Remote-order" with a prose line and a code peek of f.ts)./tmp/wb-push.shis the same withopen: truein~/wbrepo2.(cd apps/review-desktop && TSX_TSCONFIG_PATH=tsconfig.test.json node --import tsx --test --test-force-exit <files>). Package tests:pnpm --filter @dev.fast/whiteboard test <files>.apps/review-desktop/scripts/e2e/TESTING.md("Staging the runtime"), thennode apps/review-desktop/scripts/e2e/run.mjs --runtime "$REVIEW_E2E_RUNTIME" --journey <name>.pause/resume(there is nounpause).sshmasters count as leftovers), thenR down --all; R verify-clean; rm -rf $H /tmp/wb-*.sh. Without anaws sso loginsessionverify-cleanalso printsAWS could not be checkedand exits 1; no other line may appear.