Move the `wg_lan` examples under `examples/multihost/`
`tests/test_docs_examples.py` walks `examples/` **recursively** and subproc-runs every collected file asserting `rc == 0`. Ran its exact filter against the tree: all 4 of our files were being collected — including `README.md`, since the filter never checks the extension, so CI would have literally tried `python README.md`. These need a real second host + a live `wg` tunnel, so they can't ever satisfy that gate. `'multihost' not in p[0]` is already in the test's exclusion list w/ no dir yet using it, so this is a pure `git mv` — zero test changes — and it's what the exclusion was plainly there for. Collection drops 24 -> 20 files, 0 of them ours. Also records *why* in the two places someone would look before adding the next one: a callout at the top of the example README and a note on plan 03's §3.4 deliverables. Anything needing a second host or live tunnel goes under `examples/multihost/`. (this patch was generated in some part by `claude-code` using `claude-opus-5` (`anthropic`))ng_tpts_planning
parent
bf974c9870
commit
27c34aebb6
|
|
@ -134,7 +134,8 @@ examples in gh #482) used a *suffix* form
|
||||||
semantically inverted: it puts the overlay addr where the bearer
|
semantically inverted: it puts the overlay addr where the bearer
|
||||||
belongs, `tcp` where wg's `udp` `ListenPort` goes, and declares
|
belongs, `tcp` where wg's `udp` `ListenPort` goes, and declares
|
||||||
no overlay endpoint at all. `parse_wg_maddr()` in
|
no overlay endpoint at all. `parse_wg_maddr()` in
|
||||||
`examples/wg_lan/` now rejects it with an actionable error.
|
`examples/multihost/wg_lan/` now rejects it with an actionable
|
||||||
|
error.
|
||||||
Observed protocol-name lists, for writing the `match`:
|
Observed protocol-name lists, for writing the `match`:
|
||||||
|
|
||||||
| maddr | `[p.name for p in m.protocols()]` |
|
| maddr | `[p.name for p in m.protocols()]` |
|
||||||
|
|
@ -197,7 +198,14 @@ side-effect-free; verification is the *caller's* explicit step
|
||||||
### 3.4 deliverables
|
### 3.4 deliverables
|
||||||
|
|
||||||
- `examples/` scripts distilled from #482 §§3-5 (this is the
|
- `examples/` scripts distilled from #482 §§3-5 (this is the
|
||||||
unchecked "commit examples from ^" bullet in #443).
|
unchecked "commit examples from ^" bullet in #443). They live
|
||||||
|
under `examples/multihost/` — `test_docs_examples.py` walks
|
||||||
|
`examples/` recursively and runs every collected file as a
|
||||||
|
subproc asserting `rc == 0` (it doesn't even filter by
|
||||||
|
extension, so a stray `README.md` would be `python`-run too),
|
||||||
|
and `'multihost' not in p[0]` is already in its exclusion
|
||||||
|
list. Anything needing a real second host or a live tunnel
|
||||||
|
belongs there.
|
||||||
- a `docs/` page: tunnel setup, the maddr form, the two-host
|
- a `docs/` page: tunnel setup, the maddr form, the two-host
|
||||||
run. Keep prose in the docs; keep the examples runnable and
|
run. Keep prose in the docs; keep the examples runnable and
|
||||||
minimal.
|
minimal.
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,13 @@ Supersedes the example set in gh
|
||||||
[#482](https://github.com/goodboy/tractor/issues/482) — see
|
[#482](https://github.com/goodboy/tractor/issues/482) — see
|
||||||
[what changed](#what-changed-vs-482).
|
[what changed](#what-changed-vs-482).
|
||||||
|
|
||||||
|
> **Why `examples/multihost/`?** `tests/test_docs_examples.py`
|
||||||
|
> walks `examples/` recursively and runs everything it collects
|
||||||
|
> as a subproc, asserting `rc == 0`. These need a real second
|
||||||
|
> host and a live `wg` tunnel, so they can't satisfy that;
|
||||||
|
> `'multihost' not in p[0]` is already in the test's exclusion
|
||||||
|
> list, which is what keeps them out of CI.
|
||||||
|
|
||||||
## the maddr form
|
## the maddr form
|
||||||
|
|
||||||
```
|
```
|
||||||
Loading…
Reference in New Issue