Add --port to shell/exec --run with fail-on-mismatch policy#16
Merged
Conversation
Forward create-time --port when shell/exec start a missing booth, and refuse to connect when an explicit numeric port disagrees with an existing booth unless --accept-existing is set. Document the contract and cover it with unit and complex tests.
NawaMan
added a commit
that referenced
this pull request
Jul 18, 2026
Add --port to shell/exec --run with fail-on-mismatch policy
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.
Summary
--port(number /NEXT/RANDOM) whenshell/exec --runcreates a missing booth viabooth run --daemon.--portis a contract: mismatch refuses to connect by default so scripts do not hit the wrong environment;--accept-existingconnects with a stderr warning.NEXT/RANDOMapply only on create and are not compared. Improve host-port inspect (running + stopped, 10000/10443).BOOTH_CONNECT.md, changelog), unit tests, and complex testtests/complex/test-connect-run-port/.Test plan
go test ./pkg/lifecycle/ ./cmd/codingbooth/tests/complex/test-connect-run-port/test--connect-run-port.sh(7 cases: create, match, refuse, leave running, accept-existing, NEXT, ephemeral remove)tests/manual/run-shell-run-manual-test.shstill green for keep-alive / concurrent--runbehavior