2.4 KiB
Prompt
Follow-up round in the same session as the tractor.to_actor landing (see 20260702T154255Z_65bf9df5_prompt_io.md). After committing that work the user green-lit the deferred items:
go go go on this with what time you have left, in particular see if you can get the _ria_nursery removal going!
then extended the deadline twice to iterate on the discovered hang:
continue on this up until a 12:58:30 deadline
and finally chose “Commit step A now” from the next-steps prompt.
Response summary
Step A of the ._ria_nursery removal (issue #477): hoist .run_in_actor() result-reaping out of the spawn backends into the ActorNursery machinery so ria children spawn via the default daemon nursery,
- new
_supervise._reap_ria_portals()runs one_spawn.cancel_on_completion()task per ria child AFTER._join_procsis set; happy path awaits it right after._join_procs.set(). - error path SEQUENCES: snapshot ria
(portal, subactor)pairs ->await an.cancel()-> 0.5s-bounded reap. Two failed intermediates informed this: a concurrent reap+cancel DEADLOCKEDtest_multierror; a 3s bound blewtest_cancel_while_childs_child_in_sync_sleep’sfail_afterdeadline. - backends (
spawn/_trio.py,spawn/_mp.py) lose the._cancel_after_result_on_exitmembership branch, per-child reaper nursery + dead imports. - design/probe-history doc:
ai/conc-anal/ria_nursery_removal_plan.md(from an agent-verified machinery map).
Verification: test_cancellation.py fully green (20 passed, 1 xfailed) incl. the previously-hung test_multierror; test_to_actor+test_spawning 20/20; bounded full-suite gate SIGINT’d ~30s early at 303 passed / 0 failures (user opted to commit on that signal, deferring the unbounded re-run to step-B verification).
Files changed
tractor/runtime/_supervise.py—_reap_ria_portals()- two call-sites;
run_in_actor()off the ria nursery
- two call-sites;
tractor/spawn/_trio.py— reaper branch + import droptractor/spawn/_mp.py— same as_trio.pyai/conc-anal/ria_nursery_removal_plan.md— plan + probe history
Human edits
None yet — committed via the drafted .claude/git_commit_msg_ria_step_a.md (user-driven git commit --edit).