tractor/tests/discovery
Gud Boi a297a32af6 Fix mutual-rendezvous premature-reap race (#477)
The `test_trynamic_trio` + `a_trynamic_first_scene.py` migration
to paired `to_actor.run()` one-shots carries a race the legacy
`run_in_actor()` shape never had: donny + gretchen each
`wait_for_actor()` (then DIAL) the *other*, but a one-shot is
reaped the instant its own hello returns — so the slower peer
can resolve the winner's registry entry and connect to an
already-dead sockaddr -> `ConnectionRefusedError` boxed as a
`RemoteActorError` (or a reg-wait `TooSlowError`), flaking
~1-in-3 standalone runs.

Mutual-rendezvous peers must OUTLIVE both dialogs, so pin the
lifetimes explicitly: `start_actor()` both as daemons, run both
hellos concurrently via bg `Portal.run()` tasks, then reap with
`an.cancel()` only after the task-nursery joins. (The legacy
teardown-reap provided this pinning implicitly — one of the
few places its semantics were ever actually relied upon.)

Gate: `-k trynamic` standalone x8 green (was flaking); full
`test_registrar` module + the example-runner green.

(this patch was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
2026-07-06 13:21:31 -04:00
..
__init__.py Add `test_multiaddr.py` suite for `mk_maddr()` 2026-04-14 19:54:14 -04:00
conftest.py Mv `daemon` + `test_multi_program` to `discovery/` 2026-06-17 17:39:44 -04:00
test_multi_program.py Use `aid.uid` over manual `(name, uuid)` tuples 2026-06-27 21:38:30 -04:00
test_multiaddr.py Add `parse_endpoints()` to `_multiaddr` 2026-04-14 19:54:14 -04:00
test_registrar.py Fix mutual-rendezvous premature-reap race (#477) 2026-07-06 13:21:31 -04:00
test_tpt_bind_addrs.py Fix `test_registrar_merge_binds_union` for UDS collision 2026-04-14 19:54:15 -04:00