tractor/examples
Gud Boi f086664b3e Fix silently-corrupt keys in `parse_wg_maddr()`
`_segments()` called `Multiaddr(maddr)` purely to validate, then
swallowed every failure under `except Exception: pass`. That was
harmless pre-#108 — w/o a `wg` codec there was nothing to
validate — but now that the codec is pinned in, the swallow is
load-bearing and disabled: a malformed key sails past validation
into `wg8_pubkey()`, which happily emits a corrupt b64 str, and
the returned struct then fails its own `.maddr` round-trip. No
raise, just quietly wrong output.

Deats,
- add `_have_wg_maddr_proto()`, the gate plan-03 already
  referenced but which never actually existed. Impl'd as
  `protocols.protocol_with_name('wg')` under
  `except ProtocolNotFoundError` and cached in a mod global,
  same shape as the TIPC plan's `is_tipc_available()`.
- only validate when that gate is `True`, and let
  `StringParseError` propagate — a maddr which doesn't parse
  must NOT reach `wg8_pubkey()`.
- keep the degraded split for a pre-#108 install, now w/ an
  explicit `XXX` naming the validation you give up.

So parsing stays pure but becomes total-or-raises. Our own
`ValueError`s (missing `/wg/` seg, bare tunnel w/o an overlay
ep) are unaffected, as is the `wg(8)` b64 round-trip.

(this patch was generated in some part by `claude-code` using `claude-opus-5` (`anthropic`))
2026-08-29 22:00:06 -04:00
..
advanced_faults Include `TransportClosed` in tpt-layer err handling 2026-02-19 13:55:02 -05:00
debugging Name every `ActorNursery` binding `an` in tests/examples 2026-08-25 19:19:28 -04:00
integration Name every `ActorNursery` binding `an` in tests/examples 2026-08-25 19:19:28 -04:00
multihost/wg_lan Fix silently-corrupt keys in `parse_wg_maddr()` 2026-08-29 22:00:06 -04:00
parallelism Name every `ActorNursery` binding `an` in tests/examples 2026-08-25 19:19:28 -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 Polish `to_actor` examples and references 2026-08-25 15:20:34 -04:00
actor_spawning_and_causality.py Showcase `to_actor.run()` across docs 2026-08-21 15:03:34 -04:00
actor_spawning_and_causality_with_daemon.py Name every `ActorNursery` binding `an` in tests/examples 2026-08-25 19:19:28 -04:00
asynchronous_generators.py Name every `ActorNursery` binding `an` in tests/examples 2026-08-25 19:19:28 -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 Name every `ActorNursery` binding `an` in tests/examples 2026-08-25 19:19:28 -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 Showcase `to_actor.run()` across docs 2026-08-21 15:03:34 -04:00
rpc_bidir_streaming.py Name every `ActorNursery` binding `an` in tests/examples 2026-08-25 19:19:28 -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 UDS addr corruption sans-autobind (macOS) 2026-08-13 15:46:56 -04:00