Repository navigation
app: a port of its own, never the shared 3080 - #6
Merged
Merged
Conversation
Measured on the first real run: 'vncode' asked run-web for its default and the harness died with EADDRINUSE 127.0.0.1:3080, because the session's own harness was already answering there. ports::choose_port survived the cut; start() simply stopped calling it. It calls it again - a free loopback port unless -Port names one - and passes it as -Port, and that rule is now written down where the next editor will meet it (main.rs, app/README.md, INSTALL.md) and asserted by check-shell.mjs: the stub launcher must receive -Port, and it must not be 3080. status also names the port it would use.
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.
The bug
The first real run of
vncodedied like this:ports::choose_port- a free loopback port of the app's own, never the shared3080- survived the cut.start()simply stopped calling it and let run-web fall back to its default. On a machine whose harness is already answering on 3080 that isEADDRINUSE; where 3080 is free it is worse, because the tab would share an origin with a process whose launch token this run does not have.The fix
startalways passes-Port: the value of-Portwhen a person names one, otherwise a free loopback port.statusnow prints the port it would use.The rule is written where the next editor will meet it (
main.rs,app/README.md,docs/INSTALL.md- including a troubleshooting row for theEADDRINUSEsentence) and it is asserted:check-shell.mjsnow requires the stub launcher to receive-Port, and requires it not to be 3080.Checks