Skip to content

Add --port to shell/exec --run with fail-on-mismatch policy#16

Merged
NawaMan merged 1 commit into
mainfrom
feature/exec-shell-run-port
Jul 17, 2026
Merged

Add --port to shell/exec --run with fail-on-mismatch policy#16
NawaMan merged 1 commit into
mainfrom
feature/exec-shell-run-port

Conversation

@NawaMan

@NawaMan NawaMan commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • Forward create-time --port (number / NEXT / RANDOM) when shell / exec --run creates a missing booth via booth run --daemon.
  • Against an existing booth, an explicit numeric --port is a contract: mismatch refuses to connect by default so scripts do not hit the wrong environment; --accept-existing connects with a stderr warning.
  • Symbolic NEXT / RANDOM apply only on create and are not compared. Improve host-port inspect (running + stopped, 10000/10443).
  • Docs (BOOTH_CONNECT.md, changelog), unit tests, and complex test tests/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)
  • Optional: tests/manual/run-shell-run-manual-test.sh still green for keep-alive / concurrent --run behavior

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
NawaMan merged commit dd9eb84 into main Jul 17, 2026
1 check passed
NawaMan added a commit that referenced this pull request Jul 18, 2026
Add --port to shell/exec --run with fail-on-mismatch policy
@NawaMan
NawaMan deleted the feature/exec-shell-run-port branch July 18, 2026 20:31
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