fix(cookbook): harden remote serve host handling (#4345)

This commit is contained in:
RaresKeY
2026-06-16 05:46:32 +03:00
committed by GitHub
parent 4d10c16d02
commit a031a94a2e
7 changed files with 130 additions and 38 deletions
+8
View File
@@ -68,6 +68,14 @@ def test_valid_remote_builds_port_flag():
assert port_flag == "-p 2222 "
def test_integer_ssh_port_in_stored_task_normalizes_without_crashing():
host, port_flag = codex_routes._ssh_prefix_for_task(
{"remoteHost": "user@box", "sshPort": 2222}
)
assert host == "user@box"
assert port_flag == "-p 2222 "
def test_default_ssh_port_omits_flag():
host, port_flag = codex_routes._ssh_prefix_for_task(
{"remoteHost": "box", "sshPort": "22"}