--- model: gpt-5.6-sol service: opencode session: trio-bindspace-fd-transport timestamp: 2026-08-28T17:29:43Z git_ref: 2ca8c570 scope: code substantive: true raw_file: 20260828T172943Z_2ca8c570_prompt_io.raw.md --- ## Prompt After committing generic pre-handshake child-death detection, the human approved the proposed next Layer C slice: transport a live bindspace capability through the Trio spawn backend. ## Response summary Plumb an optional process-local `Bindspace` through actor spawn APIs. Give a Trio exec child its own inherited namespace descriptor, preserve existing caller `pass_fds`, transport the FD/inode pair through the CLI, and close the temporary parent descriptor on every open-process outcome. Reject unsupported multiprocessing transport explicitly. Exercise the complete Trio path with a real actor that enters a distinct network namespace and reports its namespace and inherited-FD inodes over RPC. ## Files changed - `tractor/runtime/_supervise.py` - accept and relay a child bindspace. - `tractor/to_actor/_api.py` - expose bindspace spawn configuration. - `tractor/spawn/_spawn.py` - relay the bindspace to spawn backends. - `tractor/spawn/_trio.py` - duplicate, transfer, and close the FD. - `tractor/spawn/_mp.py` - reject unsupported MP transport. - `tractor/_child.py` - parse and forward the atomic CLI capability. - `tests/test_netns_spawn.py` - cover transport and cleanup schedules. ## Human edits The human approved the Trio-first transport boundary after reviewing the proposed dependency order, then supplied staged-diff comments across multiple review passes. Human-directed revisions replaced abstract ownership wording with concrete FD and process terminology, clarified descriptor cleanup, preserved existing `pass_fds` explicitly, and replaced the mocked success-path test with a real child actor, real `setns()`, handshake, and RPC round trip inside unprivileged user/network namespaces. Follow-up review added direct parent FD-table verification that the temporary child-bound duplicate is closed after successful spawn. Multiprocessing FD reduction and root-process namespace entry remain separate follow-up slices. No direct manual source edits were observed; the review-driven source revisions were applied by the agent.