---
model: openai/gpt-5.6-sol
service: opencode
timestamp: 2026-08-21T04:08:03Z
git_ref: 3c1bbe73
diff_cmd: git diff HEAD~1..HEAD
---

Compare the remaining child-registration and reaping experiment with
PR #484, then identify the next review item without changing code.

The next item is the late-child admission race. A spawn can pass
`ActorNursery.start_actor()`'s early cancellation check, then be absent
from `ActorNursery.cancel()`'s child snapshot and register afterward.
The existing reap-request latch releases its monitor but does not send
runtime cancellation, so the monitor can wait forever for a still-live
process.

> `git diff HEAD~1..HEAD -- tractor/runtime/_supervise.py`

`ActorNursery._register_child()` publishes the child, installs its reap
events, and samples `ActorNursery._cancel_called` without a checkpoint.
The two scheduler orderings are then complete: registration first puts
the child in the cancel snapshot, while cancellation first makes the
backend abort the late registration.

> `git diff HEAD~1..HEAD -- tractor/spawn/_mp.py`

The multiprocessing backend registers immediately before `proc.start()`
and refuses to start a process already owned by nursery cancellation.
There is no Trio checkpoint between registration and process startup.

> `git diff HEAD~1..HEAD -- tractor/spawn/_trio.py`

The Trio backend registers immediately after `open_process()` and kills
the newly opened process if cancellation won the registration race. Its
stale unused `get_runtime_vars` import is removed so the touched module
remains lint-clean.

> `git diff HEAD~1..HEAD -- tests/test_to_actor.py`

Deterministic regressions prove late registration observes cancellation
and that the MP backend never starts a process after cancellation owns
its registration.

PR #484 retains the affected generic nursery and spawn-backend paths and
does not close this race. Keep this fix in PR #481 as its own commit;
review bounded post-`CancelAck` reaping separately.
