tractor/tests/ipc
Gud Boi e269bbf871 Add the `TIPC_TOP_SRV` name-event wire codec
First half of plan 01 §5.2 (layer B): the `struct` layouts and
the `TIPCNameEvent` type for the kernel's *push-based* name
table, w/o any socket plumbing yet. Pure-python, so it tests
w/o a loaded `tipc` module.

Deats,
- `_SUBSCR_FMT = '=5I8s'` (28B `struct tipc_subscr`) and
  `_EVENT_FMT = '=10I8s'` (48B `struct tipc_event`).
- `_mk_subscr()` masks the timeout: python exposes
  `TIPC_WAIT_FOREVER` as **`-1`** which `struct` flat refuses
  to pack into an unsigned `'I'`.
- `_decode_name_event()` *drops* runt frames and unknown event
  codes rather than raising — a confused kernel must not be
  able to kill the reader task.

XXX two corrections to what the plan §5.2 sketch claimed, both
verified against a live kernel,
- the event is **48B** (`4+4+4+8+28`), NOT 40.
- native (`'='`) byte-order is **accepted**; publish+withdraw
  both round-tripped w/ the 28B subscription echoed back
  intact. So the proposed `_detect_topsrv_endianness()` `'>'`
  retry-probe is unnecessary and is NOT implemented.

Note the event carries no *scope* — the name-table doesn't
report one — so the decoded `.addr` echoes the subscription's
own rather than pretending to observe it.

(this patch was generated in some part by `claude-code` using `claude-opus-5` (`anthropic`))
2026-08-15 01:37:13 -04:00
..
__init__.py Start a very basic ipc-server unit test suite 2025-07-13 15:26:37 -04:00
test_each_tpt.py Update tests+examples imports for new subpkgs 2026-04-02 17:59:13 -04:00
test_multi_tpt.py Add `enable_transports`/`registry_addrs` proto guard 2026-06-17 17:39:44 -04:00
test_server.py Pin `Endpoint` addr-reconciliation for tcp/uds 2026-08-14 10:02:44 -04:00
test_tipc.py Add the `TIPC_TOP_SRV` name-event wire codec 2026-08-15 01:37:13 -04:00