--- id: SNAP-2 family: RT-SNAP level: core profiles: [runtime, editor-client] posture: normative-target added: "1.0" changed: "1.0" source: https://flowdrop.io/spec/rules/rt-snap/snap-2 specification: FlowDrop Workflow Specification 1.0 licence: CC BY 4.0 --- # SNAP-2 — Snapshot access is decided on the snapshot, and absence answered first *RT-SNAP (Part II) · level: core · profiles: runtime, editor-client · added in 1.0* ## The rule > **Normative.** This is the rule. > > 1. Reading or deleting a snapshot loads it by execution id and asks it for view or delete authority. > > 2. A snapshot that does not exist MUST be answered `404`. > > 3. A snapshot the caller is not allowed to reach MUST be answered `403`. > > 4. Absence MUST be answered before denial. > > 5. A read that finds the record but no readable payload MUST answer `404`. > > 6. A read MUST NOT answer a partial document. > > 7. The list endpoint does not ask per record: it narrows the query by ownership. > > 8. A snapshot belonging to another principal MUST be absent from the list. > > 9. The list MUST NOT carry a denial on such a snapshot. ## What it means Reading and deleting a snapshot both load the record first and ask it whether this caller may view or delete it — the two questions are answered in a fixed order. An id nobody stored gets `404` no matter who is asking, before the endpoint even considers whether the asker would have been let in. Only once a record is found does its own access answer take over, and a record that exists but is not the caller's own comes back `403`, not `404` — the endpoint does not pretend a snapshot it can name does not exist. A denial carries nothing about the record it denied: not the workflow that produced it, not any other trace, only the fixed refusal message. Distinguish this from the list endpoint, which never reaches a per-record denial at all — it narrows its query by ownership up front, so a snapshot belonging to someone else is simply absent from the page rather than a `403` entry on it. ## Example ```http title="A snapshot nobody stored" verdict="404 refused" GET /api/flowdrop-runtime/snapshot/{execution_id} { "success": false, "error": "Snapshot not found" } ``` ```http title="A snapshot that exists but belongs to someone else" verdict="403 refused" GET /api/flowdrop-runtime/snapshot/{execution_id} { "success": false, "error": "Access denied" } ``` ## Why Recorded under [OPEN-25](https://flowdrop.io/spec/rulings/open-25). ## Related rules - Names: SNAP-1, PIPE-6 - Referenced by: PIPE-6, SNAP-1 --- 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.