tractor/ai/prompt-io/claude/20260702T165806Z_a34aaf98_p...

2.4 KiB
Raw Blame History

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_procs is 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 DEADLOCKED test_multierror; a 3s bound blew test_cancel_while_childs_child_in_sync_sleeps fail_after deadline.
  • backends (spawn/_trio.py, spawn/_mp.py) lose the ._cancel_after_result_on_exit membership 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 SIGINTd ~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
  • tractor/spawn/_trio.py — reaper branch + import drop
  • tractor/spawn/_mp.py — same as _trio.py
  • ai/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).