--- id: INT-9 family: RT-INT level: extended profiles: [runtime, storage-api] posture: normative-target added: "1.0" changed: "1.0" source: https://flowdrop.io/spec/rules/rt-int/int-9 specification: FlowDrop Workflow Specification 1.0 licence: CC BY 4.0 --- # INT-9 — One execution has at most one stored snapshot *RT-INT (Part II) · level: extended · profiles: runtime, storage-api · added in 1.0* ## The rule > **Normative.** This is the rule. > > 1. Storing a snapshot MUST be an upsert keyed by execution identifier: an existing record for the same execution MUST be overwritten in place, so that one execution never accumulates two snapshot records. > > 2. Cleanup MUST delete the records created before a given time. > > 3. Where a set of statuses is given, cleanup MUST delete only those whose status is in it. > > 4. Cleanup MUST answer with the number deleted, zero when nothing matches. > > 5. Access to a snapshot MUST be enforced at the API boundary, and enforced once there, not repeated by the layer that stores them. > > 6. A scheduled cleanup MUST run with no principal and MUST delete on the predicate above alone. ## Why Recorded under [OPEN-25](https://flowdrop.io/spec/rulings/open-25). ## Related rules - Names: INT-6 - Referenced by: INT-6 --- 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.