Skip to content

v0.4.6 — the transport acknowledges segmented messages

Choose a tag to compare

@dasimon135 dasimon135 released this 24 Aug 21:05
· 17 commits to main since this release

Added

The transport acknowledges segmented messages.

SegmentAck had a parser and no builder: nothing anywhere emitted one. A peer
that segments its reply and waits to be acknowledged therefore gave up, and the
exchange failed with no error anywhere — the request timed out exactly as if the
node had never received it.

A segmented message addressed to this integration's own unicast is now
acknowledged the moment it is complete, which is the ack the sender is blocked
on. An incomplete one arms the acknowledgment timer (150 ms + 50 ms per TTL hop)
and then reports the block-ack bitfield, so the peer retransmits the segment that
is actually missing rather than the whole message; a stranded transfer is
abandoned after 10 s. A transfer that has already been delivered is
re-acknowledged rather than reassembled a second time — a peer whose ack was lost
retransmits, and that must not surface as a duplicate message.

Messages sent to a group or virtual address are deliberately not acknowledged:
every subscriber would answer the sender at once.

Nothing in day-to-day use depended on this — every lighting command and Status
fits in one segment, which is why it went unnoticed. It blocked the first
device-keyed exchange that does not, which is why v0.4.4 had to abandon Config
Composition Data as a reachability probe and fall back to Config Relay.

Changed

The diagnostics probe no longer disowns its own composition field. v0.4.4
shipped a note telling the reader that a null composition proves nothing, which
was true then: the Status is segmented and nothing could ever complete it. It
completes now. On a node whose answered is true, a null composition is a
finding about that node rather than an artefact of this integration's transport,
and the note says so.

If you are debugging a node that ignores commands, this is the release to take a
fresh diagnostics dump on: the probe now carries two independent signals instead
of one, and the second discriminates.

Fixed

A rejected .connect paste now says why. The import and reconfigure forms
collapsed a truncated paste, a file that is not an export at all, and an export
whose every node is unparseable into one invalid_connect — three different
problems with three different fixes, rendered identically. The parser's own
message is carried through to the form.

A reassembly timer could outlive the connection. Stopping the controller now
closes the node, so a pending acknowledgment cannot fire against a bearer that is
already gone — which would have burned a persisted sequence number on an ack
nothing could carry.

Known limitation

Reassembly is still one transfer at a time across all peers: two nodes segmenting
concurrently destroy each other's transfer. Harmless while this integration
serialises its requests, and tracked in #11.