tractor/tractor
Gud Boi 8aee24e83f Fix when root-actor addrs is set as rtvs
Move `_root_addrs` assignment to after `async_main()` unblocks (via
`.started()`) which now delivers the bind addrs , ensuring correct
`UnwrappedAddress` propagation into `._state._runtime_vars` for
non-registar root actors..

Previously for non-registrar root actors the `._state._runtime_vars`
entries were being set as `Address` values which ofc IPC serialize
incorrectly rn vs. the unwrapped versions, (well until we add a msgspec
for their structs anyway) and thus are passed in incorrect form to
children/subactors during spawning..

This fixes the issue by waiting for the `.ipc.*` stack to
bind-and-resolve any randomly allocated addrs (by the OS) until after
the initial `Actor` startup is complete.

Deats,
- primarily, mv `_root_addrs` assignment from before `root_tn.start()`
  to after, using started(-ed) `accept_addrs` now delivered from
  `._runtime.async_main()`..
- update `task_status` type hints to match.
- unpack and set the `(accept_addrs, reg_addrs)` tuple from
  `root_tn.start()` call into `._state._runtime_vars` entries.
- improve and embolden comments distinguishing registrar vs non-registrar
  init paths, ensure typing reflects wrapped vs. unwrapped addrs.

Also,
- add a masked `mk_pdb().set_trace()` for debugging `raddrs` values
  being "off".
- add TODO about using UDS on linux for root mailbox
- rename `trans_bind_addrs` -> `tpt_bind_addrs` for clarity.
- expand comment about random port allocation for
  non-registrar case

(this commit msg was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
2026-02-11 22:17:26 -05:00
..
_testing Mk `.devx._debug` a sub-pkg `.devx.debug` 2025-07-14 00:00:12 -04:00
devx Drop `name=__name__` from all `get_logger()` calls 2026-02-11 21:04:49 -05:00
experimental Add API-modernize-todo on `experimental._pubsub.fan_out_to_ctxs` 2025-07-08 18:05:05 -04:00
ipc Cleaups per copilot PR review 2026-02-11 21:51:40 -05:00
msg Drop `name=__name__` from all `get_logger()` calls 2026-02-11 21:04:49 -05:00
trionics Drop `name=__name__` from all `get_logger()` calls 2026-02-11 21:04:49 -05:00
__init__.py move tractor._ipc.py into tractor.ipc._chan.py 2025-07-08 12:57:28 -04:00
_addr.py Drop `name=__name__` from all `get_logger()` calls 2026-02-11 21:04:49 -05:00
_child.py Adjust `._child` instantiation of `Actor` to use newly named `uuid` arg 2025-07-08 12:57:28 -04:00
_clustering.py Fix cluster suite, chng to new `gather_contexts()` 2025-08-18 10:46:37 -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 Drop `name=__name__` from all `get_logger()` calls 2026-02-11 21:04:49 -05:00
_discovery.py Drop `name=__name__` from all `get_logger()` calls 2026-02-11 21:04:49 -05:00
_entry.py Drop `name=__name__` from all `get_logger()` calls 2026-02-11 21:04:49 -05:00
_exceptions.py Move `.is_multi_cancelled()` to `.trioniics._beg` 2025-07-16 15:49:18 -04:00
_forkserver_override.py Re-license code base for distribution under AGPL 2021-12-14 23:33:27 -05:00
_mp_fixup_main.py Avoid importing mp for as long as possible 2022-02-17 11:55:26 -05:00
_multiaddr.py Fix doc string "its" typo.. 2025-03-20 19:50:31 -04:00
_portal.py Drop `name=__name__` from all `get_logger()` calls 2026-02-11 21:04:49 -05:00
_root.py Fix when root-actor addrs is set as rtvs 2026-02-11 22:17:26 -05:00
_rpc.py Drop `tn` arg to `maybe_raise_from_masking_exc()` in `._rpc` 2025-08-20 12:45:49 -04:00
_runtime.py Fix when root-actor addrs is set as rtvs 2026-02-11 22:17:26 -05:00
_spawn.py Add attempt at non-root-parent REPL guarding 2025-08-19 14:15:14 -04:00
_state.py Add initial `repl_fixture` support B) 2025-07-14 00:00:12 -04:00
_streaming.py Drop `name=__name__` from all `get_logger()` calls 2026-02-11 21:04:49 -05:00
_supervise.py Drop `name=__name__` from all `get_logger()` calls 2026-02-11 21:04:49 -05:00
log.py Cleaups per copilot PR review 2026-02-11 21:51:40 -05:00
to_asyncio.py Use bare `get_logger()` in `.to_asyncio` 2026-02-11 22:02:41 -05:00