Skip to content

Ship a trimmed VS Code server to remote hosts - #937

Draft
thesiti92 wants to merge 1 commit into
remote/3-ssh-hostsfrom
remote/4-remote-vscode-server
Draft

thesiti92 wants to merge 1 commit into
remote/3-ssh-hostsfrom
remote/4-remote-vscode-server

Conversation

@thesiti92

@thesiti92 thesiti92 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Stacked PR 4 of 9 for remote reviews (base: remote/3-ssh-hosts; #934, the rename, is merged). Review in order; each PR builds and passes its suites on its own.

Manual test plan

Purpose. The npm package now carries a trimmed VS Code server (vscode-server/), whiteboard remote extensions ensure installs the curated extensions on a host, and remote attach starts that server on the host's loopback and reports it. A failing language server never fails the attach, and a remote caller's language-context names the checkout as remoteRootPath.

Setup. Worktree at origin/remote/4-remote-vscode-server. node apps/review-desktop/scripts/build-remote-runtime.mjs → remote runtime at …/code-oss/.build/remote-runtime (commit …). R up a; R install a; R up b; R install b (install stages the server). Create the remote review on a. Launch; add wb-test-a.

Steps.

  1. R pack --out /tmp/wb.tgz && tar -tzf /tmp/wb.tgz | grep -E 'package/vscode-server/(product.json|out/server-main.js)' → both listed.
  2. R ssh a -- whiteboard remote extensions ensure → Installed <id> lines, exit 0; ~/.dev/whiteboard-remote/extensions/extensions.json exists.
  3. R ssh a -- whiteboard remote attach → last line Language features: VS Code server on port N.
  4. R ssh a -- 'ls -l ~/.dev/whiteboard-remote/server' → connection-token (-rw-------), server.json, server.log; server.log has Extension host agent listening on N.
  5. Attach again → same port; R ssh a -- pgrep -fc server-main.js → 1.
  6. api /remote-hosts → the wb-test-a entry has "languageFeatures": true.
  7. api "/reviews-api/$ID/language-context?side=head" → remoteRootPath (a path on the host, or null), identity (a hash), serverId (the host's); no rootPath field.
  8. With no window connected to it, R ssh a -- pgrep -f server-main.js is empty about 5 min after start (upstream idle shutdown).

Negative checks.

  • R ssh b -- 'mv "$(npm root -g)/@dev.fast/whiteboard/vscode-server/product.json" /tmp/'; R ssh b -- whiteboard remote attach → review server still starts; Language features: unavailable (This Whiteboard install has no VS Code server (… is missing).). Add wb-test-b → online, languageFeatures: false with that detail.
  • R up s --sealed; R install s; R ssh s -- whiteboard remote attach → server starts; language features unavailable (Could not install the language extensions: …) or pending (Installing the language extensions on this host; …).
  • One remote's permanent connection failure leaving the others working: not manually drivable here (no window connects until PR 5); covered by code-oss/src/vs/review/node/reviewRemoteFailureIsolation.test.ts. Handshake: code-oss/src/vs/server/node/reviewServerHandshake.test.ts.
  • Package side: pnpm --filter @dev.fast/whiteboard test src/remote-language-server.test.ts src/remote-extensions.test.ts; node --test apps/review-desktop/scripts/build-remote-runtime.test.mjs scripts/pack-review-cli.test.mjs.

Cleanup. Common cleanup; rm /tmp/wb.tgz.

Common setup for all plans

Common setup (read once)

  • Test each PR in a worktree at its head branch: git -C <core> worktree add --detach ../review-prN origin/<head>, then pnpm install there. Run everything below from that worktree root.
  • Helpers (bash or zsh):
R() { node apps/review-desktop/scripts/e2e/remote/remote.mjs "$@"; }
export WB_TEST_RUN=manual-$$                  # before the first `R up`
S() { ssh -F /tmp/wbt.$WB_TEST_RUN/ssh_config "$@"; }   # host aliases are wb-test-<name>
H=/tmp/wb-home-$WB_TEST_RUN                   # isolated Desktop home
mkdir -p $H/review-desktop/state/user-data/User
echo '{"review.experimental.remoteHosts.enabled": true}' > $H/review-desktop/state/user-data/User/settings.json
awk '/createRemoteReview = String.raw`/{f=1;next} /^`;/{f=0} f' apps/review-desktop/scripts/e2e/journeys/remote-host.mjs > /tmp/wb-review.sh
sed -e 's/open\\":false/open\\":true/' -e 's/wbrepo/wbrepo2/g' /tmp/wb-review.sh > /tmp/wb-push.sh
edit() { printf '{"sessionId":"%s","edit":{"type":"insert","content":{"type":"markdown","markdown":"%s"}}}' "$2" "$3" | S "$1" 'whiteboard api session_edit -'; }
  • Launch (dev build only; a packaged build ignores both env vars): DEV_REVIEW_HOME=$H DEV_FAST_REVIEW_SSH_CONFIG=/tmp/wbt.$WB_TEST_RUN/ssh_config pnpm dev (prefix DEV_FAST_REVIEW_DESKTOP_BACKGROUND=1 to keep it from taking focus).
  • Desktop API: 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"; }
  • A remote review: 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.sh is the same with open: true in ~/wbrepo2.
  • Settings: ⌘, → region Remote hosts → type the alias in SSH alias → Add.
  • Fork unit tests: (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>.
  • Journeys: stage a runtime per apps/review-desktop/scripts/e2e/TESTING.md ("Staging the runtime"), then node apps/review-desktop/scripts/e2e/run.mjs --runtime "$REVIEW_E2E_RUNTIME" --journey <name>.
  • The harness has pause/resume (there is no unpause).
  • Cleanup, every plan: quit Desktop first (its ssh masters count as leftovers), then R down --all; R verify-clean; rm -rf $H /tmp/wb-*.sh. Without an aws sso login session verify-clean also prints AWS could not be checked and exits 1; no other line may appear.

@thesiti92
thesiti92 force-pushed the remote/4-remote-vscode-server branch from bcf5ff8 to 85e3c47 Compare October 5, 2026 19:37
@thesiti92
thesiti92 added this pull request to stack #943 October 5, 2026 19:37
@thesiti92
thesiti92 force-pushed the remote/4-remote-vscode-server branch 2 times, most recently from 0025250 to 9232663 Compare October 5, 2026 20:19
@thesiti92
thesiti92 force-pushed the remote/4-remote-vscode-server branch from 9232663 to 3e946eb Compare October 5, 2026 20:32
@thesiti92
thesiti92 force-pushed the remote/4-remote-vscode-server branch from 3e946eb to 65b7109 Compare October 5, 2026 20:40
@thesiti92
thesiti92 force-pushed the remote/4-remote-vscode-server branch 2 times, most recently from 3e946eb to 3c098b6 Compare October 5, 2026 21:24
@thesiti92
thesiti92 force-pushed the remote/4-remote-vscode-server branch 2 times, most recently from ee61b4c to cdec16f Compare October 5, 2026 21:47
@thesiti92
thesiti92 force-pushed the remote/4-remote-vscode-server branch from cdec16f to c0b96e9 Compare October 5, 2026 23:06
@thesiti92
thesiti92 force-pushed the remote/4-remote-vscode-server branch 4 times, most recently from cfb261c to e823913 Compare October 6, 2026 17:10
@thesiti92
thesiti92 force-pushed the remote/4-remote-vscode-server branch 2 times, most recently from 2657953 to 29fb306 Compare October 8, 2026 12:59
@thesiti92
thesiti92 force-pushed the remote/4-remote-vscode-server branch from 29fb306 to 24fd06f Compare October 8, 2026 13:10
@thesiti92
thesiti92 force-pushed the remote/4-remote-vscode-server branch from 24fd06f to f259093 Compare October 11, 2026 13:28
@thesiti92
thesiti92 force-pushed the remote/4-remote-vscode-server branch from f259093 to d119c15 Compare October 11, 2026 13:34

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant