---
model: gpt-5.6-sol
service: opencode
timestamp: 2026-08-18T02:17:29Z
git_ref: d9a6e2e9
diff_cmd: git diff HEAD~1..HEAD
---

# Raw output - tunnelled-address handoff completion

Recovered Claude Code session
`7b9c97c4-fff7-4ac4-97fb-35720453308e` and continued its
interrupted `wkts/addr_unpacking` changes.

## Generated code

> `git diff HEAD~1..HEAD -- tractor/discovery/_tunnel.py`

Added frozen `WGTunnelSpec` and `TunnelledAddress` structs. The
wrapper delegates transport identity, validity, bindspace, and wire
serialization to its overlay while retaining tunnel metadata locally.
Added pure helpers to peel nested wrappers and enumerate their tunnel
specs. The module documents why wrappers must be peeled before
`Endpoint` selects the overlay transport backend.

> `git diff HEAD~1..HEAD -- tractor/discovery/_addr.py`

Extended `is_wrapped_addr()` to recognize `TunnelledAddress` without
registering tunnels as message transports, and widened the namespace
identifier type to cover named network namespaces.

> `git diff HEAD~1..HEAD -- tractor/discovery/__init__.py`

Exported the tunnel address API from `tractor.discovery` and updated
the eager-import documentation.

> `git diff HEAD~1..HEAD -- tests/discovery/test_tunnelled_addr.py`

Added focused coverage for delegation, serialization, rewrapping,
namespace fallback, nested peeling order, and frozen structs.

> `git diff HEAD~1..HEAD -- ai/tpt-backends/03_wg_tunnel_bindspace.md`

Clarified that tractor owns the eventual bindspace lifecycle and may
provision the WireGuard iface, routes, and kernel UDP listener through
netlink/`pyroute2`. Kernel socket ownership does not make the bearer an
application `MsgTransport` endpoint.

## Verification

Focused tests:

```text
9 passed in 0.03s
```

Discovery and IPC suites:

```text
67 passed, 2 xpassed
```

The audit removed premature module-level listener hooks. Runtime
integration must peel the wrapper explicitly at bind and dial
boundaries rather than make `._tunnel` impersonate a transport
backend.
