Repository navigation
fix(agentos): answer runtime requests from every child of a WebAssembly shell - #2026
Conversation
|
This PR was not deployed automatically as @eersnington does not have access to the Railway project. In order to get automatic PR deploys, please add @eersnington to your workspace on Railway. |
| // The parent's poll queues every supervisor-owned event, but a | ||
| // JavaScript child can also expose one before the parent polls. | ||
| None => child.runtime == GuestRuntimeKind::JavaScript, |
There was a problem hiding this comment.
🔴 High · Probe empty non-JavaScript child queues
A Python child’s first VFS request is still in its runtime event receiver, so pending_execution_events.front() is None here and this returns false. The WASM-parent branch then continues without calling try_poll_execution_event; if the parent reaches child_process.poll first, that same request is polled without owned_python_services and fails with ERR_AGENTOS_PYTHON_EVENT_OWNERSHIP instead of being serviced. This leaves the Python-under-shell path added by the E2E test dependent on a queue state that normal runtime events do not create. Probe children of every runtime when this queue is empty (for example, let the existing preserving nowait poll run for None) so Python VFS requests and WASM internal RPCs can be discovered and claimed.
There was a problem hiding this comment.
slop. prod's dispatcher uses poll_owned_descendant_javascript_child_process which
- reads the python request
- queues it for the supervisor
- calls notify_one()
the shell queues the py req, and this fix handles it. this is looking at the wrong code path
Fixes #2012.
sh, the process pump claimed supervisor-owned events only from JavaScript children. A Python child never got its filesystem requests answered, and a nested shell never got itschild_process.spawnanswered. Sosh -c 'python3 -c "…"',echo … | python3 -, andsh -c "sh -c 'cat f'"hung with no output.child_process.poll.shell_children_of_every_runtime_run_to_completiontocrates/client/tests/process_e2e.rs. It runs Python, piped Python, a Python exit status, and a nested shell through onesh.