From e31eb8d7c94b03690e01e7559a3711ac713fd6cc Mon Sep 17 00:00:00 2001 From: goodboy Date: Thu, 23 Apr 2026 11:43:06 -0400 Subject: [PATCH] Label forkserver child as `subint_forkserver` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to 72d1b901 (was prev commit adding `debug_mode` for `subint_forkserver`): that commit wired the runtime-side `subint_forkserver` SpawnSpec-recv gate in `Actor._from_parent`, but the `subint_forkserver_proc` child-target was still passing `spawn_method='trio'` to `_trio_main` — so `Actor.pformat()` / log lines would report the subactor as plain `'trio'` instead of the actual parent-side spawn mechanism. Flip the label to `'subint_forkserver'`. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code --- tractor/spawn/_subint_forkserver.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tractor/spawn/_subint_forkserver.py b/tractor/spawn/_subint_forkserver.py index 35ff010d..159d1462 100644 --- a/tractor/spawn/_subint_forkserver.py +++ b/tractor/spawn/_subint_forkserver.py @@ -655,12 +655,16 @@ async def subint_forkserver_proc( loglevel=loglevel, parent_addr=parent_addr, infect_asyncio=infect_asyncio, - # NOTE, from the child-side runtime's POV it's - # a regular trio actor — it uses `_trio_main`, - # receives `SpawnSpec` over IPC, etc. The - # `subint_forkserver` name is a property of HOW - # the parent spawned, not of what the child is. - spawn_method='trio', + # The child's runtime is trio-native (uses + # `_trio_main` + receives `SpawnSpec` over IPC), + # but label it with the actual parent-side spawn + # mechanism so `Actor.pformat()` / log lines + # reflect reality. Downstream runtime gates that + # key on `_spawn_method` group `subint_forkserver` + # alongside `trio`/`subint` where the SpawnSpec + # IPC handshake is concerned — see + # `runtime._runtime.Actor._from_parent()`. + spawn_method='subint_forkserver', ) return 0