Process Lifecycle
Phonefarm exposes a normalized process model so callers do not need to reason about every internal queue state.Public Status Enum
These are the public statuses returned byGET /processes/{process_id}:
| Status | Meaning |
|---|---|
queued | The request is accepted and not yet terminal. |
executing | Work is currently executing. |
retrying | Work is waiting for a retry attempt. |
completed | All work completed successfully. |
failed_terminal | Execution ended in a terminal failure or partial failure. |
cancelled | The process was cancelled. |
Internal to Public Mapping
Internally, Phonefarm uses richer request and queue states. The current mapping is:| Internal status | Public status |
|---|---|
QUEUED | queued |
PLANNED | queued |
CLAIMED | queued |
EXECUTING | executing |
RETRYABLE | retrying |
DONE | completed |
PARTIAL | failed_terminal |
DEAD_LETTER | failed_terminal |
CANCELLED | cancelled |
Idempotency
Phonefarm uses different idempotency keys depending on endpoint family.Process APIs
POST /capability-requests/enqueuePOST /maintenance/requests
Legacy Queue APIs
POST /ingest
Partial Progress
A public process can represent fanout or multi-step work. That means binary success and failure is not always enough. When a process ends in partial completion:- public status becomes
failed_terminal partial_progressremains available for consumerslinked_idsshows queue-item relationships
status, error, partial_progress, and linked_ids together.
Timestamp Semantics
Thetimestamps object is milestone-derived.
| Field | Meaning |
|---|---|
created_at | The row creation time. |
accepted_at | The accepted milestone time. |
queued_at | The planned milestone time. |
executing_at | The queue-materialization milestone time. |
retrying_at | Retry timestamp when present. |
cancel_requested_at | Time cancel was requested. |
finished_at | Derived from terminal row update time. |
executing_at is not guaranteed to be the exact time of first device interaction.
Terminal Behavior
Terminal outcomes are:completedfailed_terminalcancelled
cancel_requested path internally before settling into a final public status.