Connection liveness
session.readydeclaresheartbeat_interval_ms(default 5000). Each side MUST sendpingat least everyheartbeat_interval_msand MUST answerpingwithpongwithinheartbeat_interval_ms.[AWP-SAF-001]- A side MUST treat the control connection as lost after three consecutive intervals without a
pong(or any other message) from the peer, and the world MUST then move the session toSuspended(AWP-SES-003).[AWP-SAF-002]
Watchdog and safe-state entry
- Every world with a streaming time model MUST declare
safety_policy.safe_statewithbehavior(hold,safe_stop,park, or a vendor value) andwatchdog_ms. The watchdog measures time since the last control-channel message received from the agent on this session (any request, notification, orpong).watchdog_msMUST be ≤reconnect_window_ms; the robotics profile default is 2000 and the maximum permitted there is 5000.[AWP-SAF-003] - When the watchdog expires, the world MUST, in order: (1) begin the declared
behavioron every embodiment bound to the session; (2) transition everyexecutingaction tofailed(reasonconnection_lost) and everypending_approval,queued, oracceptedaction tocancelled(reasonsafe_state); (3) emitworld.event: safe_state_entered. Safe-state entry does not depend on whether the session isActiveorSuspended.[AWP-SAF-004] - Safe-state entry is independent of the heartbeat: a connection that answers pings but carries no agent traffic still trips the watchdog once
watchdog_mselapses. Agents in streaming sessions SHOULD sendping(or any control message) at least everywatchdog_ms / 2while they intend to remain in control.[AWP-SAF-005] - Streaming command channels have their own, tighter, per-action watchdog (
watchdog_mson the action type, AWP-CMD-005). Both apply; the action-level watchdog fires first by construction.[AWP-SAF-006]
Session retention and resumption
reconnect_window_msgoverns only how long the world retains the session (token, grants, undelivered statuses,action_idhistory) after suspension. It does not govern motion; motion is governed by the watchdog. On window expiry the session isClosedand the embodiment released after safe state (AWP-SES-005, AWP-EMB-002).[AWP-SAF-007]- On
session.resumethe embodiment remains in its safe state. The world MUST NOT resume any action terminated by safe-state entry, and MUST NOT interpret a valid session token as permission to continue motion. The agent regains control by submitting new actions; the world emitsworld.event: safe_state_exitedwhen the first post-resume action begins executing.[AWP-SAF-008]
Channel degradation, stale intents, and stalled inference
- If the world cannot deliver frames on a
reliableobservation channel for longer than that channel’sstale_after_ms(manifest, default 2 × the channel period), it MUST emitworld.event: channel_degradednaming the channel. Loss onlatest-winschannels is expected and not an event.[AWP-SAF-009] - Agents SHOULD NOT submit an action whose basis observation is stale — its staleness at the moment of use exceeding the channel’s
stale_after_ms— and SHOULD carrybasis_ts_mono_nson every submission so that the world can enforce AWP-SAF-013.[AWP-SAF-010] - A stalled agent (alive connection, no new intents) is not a fault the watchdog is designed to catch: an
executingextended action continues to its goal or itsdeadline_ms. Bound the blast radius of a stalled policy withdeadline_ms, not with the watchdog.[AWP-SAF-011] - Stale-intent enforcement. When the manifest declares
safety_policy.max_basis_age_ms, the world MUST reject withAWP_STALE_INTENTanyaction.submitwhosereceived_ts_mono_ns − basis_ts_mono_nsexceeds it or whosevalid_until_nshas already passed, and MUST transition torejected(reasonstale_intent) anypending_approvalorqueuedaction for which either bound is exceeded — basis age measured against the current session time — at the moment it would becomeaccepted. A world that declaresmax_basis_age_msMAY additionally requirebasis_ts_mono_nson every submission, rejecting its absence withAWP_STALE_INTENT. Likedeadline_ms, these bounds are binding in streaming and advisory in lockstep.[AWP-SAF-013]
Testing the bound
Adapters MUST verify their watchdog with a measured test: disconnect the agent abruptly during anexecuting extended action and record, on the world’s clock, the interval from the last received control message to the moment the behavior command reaches the actuator. That interval MUST be ≤ watchdog_ms + 100 ms, and the conformance report records the measured value. [AWP-SAF-012]