Repository navigation
fix(servers): bound port, force stop frees the port, one Stop-all summary (XR epic S4) - #70
Merged
Merged
Conversation
…all summary - The launcher reports the port the server actually listens on (getListeningPort), so the HTTPS port in the list and URL matches. - forceStop closes the listener and its connections instead of only dropping the reference, so the port is released. - Port search follows the requested port (+100) instead of stopping at 8080; the host-less probe checks the wildcard and loopback. - A server that cannot be registered is stopped and the launch fails. - Stop all: counts running servers and shows a single summary. Part of the XR environment review epic (S4). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014FkKtAtQus8TVjhG9bhytC
…ad-kvvyg6-servers
…nto claude/project-thread-kvvyg6-servers
The lifecycle tests stub the port search but read the real availability of port 4000: on a machine where it was busy they passed, on a clean CI runner the server kept 4000, the requests went to the stubbed port and the test failed. With every suite in one process, the server it left listening then hung the whole run. The requested port now always reads as busy, and the unit runner passes --test-force-exit so a leaked handle fails fast. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014FkKtAtQus8TVjhG9bhytC
5 of 6 tasks
…nto claude/project-thread-kvvyg6-servers # Conflicts: # apps/vscode-extension/CHANGELOG.md
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.
Requested by Adrián · project thread
Story S4 of the XR environment review epic (audit in
docs/xr-audit/launcher.md, PR #67).What changes
getListeningPort();serverFactoryandmultiServerLauncherreport it to the registry, the session, the URL and the port-change toast. Before, an HTTPS server could fall back to another port while the list and URL showed the requested one.forceStopreleases the port. It now callsserver.close()andcloseAllConnections()instead of only dropping the reference.requestedPort+1 … +100, capped at 65535). The old search stopped at 8080, so a busy 8080 or higher failed every launch.isPortAvailable(port)with no host checks0.0.0.0,127.0.0.1and::1. On macOS and Windows, a port held on localhost only could pass the wildcard probe.Failed to register the server: …and no longer leaves an unlisted listener running.launchServerwas split into small helpers, so the lint warning budget stays at 158.Tests
npm test: 1065/1065 passed, lint at 158/158 warnings.test:xr-harness: passed.serverLifecycle.test.cjs:getListeningPortwhile running and after stop;forceStopcloses the listener; a port held only on loopback is reported busy.Needs a manual check
The localhost and wildcard double-bind (LAUNCHER-13) only reproduces on macOS and Windows. CI runs the unit tests there, but a real launch while another program holds
localhost:3000still needs checking by hand.CHANGELOG
[1.2.1]→ Fixed is updated.Generated by Claude Code