tractor/examples
Gud Boi d9a6e2e9b4 Retract the hand-rolled tunnel peeler from plan-03
§3.2 specced a pure fn `_peel_tunnel_segs(proto_names) ->
(bearer_names, tunnel_specs, overlay_names)` to split a maddr at
its tunnel seg. It should never be written: `py-multiaddr` ships
that whole surface already and the plan simply missed it, even
though gh #443's 2nd bullet links the README sections in
question.

Replaced w/ a ⚠️ CORRECTION carrying the verified API table
(`.decapsulate_code(P_WG)` for the bearer, `.split()`/`.join()`
for a seg tail, `.value_for_protocol()` to read a value,
`.encapsulate()` to recompose) plus *why* it works on an infix
`/wg/` seg: the cut is by proto-code, never by matching an addr
value, and the key seg has no addr of its own.

Also,
- adopt `bearer`/`overlay` as the role names throughout, and say
  plainly why not `inner`/`outer` — the call-stack reading of
  "inner" is the exact opposite of the encapsulation one.
- warn that `value_for_protocol('ip4')` on a full tunnelled
  maddr silently yields the *bearer's* host; only call it on a
  peeled sub-maddr.
- note nesting (wg-in-wg) falls out of `.decapsulate_code()`
  cutting at the *last* occurrence, so peel repeatedly rather
  than recursing through a bespoke splitter.
- `mk_maddr()` for `TunnelledAddress` is `.encapsulate()`
  composition, not `str` building.
- README: drop the "degrades to a plain segment split" para,
  since that path is gone — no codec now means one actionable
  raise.

(this patch was generated in some part by `claude-code` using `claude-opus-5` (`anthropic`))
2026-08-17 17:25:20 -04:00
..
advanced_faults Include `TransportClosed` in tpt-layer err handling 2026-02-19 13:55:02 -05:00
debugging Fix review nits from PR #460 self-review 2026-06-28 13:29:01 -04:00
integration mpi integration test 2026-04-10 20:58:54 -04:00
multihost/wg_lan Retract the hand-rolled tunnel peeler from plan-03 2026-08-17 17:25:20 -04:00
parallelism Rework landing example onto the `Context` API 2026-06-28 13:29:02 -04:00
trio Reduce "ignore cases" script to `trio`-only 2025-09-07 18:49:21 -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 Use `.wait_for_result()` in dated examples 2026-06-28 13:29:01 -04:00
actor_spawning_and_causality.py Use `.wait_for_result()` in dated examples 2026-06-28 13:29:01 -04:00
actor_spawning_and_causality_with_daemon.py Drop lingering rpc_module_paths refs 2021-05-07 11:21:40 -04:00
asynchronous_generators.py Terminate async gen example caller to avoid (benign) errors in console output 2021-08-02 21:49:15 -04:00
full_fledged_streaming_service.py Final try, drop logging level in streaming example to see if macos can cope.. 2026-03-09 19:46:42 -04:00
infected_asyncio_echo_server.py Swap `open_channel_from()` to yield `(chan, first)` 2026-03-13 19:28:57 -04:00
multiple_streams_one_portal.py Update all examples to new streaming API 2021-04-28 12:23:08 -04:00
nested_actor_tree.py Add 5 examples filling doc-tutorial gaps 2026-06-28 13:29:01 -04:00
quick_cluster.py Remove lingering seg=False-flags from examples 2025-08-18 12:03:10 -04:00
remote_error_propagation.py Drop lingering rpc_module_paths refs 2021-05-07 11:21:40 -04:00
rpc_bidir_streaming.py Drop now-deprecated deps on modern `trio`/Python 2025-03-16 16:06:24 -04:00
service_daemon_discovery.py Add 5 examples filling doc-tutorial gaps 2026-06-28 13:29:01 -04:00
service_discovery.py Rename `Arbiter` -> `Registrar`, mv to `discovery._registry` 2026-04-02 17:59:13 -04:00
streaming_broadcast_fanout.py Add 5 examples filling doc-tutorial gaps 2026-06-28 13:29:01 -04:00
typed_payloads.py Add 5 examples filling doc-tutorial gaps 2026-06-28 13:29:01 -04:00
uds_transport_actor_tree.py Fix review nits from PR #460 self-review 2026-06-28 13:29:01 -04:00