--- id: PIPE-1 family: RT-PIPE level: core profiles: [runtime] posture: normative-target added: "1.0" changed: "1.0" source: https://flowdrop.io/spec/rules/rt-pipe/pipe-1 specification: FlowDrop Workflow Specification 1.0 licence: CC BY 4.0 --- # PIPE-1 — Run status is read from persisted state, on two routes and one envelope *RT-PIPE (Part II) · level: core · profiles: runtime · added in 1.0* The live picture of a run is whatever has been persisted for it, not what some in-memory tracker happens to remember. A poll therefore answers the same value to every caller, including one served by a process that has just started. ## The rule > **Normative.** This is the rule. > > 1. A run's status MUST be published by two reads: the full pipeline document and a lightweight status document. > > 2. Both MUST answer the standard `{success: true, data}` envelope. > > 3. Both MUST publish the persisted lifecycle value verbatim as `data.status`. > > 4. Both MUST answer `404` with `{success: false, error}` for a run that does not exist. > > 5. Both MUST answer `403` for a run the caller is not allowed to view. > > 6. The full document MUST carry `node_statuses`, `jobs`, `job_status_summary` and `execution_data` alongside `id`, `name`, `description`, `createdAt`, `lastExecuted`, `executionCount` and `timestamp`. > > 7. The lightweight document MUST carry `id`, `status`, `createdAt`, `lastExecuted`, `pendingInterrupt` and `pausedReason`. > > 8. The lightweight document MUST NOT carry the jobs payload. > > 9. Both MUST read persisted state only, so a status written outside the request path is what the next poll returns. ## What it means Two different reads publish the same live picture of a run because both are windows onto the same persisted record, never an in-memory tracker that could disagree with it from one process to the next, or lag behind a status that was just written. The two reads deliberately diverge in only one respect: the lightweight document does not carry the jobs payload at all, because it exists for a caller polling too fast to justify the weight of the full one. Where the run cannot be found at all, the answer is `404` naming the id; where it exists but the caller may not view it, that is `403` — never a payload with some of its fields quietly blank instead. ## Example The same distinction — missing versus denied — holds on both endpoints. ```http title="A run nothing matches" verdict="404 refused" GET /api/flowdrop/pipeline/{pipeline_id} {"success": false, "error": "Pipeline with ID 99999 does not exist."} ``` ```http title="An existing run, denied to a caller with no permission on it" verdict="403 refused" GET /api/flowdrop/pipeline/{pipeline_id}/status {"success": false, "error": "Access denied"} ``` ## Why Recorded under [OPEN-25](https://flowdrop.io/spec/rulings/open-25). ## Related rules - Referenced by: PIPE-9 --- 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.