3.3 KiB
Prompt
Resuming the drop_ria_nursery (wkt) branch after the human’s review pause at ba4af0ad, with the directive:
we need to resolve the remaining outstandings … to finish this endeavour we ideally, - finish the ria-tn hoist into the machinery in
to_actorif possible. - avoid supporting the.run_in_actor()non-blocking API going forward other then if we can re-wrapto_actor.run()per prior discussion with opus4.8. - get the test harness completely green locally and in CI - AND ESPECIALLY without any hangs due to the “the old spawn-backend reaper racedsoft_kill()’s scope-cancel” - update all docs to reflect these changes once we’re happy.
plus mid-flight additions:
make sure both all the test and example code uses the naming
an: ActorNurseryfor variable names
where we at in terms of a potential hackaround design for supporting a to_actor.run_async() … without requiring the same malarky … with a
trio.Eventrelay … i’m totes fine with rejigging the iface to NOT return a Portal as well.
Response summary
Completed the entire #477 run_in_actor removal on drop_ria_nursery (16 commits this session), gated per-commit:
- ported the remaining
test_cancellationgroups (some_cancels_all,nested_multierrors+spawn_and_error, SIGINT + sync-sleep) — one-shots become concurrentto_actor.run()tasks in local task-nurseries; BEG-shape assertions loosened for cancel-on-first + the runtime’scollapse_eg()single-member unwrap (a fully-raced nested tree relays a bare annotatedRemoteActorErrorchain). - fixed a pre-existing
UnboundLocalError(timeoutmatchhad no default arm for non-trio/MTF backends). - ported
test_dynamic_pub_sub, 4 non-debugging examples, all 8debugging/examples (debugger suite byte-identical, 28p/6s;multi_subactorsintroduces the “collect don’t cancel” reap-all replacement pattern), 8 docs pages + theexperimental/_pubsubdocstring. - EXCISED the API + cluster:
run_in_actor,_reap_ria_portals,_cancel_after_result_on_exit,Portal._submit_for_result/_expect_result_ctx/ wait_for_result/result,exhaust_portal,cancel_on_completion,NoResult— net -402 lines. The reap-hang class dissolves structurally (result-waits now only in caller task-scope). - found + fixed a real migration race: mutual-rendezvous peers (
test_trynamic_trio,a_trynamic_first_scene.py) flaked because an eagerly-reaped one-shot dies while its peer still dials the registry-resolved (dead) sockaddr — such peers now pin lifetimes viastart_actor()+ concurrentPortal.run()- explicit
an.cancel().
- explicit
an: ActorNurserynaming sweep across tests/examples (±82 lines, scoped renames, prose untouched).- parked a
to_actor.open_one_shot()design sketch (acm + private task-nursery over blockingrun(); done-Event as memo not cancel-relay; no Portal) in the plan doc.
Files changed
See commits d01a2123..ad42871e on drop_ria_nursery (tests, examples, docs, tractor/{runtime,spawn,to_actor,msg} + _exceptions/_context/experimental).