# replay — Stream dataset exports over WebSocket `s6 replay` replays a `StructuredDataset` directory and exposes its `context["export"]` payloads over a lightweight WebSocket service. Unlike `s6 track`, it does not run inference or mutate the dataset frames; it simply relays what is already recorded. ## Usage ```bash # Replay a dataset forever on the default service endpoint s6 replay ./datasets/session_001 --repeat # Bind to a different host/port and slow playback down s6 replay ./datasets/session_001 --host 127.0.0.1 --port 9000 --hz 10 # Disable replay throttling backpressure s6 replay ./datasets/session_001 --max-queue 0 ``` ## Behavior - Validates that the dataset directory exists and contains `data.jsonl`. - Starts a background producer process that reads the dataset through `StructuredDataset` and enqueues frame records. - Serves WebSocket clients on `/ws/telemetry`. - Also exposes `/queue_size` for a simple backlog health check. - Sends JSON payloads with: - `export`: the recorded `context["export"]` object, or `{}` when absent - `stats.queue_size`: the current queue backlog when available - `--repeat` loops the dataset indefinitely. - `--hz` controls playback rate in frames per second; values less than or equal to `0` disable the sleep throttle. - `--max-queue` applies backpressure to the producer; `0` disables that limit. ## Notes - This command is useful when a downstream consumer only needs recorded export telemetry and not the full pipeline runtime. - The default bind address is `0.0.0.0:8001`.