Skip to content

stella-serve: RemoteToolExecutor cannot forward parked-wait requests across the wire #1858

Description

@macanderson

Problem

Parked waits (#1471) travel from a tool to the engine through ToolExecutor::drain_wait_request (crates/stella-core/src/ports.rs). Every in-process decorator now forwards it, but stella-serve's RemoteToolExecutor (crates/stella-serve/src/remote.rs) remotes each tool call to the host process over the wire and returns only the ToolOutput. A wait request deposited host-side (e.g. the host's ci_status registry slot) has no wire channel back to the server-side engine, so drain_wait_request returns None there and a served session degrades to pre-#1471 behavior: the model polls in model steps.

This is a degradation, not a break — served turns behave exactly as before parked waits existed — but the serve surface silently lacks a capability the CLI has, which is the shape stella-parity exists to catch.

What done looks like

  • A wire message (or a piggyback field on the tool-result frame) carrying an optional serialized WaitRequest (stella_core::waiting::WaitRequest, already serde round-tripped) from host to server after each tool call; RemoteToolExecutor buffers it and serves it from drain_wait_request.
  • The probe/on_wake replays execute host-side through the same remoted path the original call used (the engine calls execute — that part already works once the request arrives).
  • docs/spec/serve-surface.md updated; wire-schema regenerated if frame types carry doc-comment changes.
  • A witness in crates/stella-serve proving a host-deposited request parks a served turn (mirror crates/stella-core/src/driver/tests/parked_wait.rs).
  • Consider a stella-parity row for the capability ('parked waits') with per-surface witnesses, so the CLI/serve gap cannot silently reopen.

Constraints

  • The serve engine holds no ambient authority — the request must ride the existing host-remoting seam, not a side channel.
  • crates/stella-serve/src/remote.rs is not a god file (1308 lines) but check scripts/file-size-baseline.txt before growing it.

Refs #1471.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Polish — worth doing, not urgentarea:servestella-serve — HTTP surface, sessions, reverse requests

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions