Skip to main content

Module spec

Module spec 

Source
Expand description

The runtime session spec, its limits, and the report a finished run returns.

Structs§

EpisodeSummary
One completed episode’s summary, recorded in completion order across all lanes. The pull counterpart of the episode_completed hook event, so a caller without hooks (e.g. the in-process run_local loop) still gets per-episode results on the report.
PeerCeiling
What one served peer can decode, learned at its handshake. The driver checks every payload it relays against the target leg’s ceiling through the session’s RelayPolicy, not against the session edition alone.
RuntimeLimits
Per-op timeouts and the telemetry window for one session. Serialized with explicit millisecond field names (*Ms); legacy unsuffixed fields are rejected.
RuntimeReport
What a finished or aborted session returns: totals plus the durable telemetry aggregate.
RuntimeSessionSpec
Everything one route needs to run: its identity, the negotiated env contract, and the per-op limits. validate gates a spec before the driver runs it.

Constants§

ENV_RESET_OPTIONS_KEY
Key under which an env declares, in its contract metadata, which reserved reset-option keys it wants delivered (a list of strings). The runtime sends a reserved ResetRequest.options key only to an env that named it here, so an env that forwards options blindly into a third-party reset never receives one it cannot interpret. Mirrored in Python as rlmesh.ENV_RESET_OPTIONS_KEY.
TRIAL_INDEX_OPTION
The reserved reset option carrying the ordinal of the episode a reset starts. Declared by an env under ENV_RESET_OPTIONS_KEY; read in Python as rlmesh.trial_index(options).

Functions§

declares_reset_option
Whether contract named key in its metadata under ENV_RESET_OPTIONS_KEY, as either a list of strings or a bare string.
reset_options_for
The ResetRequest.options map delivering trials under option_key — the trial-index key the session’s edition governs (EditionDefaults::trial_index_option_key, mirrored for env-side callers by TRIAL_INDEX_OPTION) — or None when there are no trials or the env never declared the key.