--- model: gpt-5.6-sol service: opencode session: tractor-net-api-extraction timestamp: 2026-08-30T02:52:01Z git_ref: b1f6ade8 scope: code substantive: true raw_file: 20260830T025201Z_b1f6ade8_prompt_io.raw.md --- ## Prompt After rebasing the WireGuard Layer C stack, the human questioned the placement of bindspace APIs under `tractor.discovery`, considered new public package names, selected `tractor.net`, and authorized the implementation. ## Response summary Extracted bindspace and tunnel implementations into a lazy `tractor.net` package. Moved public multiaddr, bindspace, tunnel, and WireGuard symbols out of `tractor.discovery`, updated internal imports, tests, examples, and documentation, and added cold-import regressions that keep optional networking dependencies off the root import path. Current-netns attachment pins `/proc/thread-self/ns/net` so calls from non-leader threads retain the caller's namespace rather than the process leader's. ## Files changed - `tractor/net/` - lazy public network API and implementation modules. - `tractor/discovery/` - retain actor discovery and internal address parsing. - `tractor/__init__.py` - expose `tractor.net` lazily. - `tests/net/` - network declaration and lifecycle coverage. - `tests/test_lazy_imports.py` - enforce the lazy package boundary. - `examples/multihost/wg_lan/` - use the public network package. - `docs/` - document network APIs separately from actor discovery. ## Human edits The human rejected `tractor.discovery` as the long-term public home, considered tunnel- and namespace-specific alternatives, and selected the broader `tractor.net` boundary because bindspaces may include plain netns, WireGuard, VRF, veth, and later network resources. The agent applied the resulting source changes; no direct manual edits were observed.