Expand description
Wire format (ServerMsg / ClientMsg) for WS /v1/operators/:sid/ws.
Wire format (= S↔C JSON message schema) for WS /v1/operators/:sid/ws.
ServerMsg = 4 messages the server pushes to the client (Ask / HookBefore /
HookAfter / Spawn).
ClientMsg = 4 messages the client replies with (Answer / HookAck / SpawnAck / SpawnHalt).
§Layer 2 audit (issue #7): halt vs error separation across verbs
spawn_halt was added to disambiguate a controlled halt from a real
worker error on the spawn_ack axis. The other client verbs were
audited for the same shape:
answer(SeniorBridge.ask reply): carriesvalueonly — no ok / failure axis exists. A “halt during a question” would already be expressible by replying with a value that the middleware treats as an abort signal (e.g.nullor a domain-specific sentinel). No siblinganswer_haltis added.hook_ack(SpawnHook.before OK/NG):ok = falsehere is a genuine gate rejection — that is the entire purpose of the hook, not a mix-signal. There is no confusion to fix; nohook_haltis added.spawn_ack: the subject of layer 1.spawn_halthandles it. For the parent module’s message-flow figure, see the doc ofmod.rs.
PendingReply is the intermediate representation delivered over the internal
oneshot reply channel, used to resolve a ClientMsg (arriving from a client)
against the session’s pending HashMap keyed by req_id.
See session::WSOperatorSession::resolve_pending for details.
Enums§
- Client
Msg - Client → server reply messages on
WS /v1/operators/:sid/ws. Each variant resolves the pending oneshot registered under itsreq_id(seesuper::session::WSOperatorSession::resolve_pending). - Server
Msg - Server → client push messages on
WS /v1/operators/:sid/ws. Each variant pairs with aClientMsgreply carrying the samereq_id(exceptHookAfter, which is fire-and-forget).