Skip to main content

Module turn

Module turn 

Source
Expand description

The universal actor turn runner (PSP-10 system 27, Phase 9).

One turn discipline for every stochastic actor — worker, explorer, architect, adjudicator, evidence summarizer, and capability probe: resolve the route, check the resident-context budget before any transport call (Definition 6: infeasible means no call), send with the shared sticky failover chain, and record the raw observation as an actor-tagged turn_observed before anything inspects it. The worker’s tool loop keeps its loop policy (budgets, batching, cadence) and shares the same failure classification.

Structs§

ActorTurnRunner
One actor’s turn discipline: budget feasibility, sticky failover, and raw-before-parse observation recording.

Enums§

ActorKind
The stochastic actors one runner serves (system 27).

Constants§

DEFAULT_TURN_DEADLINE_SECS
The default per-turn wall-clock deadline when none is configured.

Functions§

chat_turn_with_deadline
One transport call under a hard wall-clock deadline — the one door every actor’s model turn goes through. A finite turn count alone never bounds wall time; the deadline does. Exceeding it is an ordinary transport failure (it consumes sticky failover like a provider outage), and dropping the timed future cancels the underlying request.
route_dialect
The prompt route and dialect of one resolved model (PSP-10 system 24): route identity from the transport, the single-slot genai dialect fitted to the route’s declared context window. Scripted transports get the same structural dialect, so tests exercise the production layout.
transport_failure_kind
Classify a transport failure cause — the one definition the worker loop and the runner share, so no actor invents its own retry taxonomy.