--- model: claude-fable-5 service: claude timestamp: 2026-07-02T16:58:06Z git_ref: a34aaf98 diff_cmd: git diff a34aaf98..wkt/to_actor_subpkg --- # Raw AI output (diff-ref mode) Step-A code is committed on `wkt/to_actor_subpkg` directly after `a34aaf98`; per diff-ref mode the verbatim content is reachable via the pointers below. ## Generated files > `git diff a34aaf98..wkt/to_actor_subpkg -- tractor/runtime/_supervise.py` New `_reap_ria_portals(an, errors, ria_children=None)` helper (one `_spawn.cancel_on_completion()` task per ria child under `collapse_eg()` + a local nursery); `run_in_actor()` drops `nursery=self._ria_nursery`; happy path awaits the reap right after `._join_procs.set()`; inner error handler snapshots ria pairs, runs `await an.cancel()` then a `move_on_after(0.5)`-bounded reap over the snapshot. > `git diff a34aaf98..wkt/to_actor_subpkg -- tractor/spawn/_trio.py` > `git diff a34aaf98..wkt/to_actor_subpkg -- tractor/spawn/_mp.py` Both backends: the post-`_join_procs` block collapses to a bare `soft_kill()` (membership branch, per-child reaper nursery, reaper-cancel logging and the now-unused `cancel_on_completion` imports all removed). > `git diff a34aaf98..wkt/to_actor_subpkg -- ai/conc-anal/ria_nursery_removal_plan.md` Agent-verified machinery map, 3-step design (A/B/C), probe history (deadlock -> sequencing fix -> bound tightening) and risk register. ## Test runs (verbatim) ``` tests/test_cancellation.py: 20 passed, 1 xfailed in 77.28s tests/test_to_actor.py + tests/test_spawning.py: 20 passed full-suite (SIGINT at 540s bound, ~30s short): 303 passed, 9 skipped, 1 xfailed, 2 xpassed in 539.42s ``` Failed intermediates (not in final diff): concurrent reap+`an.cancel()` deadlocked `test_multierror`; a 3s reap bound blew `test_cancel_while_childs_child_in_sync_sleep`'s `fail_after` deadline.