tractor/tractor
Gud Boi 7343c943fa Add `open_topology_events()`, push-based discovery
Second half of layer B: an `@acm` yielding a `trio` receive-chan
of `TIPCNameEvent` fed by a nursery-spawned reader on a
`SOCK_SEQPACKET` conn to `TIPC_TOP_SRV`.

This is the bit that makes #378's "end game cluster proto" claim
real — the kernel *tells* us when any actor anywhere in the
cluster publishes or withdraws a service name, so a registrar
never has to poll `find_actor()`. Groundwork for the push
registry in `discovery/_registry.py` (gh #184, #216).

Deats,
- `filt` selects granularity; `TIPC_SUB_SERVICE` is one event
  per *name*, `TIPC_SUB_PORTS` one per *publisher* — the latter
  makes the §2.3 duplicate-name/round-robin crosstalk case
  externally observable, which is how a push-registry could
  ever detect it.
- a full event buf **drops** w/ a loud warning rather than
  blocking the reader; stalling it just backs up the kernel's
  own queue and loses the event less visibly.
- `SOCK_SEQPACKET` is fine here bc this sock never goes through
  `MsgpackTransport` — the contract's "`SOCK_STREAM` only" rule
  is about `MsgTransport` streams, not this.

XXX teardown order is load-bearing: cancel the nursery BEFORE
closing the fd. `.close()`ing out from under a pending
`.recv()` races — trio's retry can land on an already-freed fd
and raise a bare `OSError(EBADF)` instead of the
`ClosedResourceError` the reader guards for, which then escapes
the nursery as an eg.

(this patch was generated in some part by `claude-code` using `claude-opus-5` (`anthropic`))
2026-08-29 22:58:48 -04:00
..
_testing Register `tipc` in the tpt tables + test harness 2026-08-29 22:58:46 -04:00
devx Fix `pformat_caller_frame()`s bogus `indent` kwarg 2026-08-18 20:13:07 -04:00
discovery Add the interim `/tipc/` maddr grammar 2026-08-29 22:58:48 -04:00
experimental Reap the `@pub` example daemon on stream exit 2026-08-25 20:03:18 -04:00
ipc Add `open_topology_events()`, push-based discovery 2026-08-29 22:58:48 -04:00
msg Widen `UnwrappedAddress` to admit proto-keyed addrs 2026-08-29 22:55:38 -04:00
runtime Register `tipc` in the tpt tables + test harness 2026-08-29 22:58:46 -04:00
spawn Remove `run_in_actor()` + the ria reap cluster 2026-08-25 19:16:32 -04:00
to_actor Remove `run_in_actor()` + the ria reap cluster 2026-08-25 19:16:32 -04:00
trionics Reject concurrent `BroadcastReceiver.receive()` calls 2026-08-27 22:11:55 -04:00
__init__.py Add `tractor.to_actor` one-shot task API subpkg 2026-08-21 15:03:34 -04:00
_child.py Add per-actor `setproctitle` via `devx._proctitle` 2026-06-17 17:39:44 -04:00
_clustering.py Use `.aid.uid` to avoid deprecation warns 2026-03-13 21:10:52 -04:00
_code_load.py Mv `load_module_from_path()` to a new `._code_load` submod 2026-02-11 21:03:29 -05:00
_context.py Remove `run_in_actor()` + the ria reap cluster 2026-08-25 19:16:32 -04:00
_exceptions.py Remove `run_in_actor()` + the ria reap cluster 2026-08-25 19:16:32 -04:00
_root.py Move registrar probes to `discovery._api` 2026-08-14 18:43:36 -04:00
_streaming.py Clean broadcast cancellation diagnostics 2026-08-27 21:18:00 -04:00
log.py Retain dynamic logger caller discovery 2026-08-12 20:52:47 -04:00
to_asyncio.py Clean broadcast cancellation diagnostics 2026-08-27 21:18:00 -04:00