tractor/tractor/ipc
Gud Boi bceca74eb7 Fix UDS addr corruption sans-autobind (macOS)
`MsgpackUDSStream.get_stream_addrs()` matches the
`(peername, sockname)` pair by type to find the listener's
fs-path, but the `(str, str)` arm unconditionally takes
`peername`: on platforms without linux's
`SO_PASSCRED`-triggered autobind (macOS!) the accept side's
`getpeername()` is `''`, so every accepted conn gets garbage
`Path('')` laddr/raddr structs.

Proven on linux by disabling `SO_PASSCRED` (no autobind ->
same `''` shape as darwin): the `uds_transport_actor_tree.py`
example reports `listener sock file: .` pre-fix and the real
registry sockpath post-fix.

- pick the non-empty name in the `(str, str)` arm: `peername`
  on the connect side, `sockname` on the accept side; raise
  `ValueError` on an (unexpected) empty pair.
- document the linux-autobind origin of the `bytes` arms
  which the original impl noted as "unclear".
- `start_listener()`: create the bindspace dir with
  `parents=True, exist_ok=True` (nested custom `filedir`s +
  racing actors).
- example docstring: peer-pid comes via `SO_PEERCRED` on
  linux but `LOCAL_PEERPID` on macOS.

May not be the (only) macOS crasher for GH #473 — it is
non-fatal on the linux sim — but with stderr surfacing now
in place the next macOS CI run pins any remaining layer.

Prompt-IO: ai/prompt-io/claude/20260702T155006Z_65bf9df5_prompt_io.md

(this patch was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
2026-08-13 15:46:56 -04:00
..
__init__.py Move concrete `Address`es to each tpt module 2025-07-08 18:05:05 -04:00
_chan.py Drop resolved channel log-guard TODO 2026-08-12 12:51:43 -04:00
_fd_share.py Move concrete `Address`es to each tpt module 2025-07-08 18:05:05 -04:00
_linux.py Address Copilot review nits on PR #462 2026-06-18 13:37:55 -04:00
_mp_bs.py Fix `SharedMemory` under `subint_forkserver` 2026-06-17 17:39:44 -04:00
_ringbuf.py Add buf_size to RBToken and add sender cancel test, move disable_mantracker to its own _mp_bs module 2025-07-08 12:57:28 -04:00
_server.py Use `is not None` check for peer-connect `event` 2026-06-24 18:19:16 -04:00
_shm.py Fix `SharedMemory` under `subint_forkserver` 2026-06-17 17:39:44 -04:00
_tcp.py Keep lazy annotations runtime-resolvable 2026-08-12 20:52:15 -04:00
_transport.py Guard receive-path transport rendering 2026-08-12 13:48:40 -04:00
_types.py Factor actor-embedded IPC-tpt-server to `ipc` subsys 2025-07-08 18:05:05 -04:00
_uds.py Fix UDS addr corruption sans-autobind (macOS) 2026-08-13 15:46:56 -04:00