# File lifecycle

Conceptual Safeput upload states and their intended meaning.

The initial lifecycle model uses the following conceptual states. Exact names
and transitions may evolve until the API is implemented.

| State | Intended meaning |
| --- | --- |
| `waiting` | An upload target exists, but transfer is not complete. |
| `uploaded` | Transfer completed and the file remains untrusted. |
| `scanning` | Asynchronous malware scanning is in progress. |
| `clean` | The scanner did not reject the file; temporary retrieval may become available. |
| `rejected` | The scanning pipeline rejected the file. |
| `failed` | The upload or processing pipeline could not complete. |
| `expired` | The 72-hour clean retention window ended and retained bytes were deleted. |
| `expired` | The file is no longer available for retrieval. |

## Terminal outcomes

`clean`, `rejected`, `failed`, and `expired` represent different outcomes and
must not be treated interchangeably. Applications should fail closed when a
status is unknown or incomplete.
