Skip to content

transport: a packet of commands too big for the path goes again split - #102

Merged
lucas-romanenko merged 3 commits into
mainfrom
transport/commands-too-big
Nov 24, 2026
Merged

lucas-romanenko merged 3 commits into
mainfrom
transport/commands-too-big

Conversation

@lucas-romanenko

@lucas-romanenko lucas-romanenko commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #105 (and #101, #99). Merge those first.

What. If a stuck packet of two or more commands is bigger than the next chunk size down, and the switcher has been heard all along, it is taken back with everything after it (as #95 does for data chunks). Its commands then go again split into packets that fit, in order, and any chunks of an upload among them go back to their upload. From then on every command packet to that switcher is split to fit as it is sent.

Why. Commands go out several to a packet, up to 1,300 bytes of them (send_commands: a profile restore, 20 labels at once). Over a path that drops datagrams that big, the packet never arrived. The switcher takes our packets in order only, so it took nothing after it either. #95 covered data chunks only.

Before / after (network matrix, 3 runs each, seconds):

1.14.7 this
20 labels, path MTU 576 never (3/3) 2.15
profile restore (labels + a macro), MTU 1,200 fails (3/3; macro upload timed out, nothing restored) 1.76
profile restore, MTU 1,000 fails (3/3) 3.2
profile restore, MTU 576 fails (3/3) 3.4
profile restore, VPN (80 ms, 1 % loss, MTU 1,200) fails (3/3) 2.6
profile restore, MTU 1,280 / ZeroTier-like / LAN 0.10 / 0.18 / 0.02 0.10 / 0.18 / 0.03
20 labels, LAN / MTU 1,200 / VPN 0.0 / 0.04 / 0.08 unchanged

Tests. test_commands_too_big.py has 6 tests. Three fail with the change taken out: a stuck packet of commands goes again split and in order, from where it stood; command packets are split as they go once the size is known; and chunks behind a stuck command packet go back to their upload. The other three guard what must not change: a one-command packet is left alone, a quiet link is not a small path, and packets split only between commands. The matrix cells mtu576/labels and vpn/profile_restore join the CI subset. Full suite passes.

SURFACE §5.4 item 68.

🤖 Generated with Claude Code

lucas-romanenko and others added 2 commits November 24, 2026 13:10
Commands go out several to a packet, up to 1,300 bytes of them. Over a
path that drops datagrams that big the packet never got through, and the
switcher, which takes ours in order only, took nothing after it: 20
labels at path MTU 576 never arrived, and a profile restore over a VPN at
MTU 1,200 restored nothing. The take-back for data chunks too big for the
path (#95) now covers command packets too: a stuck packet of two or more
commands goes again split into packets that fit the next size down, and
from then on every command packet to that switcher is split to fit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lucas-romanenko
lucas-romanenko force-pushed the transport/congestion-window branch from 258a37f to ce78339 Compare November 24, 2026 18:19
@lucas-romanenko
lucas-romanenko force-pushed the transport/commands-too-big branch from ef0d5e8 to 8ce437f Compare November 24, 2026 18:19
…ore #100

#100 (e4119f7) starts a new session when a smaller packet follows a stuck
one, so no sequence number the switcher may hold goes again with other
data. That is right for an upload's chunks, which are carried over to the
new session; a command packet's commands are not, and a profile restore
over a path MTU of 1,200 or 576 (the network matrix's profile_restore,
vpn and mtu1200) lost its labels. The new session is for data chunks only;
a command packet is split and sent again in this session as #102 does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lucas-romanenko
lucas-romanenko changed the base branch from transport/congestion-window to main November 24, 2026 18:44
@lucas-romanenko
lucas-romanenko merged commit b2aae5d into main Nov 24, 2026
16 of 18 checks passed
This was referenced Nov 24, 2026
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