Found by a review pass over feat/rework-manager-api. Both are in implementation/src/manager/socket.rs, which is owned elsewhere — filing rather than patching.
1. run does semantic validation and module locking before allocating an ID
socket.rs:481, :491, :504.
The protocol (docs/website/src/impl-spec/appendix/manager-socket.rst:131) says the genvm_id is returned immediately and that request validation, permit acquisition and spawning complete asynchronously, with failures arriving as a terminal event.
In practice a request with non-empty host_hello_data[1], or one needing modules while modules are stopped, gets a direct error with no genvm_id and no terminal event. Module-lock acquisition can also delay the response.
Binary decode necessarily precedes ID allocation. But the semantic rejection classes should either move into supervision, or be documented as synchronous exceptions.
2. attach can enqueue a terminal notification before its own response
socket.rs:558, :582.
If a run finishes between taking the attach snapshot and sending the response, subscribe() spawns the forwarder before the response is queued; on a multithreaded runtime the forwarder can win and enqueue the terminal event first. The in-tree client expects the attach reply to be the next frame (tests/system/manager-socket/test.py:336) and fails.
Scheduler-dependent, but reachable. The run handler already does this correctly: retain the created receiver, enqueue the response, then start forwarding.
Found by a review pass over
feat/rework-manager-api. Both are inimplementation/src/manager/socket.rs, which is owned elsewhere — filing rather than patching.1.
rundoes semantic validation and module locking before allocating an IDsocket.rs:481,:491,:504.The protocol (
docs/website/src/impl-spec/appendix/manager-socket.rst:131) says thegenvm_idis returned immediately and that request validation, permit acquisition and spawning complete asynchronously, with failures arriving as a terminal event.In practice a request with non-empty
host_hello_data[1], or one needing modules while modules are stopped, gets a direct error with nogenvm_idand no terminal event. Module-lock acquisition can also delay the response.Binary decode necessarily precedes ID allocation. But the semantic rejection classes should either move into supervision, or be documented as synchronous exceptions.
2.
attachcan enqueue a terminal notification before its own responsesocket.rs:558,:582.If a run finishes between taking the attach snapshot and sending the response,
subscribe()spawns the forwarder before the response is queued; on a multithreaded runtime the forwarder can win and enqueue the terminal event first. The in-tree client expects the attach reply to be the next frame (tests/system/manager-socket/test.py:336) and fails.Scheduler-dependent, but reachable. The
runhandler already does this correctly: retain the created receiver, enqueue the response, then start forwarding.