Skip to main content

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 by GET /processes/{process_id}:

Internal to Public Mapping

Internally, Phonefarm uses richer request and queue states. The current mapping is:

Idempotency

Phonefarm uses different idempotency keys depending on endpoint family.

Process APIs

  • POST /capability-requests/enqueue
  • POST /maintenance/requests
Idempotency key:
Duplicate requests return the existing process instead of creating a new one.

Legacy Queue APIs

  • POST /ingest
Idempotency key:

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_progress remains available for consumers
  • linked_ids shows queue-item relationships
If your system needs exact operator-facing messaging, use status, error, partial_progress, and linked_ids together.

Timestamp Semantics

The timestamps object is milestone-derived. Important: executing_at is not guaranteed to be the exact time of first device interaction.

Terminal Behavior

Terminal outcomes are:
  • completed
  • failed_terminal
  • cancelled
Process-aware cancellation may first enter a non-terminal cancel_requested path internally before settling into a final public status.