Skip to content

app: a port of its own, never the shared 3080 - #6

Merged
vecnode merged 1 commit into
mainfrom
fix/port-3080
Oct 18, 2026
Merged

vecnode merged 1 commit into
mainfrom
fix/port-3080

Conversation

@vecnode

@vecnode vecnode commented Oct 18, 2026

Copy link
Copy Markdown
Owner

The bug

The first real run of vncode died like this:

dsh: startup failed: 2 required plugins did not activate
  webserver (required)
    Error: listen EADDRINUSE: address already in use 127.0.0.1:3080

ports::choose_port - a free loopback port of the app's own, never the shared 3080 - 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 is EADDRINUSE; 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

start always passes -Port: the value of -Port when a person names one, otherwise a free loopback port. status now 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 the EADDRINUSE sentence) and it is asserted: check-shell.mjs now requires the stub launcher to receive -Port, and requires it not to be 3080.

Checks

cargo build --release --locked -p vn-shell   0.50 MB
cargo clippy --workspace --all-targets -- -D warnings   exit 0
node scripts/checks/check-shell.mjs          OK   (with the new -Port assertion)
node scripts/checks/check-scripts.mjs        OK
node scripts/checks/check-no-secrets.mjs     OK

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.
@vecnode
vecnode merged commit a45e940 into main Oct 18, 2026
5 checks passed
@vecnode
vecnode deleted the fix/port-3080 branch October 18, 2026 19:39
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