Conversation
`tcp_offset()` and `tcp_transform()` have raised on an unanswered readback since 460e4c7, but nothing asserted it. That commit changed the behaviour while applying full TCP transforms through planning and readback, so the guarantee arrived unannounced and unguarded — one refactor away from silently returning to a zero vector. Zero is a legitimate offset. A caller handed `[0, 0, 0]` as a not-answered sentinel cannot tell "the offset is zero" from "there is no controller", and a host that adopts the readback quietly erases the offset the user just set. waldoctl's `RobotClient` forbids exactly that, and par6 carries the same guarantee behind a test (par6#80); this is the parol6 side of it. The test drives the real client against the simulator and proves the two cases are distinguishable: a deliberate `set_tcp_offset(0, 0, 0)` reads back as the value `[0, 0, 0]`, while both readbacks raise `TimeoutError` against a port nothing is listening on. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TvTCMA9Y9RUaVN33JhHCNQ
The test asserted `set_tcp_offset` answered 1, the system-command code. It answers a command index: `SET_TCP_OFFSET` sits in `QUEUED_CMD_TYPES` and lands in queue order, not on arrival. Every test job failed on `assert 264 == 1`, and the readback that followed raced the queue it had not waited for. Wait for the index, and set a non-zero offset before clearing it, so the zero the test reads back is one the controller was told to hold rather than the state it happened to start in. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TvTCMA9Y9RUaVN33JhHCNQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tcp_offset()andtcp_transform()have raised on an unanswered readbacksince 460e4c7 — but nothing asserted it.
That commit ("Apply full TCP transforms through planning and readback",
2026-09-07) changed the behaviour in passing, while doing something else.
The guarantee arrived unannounced and unguarded, which is how
par6#80 came to report parol6 as
still shipping the sentinel twelve days later: nothing in the commit said it
had stopped, and no test said so either. It was one refactor away from
silently returning to a zero vector.
Why a zero vector cannot be the sentinel
Zero is a legitimate offset — a tool deliberately cleared. A caller handed
[0, 0, 0]as a not-answered sentinel cannot tell "the offset is zero" from"there is no controller", and a host that adopts the readback quietly erases
the offset the user just set. waldoctl's
RobotClientsays so in as manywords:
tcp_transform()carries the same rule against an identity transform. Thesibling queries answer
Nonefor this condition and are right to — no realrate or pose is
None. These two are typed as plain lists of floats and haveno spare value, so they raise.
par6 landed the guarantee behind a test in par6#80. This is the parol6 side of
it.
The test
One integration test, through the real client against the simulator — no
fakes. It proves the two cases are distinguishable, which is the entire
point of the contract:
set_tcp_offset(0, 0, 0)reads back as the value[0.0, 0.0, 0.0]TimeoutErroragainst a port nothing is listening onNot yet verified against the violation. The behaviour is already correct on
main, so this test is born green, and a born-green regression test provesnothing until it is shown to fail against the bug. I will reintroduce the
zero-vector return locally, confirm the test fails, and report the result
here before this merges.
Not changed
DryRunRobotClient.tcp_offset()returns theplanner's own offset with no controller in the picture; its zero is real,
not a sentinel.
the guard that was missing.
🤖 Generated with Claude Code
https://claude.ai/code/session_01TvTCMA9Y9RUaVN33JhHCNQ