tractor/ai/prompt-io/opencode/20260826T030534Z_d130431c_p...

1.4 KiB

Raw output - retain realized bindspace identity

After committing WireGuard bindspace composition, the human requested the next incremental Layer C change.

git diff HEAD~1..HEAD -- tractor/discovery/_tunnel.py tractor/discovery/__init__.py tests/discovery/test_tunnelled_addr.py tests/ipc/test_server_tunnel_boundary.py ai/tpt-backends/03_wg_tunnel_bindspace.md

Added optional BindspaceIdentity metadata to frozen TunnelledAddress declarations and a pure with_bindspace_identity() annotation helper. Unrealized declarations retain their prior serialized shape. Realized declarations retain only serializable key/inode identity, never the FD-bearing capability.

The existing .namespace tuple contract remains compatible: unrealized declarations report (kind, key), while realized declarations report the stable (kind, inode). Name mismatches between the tunnel declaration and realized bindspace are rejected.

Unit coverage verifies immutability, serialization, delegation and mismatch handling. The existing real TCP listener test proves endpoint and server diagnostics expose the retained inode without implying that the process entered that namespace. Ruff passed and focused tunnel, listener and bindspace coverage passed 30 tests.