tractor/ai
Gud Boi 85f1bc1cb4 Keep `Actor.cancel_soon()` in the root nursery
A late self-cancel can arrive after the RPC service nursery has
closed. Starting `Actor.cancel()` there raises before teardown can
cancel the shielded parent-channel loop or run lifetime callbacks.

Schedule one root-owned task to await `Actor.cancel(None)` before
cancelling the root scope. Deduplicate pending requests, and cancel
the root scope directly once runtime cancellation has completed.

Add a fresh-child regression for open and closed service nurseries
under native Trio and asyncio infection. Check repeated requests
before completion, after completion and from a lifetime callback;
prove all three creator-owned shm segments disappear before parent
nursery teardown can mask a failure. Include the session raw record
referenced by the structured provenance already in the parent.

Prompt-IO:
 ai/prompt-io/opencode/20260916_ib_disconnect_cleanup.md

(this patch was generated in some part by `opencode`
using `gpt-6-astra` (`openai`))
2026-10-30 13:13:37 -04:00
..
conc-anal Restore high-fanout startup cancellation stress 2026-08-26 17:00:44 -04:00
prompt-io Keep `Actor.cancel_soon()` in the root nursery 2026-10-30 13:13:37 -04:00
tooling-todos Add `logspec` leaf-mod Route B follow-up doc 2026-06-17 15:47:07 -04:00
tpt-backends Model bindspaces as scoped capabilities 2026-09-01 15:47:26 -04:00