docker: give the docker_exec console a tall default PTY geometry

The docker_exec console resized its exec PTY to 80x24 until a client
sent NAWS. CLIs that page on the PTY window size instead of the
terminal length (the IOS-XR pager) therefore parked long output at
--More-- for clients that never negotiate NAWS — netmiko, bare telnet —
making copilot device commands time out on XRd.

Default the exec to 511x10000 instead (511 matches netmiko's own
'terminal width 511' convention): no paging and no hard wrapping for
non-NAWS clients, while real NAWS clients keep resizing to their actual
geometry as before.

Also updates the project memory record with the confirmed root cause
and the fix.
This commit is contained in:
YueGuobin committed 2026-08-21 21:41:46 +08:00
1 parent 2b81160570
commit fd7594f62e
4 files changed
+52 -47

No files matched your search

@@ -531,6 +531,17 @@ async def test_first_connect_creates_exec(compute_project, manager):
srv._create_exec.assert_called_once()
@pytest.mark.asyncio
async def test_first_connect_sets_tall_default_pty_geometry(compute_project, manager):
"""The exec PTY must start tall/wide: a 24-row initial geometry makes CLIs
that page on the PTY window size (IOS-XR pager) park at --More-- for
clients that never send NAWS (netmiko, bare telnet)."""
srv = _make_lazy_server(compute_project, manager)
await srv.client_connected_hook()
srv._on_naws.assert_called_once_with(511, 10000)
@pytest.mark.asyncio
async def test_reconnect_live_exec_not_recreated(compute_project, manager):
"""Reconnecting while the exec is alive must NOT recreate it."""