--- id: PLAY-3 family: RT-PLAY level: core profiles: [runtime, editor-client] posture: normative-target added: "1.0" changed: "1.0" source: https://flowdrop.io/spec/rules/rt-play/play-3 specification: FlowDrop Workflow Specification 1.0 licence: CC BY 4.0 --- # PLAY-3 — The message poll has its own envelope, with the flags at the top level *RT-PLAY (Part II) · level: core · profiles: runtime, editor-client · added in 1.0* The three flags beside the data are what a polling client reads to decide whether to fetch again and whether the turn is over. Folding them into the shared pagination block would break every such client. ## The rule > **Normative.** This is the rule. > > 1. The message poll MUST answer `{success, data, hasMore, hasOlder, sessionStatus}`, with no pagination block and no `has_more` key. > > 2. The three flags MUST be siblings of `data`, not nested. > > 3. `hasMore` MUST report page fullness (whether the page returned as many messages as were asked for); it is an inference. > > 4. `hasOlder` MUST report whether messages older than the page exist; it is authoritative, so a client scrolling back never pays a speculative empty fetch at an exact page boundary. > > 5. `sessionStatus` is carried so that a poller needs no second request to learn the turn has finished. > > 6. The forward and backward cursors MUST be honoured only when they are strings of digits. > > 7. A cursor that is not MUST be ignored, and MUST NOT cause the request to be refused. ## What it means The message poll does not reuse the shared paginated envelope: `hasMore`, `hasOlder` and `sessionStatus` sit beside `data`, not nested inside a `pagination` block, and there is no `has_more` key alongside them. A reader used to the paginated shape elsewhere on this surface would look for the flags in the wrong place. The two boolean flags answer different questions and are not interchangeable. `hasMore` only reports whether the page came back as full as it was asked to be — an inference from the count, not a lookup. `hasOlder` is a real lookup: it tells a client scrolling backward whether anything precedes the page it already has, so it never has to make a speculative fetch just to find out the history has run out. A cursor that is not a string of digits is silently ignored rather than refused, so a poller sending a stale or malformed cursor still gets a window back instead of an error. ## Example An empty session, polled with no cursor at all: ```http title="Polling a session with no messages yet" verdict="200 counted" GET /api/flowdrop/playground/sessions/{session_id}/messages {"success": true, "data": [], "hasMore": false, "hasOlder": false, "sessionStatus": …} ``` Sending junk instead of a real cursor (`since=abc&before=xyz`) does not refuse the request either — it falls back to the default window as if no cursor had been sent. ## Why Recorded under [OPEN-23](https://flowdrop.io/spec/rulings/open-23), [OPEN-25](https://flowdrop.io/spec/rulings/open-25). ## Related rules - Names: PLAY-4 - Referenced by: PLAY-4 --- Rule identifiers are permanent and are never renumbered. This specification carries no implementation status: each implementation publishes its own standing against these rules. Licensed CC BY 4.0.