tractor/examples
Gud Boi 0457e8f3b1 Add a `wg`-tunnelled 2-host example set
Re-renders gh #482's examples w/ the corrected (infix) maddr
grammar, as the "layer A" slice of the wg plan: declarative
maddrs only, tunnel pre-provisioned out-of-band, zero runtime
changes.

- `wg_maddr.py`: a `frozen=True` `msgspec.Struct` addr carrying
  `bearer`/`peer_pubkey`/`inner` (+ `inner_proto`), a `.maddr`
  property that re-renders the canonical form, and pure
  `mb_pubkey()`/`wg8_pubkey()`/`parse_wg_maddr()`. The parser
  rejects #482's inverted suffix form w/ an actionable error and
  stays **side-effect free** — `verify_wg_peer()` is a separate,
  explicitly impure step the caller composes, never something a
  parse path shells out to.
- `host_a_srv.py`/`host_b_client.py`: the two-host runs, passing
  only `addr.inner` into `open_nursery()`/`open_root_actor()`,
  which is the whole point — the bearer + key layers are already
  established before any bind happens.
- `README.md`: the grammar + the 3-owners table, the `#108`
  branch install line, tunnel setup, and a "what changed vs
  #482" section enumerating the corrections.

Runnable-shaped but **not yet run against a live tunnel**; that's
next, and the reason these sit on the planning branch rather than
in `examples/` proper. `_segments()` marks its stopgap for when
the `wg` codec isn't installed.

(this patch was generated in some part by `claude-code` using `claude-opus-5` (`anthropic`))
2026-08-29 22:02:56 -04:00
..
advanced_faults Include `TransportClosed` in tpt-layer err handling 2026-02-19 13:55:02 -05:00
debugging Polish the debugger examples 2026-08-29 19:01:34 -04:00
discovery Harden the dedicated registrar example 2026-08-29 20:05:28 -04:00
integration Polish the non-debug docs examples 2026-08-29 18:58:43 -04:00
parallelism Polish the non-debug docs examples 2026-08-29 18:58:43 -04:00
trio Polish the non-debug docs examples 2026-08-29 18:58:43 -04:00
wg_lan Add a `wg`-tunnelled 2-host example set 2026-08-29 22:02:56 -04:00
__init__.py Make example a subpkg for `python -m <mod>` testing 2022-07-27 11:40:02 -04:00
__main__.py Use trio.run() in windows tests 2021-05-07 11:21:40 -04:00
a_trynamic_first_scene.py Polish the non-debug docs examples 2026-08-29 18:58:43 -04:00
actor_spawning_and_causality.py Polish the non-debug docs examples 2026-08-29 18:58:43 -04:00
actor_spawning_and_causality_with_daemon.py Polish the non-debug docs examples 2026-08-29 18:58:43 -04:00
asynchronous_generators.py Polish the non-debug docs examples 2026-08-29 18:58:43 -04:00
full_fledged_streaming_service.py Polish the non-debug docs examples 2026-08-29 18:58:43 -04:00
infected_asyncio_echo_server.py Polish the non-debug docs examples 2026-08-29 18:58:43 -04:00
multiple_streams_one_portal.py Polish the non-debug docs examples 2026-08-29 18:58:43 -04:00
nested_actor_tree.py Polish the non-debug docs examples 2026-08-29 18:58:43 -04:00
quick_cluster.py Polish the non-debug docs examples 2026-08-29 18:58:43 -04:00
remote_error_propagation.py Polish the non-debug docs examples 2026-08-29 18:58:43 -04:00
rpc_bidir_streaming.py Polish the non-debug docs examples 2026-08-29 18:58:43 -04:00
service_daemon_discovery.py Polish the non-debug docs examples 2026-08-29 18:58:43 -04:00
service_discovery.py Show the discovered actor address 2026-08-29 20:24:25 -04:00
streaming_broadcast_fanout.py Polish the non-debug docs examples 2026-08-29 18:58:43 -04:00
typed_payloads.py Polish the non-debug docs examples 2026-08-29 18:58:43 -04:00
uds_transport_actor_tree.py Widen `accept_addr` in the UDS example 2026-08-29 21:46:38 -04:00