[AWP-TIM-001]
Lockstep
In lockstep the world is paused between advances and time moves only when told to. v0.1 defines exactly one advancement policy,on_tick: the world advances only in response to world.tick. Accepting an action never advances time by itself.
- A lockstep world MUST declare
tick_policy: "on_tick"and MUST advance only in response toworld.tick.[AWP-TIM-002] - After each advance, the world MUST send every
action.statusandworld.eventproduced by the advance on the control channel before theworld.tickresult, and MUST send exactly one frame carrying the advance’stickon every subscribed per-tick channel, before accepting the next advance. The agent MUST treat the advance as complete only when it holds the result and, on every subscribed per-tick channel, a frame whosetickequals the result’s; on the inline binding those frames precede the result.[AWP-TIM-003] - Wall-clock time MUST NOT influence world state in lockstep mode (determinism requirement; see reproducibility).
[AWP-TIM-004] - Initial observations. Immediately after
session.ready, and after everyobs.subscribe, the world MUST send one frame carrying the current tick on each newly subscribed per-tick channel, and the agent waits for it before acting, so the agent always observes before it acts.[AWP-TIM-009] - Staging.
action.submitin lockstep is admitted immediately (AWP-LIF-002) and the action is staged: the world MUST NOT begin executing it before the next advance, and MUST transition it toexecutingat the start of that advance so its first effects appear in the advance’s frames. Cancelling a staged action before the advance has no side effects.[AWP-TIM-010] - Advances.
world.tick { expected_tick, count }performscountsequential advances (default 1) fromexpected_tick, which MUST equal the world’s current tick; otherwise the call fails withAWP_TICK_MISMATCHcarrying the current tick indata.tickand nothing advances, so a call retried after a lost result cannot advance twice. Each advance delivers its frames, statuses, and events as in AWP-TIM-003 before the next begins; the result{ tick }is sent after the last. Extended actions spanning several ticks report progress on each advance.[AWP-TIM-011] - Tick authority. The manifest declares
tick_authority:any_session(the default for worlds that admit one lockstep session at a time) orbarrier(the default when several lockstep sessions may be bound: the world advances once every bound, non-observer lockstep session has calledworld.tickfor the current tick, delivering the same advance to all).world.tickfrom a session that lacks authority — an observer session, or a session without thetickadmin grant where the world requires one — MUST fail withAWP_TICK_NOT_AUTHORIZED.[AWP-TIM-012]
Wire trace
A complete lockstep exchange for one action on a single-sessionon_tick world. Heartbeats and id values are elided.
observe → submit → tick → read statuses/frames, never submit → await completion alone: without a tick the world never advances and a completion never arrives.
Streaming
- The world advances in real time regardless of agent activity. Observation frames are pushed at negotiated rates, each carrying its capture time
ts_mono_nsand its send timets_send_ns(AWP-OBS-006); the agent relates them to its own clock through the heartbeat exchange (AWP-CLK-006..009).[AWP-TIM-005] - Telemetry. In streaming sessions the world MUST send a
session.telemetrynotification at least once per second aggregating, over the preceding window, the quantities defined in Latency and staleness: pipeline latency overall and per channel, admission latency, observation-to-action latency, and command latency, each present whenever at least one sample fell in the window.[AWP-TIM-006] - Worlds MUST declare
safety_policy.safe_state(behavior andwatchdog_ms) and enforce it as specified in Liveness and safe state (AWP-SAF-003..008); worlds MAY declaresafety_policy.max_basis_age_msand then enforce stale-intent rejection (AWP-SAF-013).[AWP-TIM-007]
Wire trace
One observation→action cycle on a streaming session over the inline binding. Heartbeats other than the synchronization sample,id values, and the jsonrpc field are elided.
Declaration
Worlds offering both models MUST implement identical manifests, schemas, and action lifecycles across them; only advancement and delivery semantics may differ.[AWP-TIM-008] This requirement is what makes sim-to-real portability real.