Commit Graph

3 Commits (645e25c0411287bfa0a6c9fcf3f804a377b84ec5)

Author SHA1 Message Date
Gud Boi 645e25c041 Pin child netns before `trio` spawn checkpoints
Pin the calling task's current netns when `bindspace` is omitted
on Linux/Trio. Retain the scope through child startup so a reused
subprocess worker cannot select a different namespace.

Pass the child-owned FD with its expected device and inode. Check
both before entry, skip `setns()` for an already-current namespace,
and release the transferred FD before runtime setup. Require a
live integer FD for every `Bindspace`.

Add canonical `parent_addr` and `registry_addrs` spawn inputs.
Require an explicit parent to name a live listener and keep each
child's registrar selection in its own `SpawnSpec` and runtime
snapshot, preserving supervisor and sibling inheritance.

Drop async root `bindspace=` entry; retain MP rejection of explicit
bindspaces. Cover real UDS cross-netns bootstrap, stale workers,
concurrent FD borrowers, registrar isolation, and failed starts.

(this patch was generated in some part by `Codex` using `GPT-6`
(`openai`))
2026-09-07 18:29:56 -04:00
Gud Boi 76a65eabb5 Scope `open_root_actor()` to a `Bindspace`
Enter a realized netns before root registry, IPC and runtime
startup, then restore the calling thread before owned bindspace
teardown.

Deats,
- duplicate the namespace FD so caller ownership stays intact
- preserve primary body errors across restore and close failures
- reject persistent `mp_forkserver` roots with stale netns risk
- cover cancellation, real netns entry, UDS RPC and public WG
  composition

Prompt-IO: ai/prompt-io/opencode/20260830T025202Z_b1f6ade8_prompt_io.md

(this patch was generated in some part by `opencode` using `gpt-5.6-sol` (`openai`))
2026-09-07 13:57:56 -04:00
Gud Boi 28c7107933 Move network APIs to lazy `tractor.net`
Move bindspace, tunnel and WireGuard lifecycles out of actor
discovery and expose them through one lazy public package.

Deats,
- keep `import tractor` free of multiaddr, pyroute2 and WG impls
- move network-focused tests under `tests/net`
- update IPC, spawn, docs and multihost callers to the new API
- pin `CURRENT_NETNS` through the calling thread's procfs link

Prompt-IO: ai/prompt-io/opencode/20260830T025201Z_b1f6ade8_prompt_io.md

(this patch was generated in some part by `opencode` using `gpt-5.6-sol` (`openai`))
2026-09-07 13:57:56 -04:00