02 Wait For Plots Staged

Step 2: Wait For Plots Staged

Poll GET /ingestions/{{plot_lifecycle_task_id}} until the task leaves pending and reaches a terminal state — staged (or completed / completed_with_errors). The polling helper bounds retries via {{plot_lifecycle_poll_retries}}.

What this step does

It watches the ingestion task created in step 1 until the plot bytes have been received and normalised into staged_location rows. staged is the signal that the locations now exist and are addressable by asset_task_id. Because step 1 sent no assessments block, the task stages the geometry only — every assessments.* slot is still null at this point (you confirm that in step 4).

Why it's needed

The upload in step 1 returns immediately with a pending task; the bytes travel separately over the signed URL and are processed asynchronously. Nothing downstream can run until that finishes — you cannot add assessments (step 3) or dispatch metrics (step 6) against plots that aren't staged yet. This step is the barrier that guarantees the locations exist before the rest of the workflow addresses them. A failed terminal status means the upload didn't stage, and the chain should stop here.

Why poll (rather than assume)

Staging time depends on file size and queue depth, so there's no fixed wait you can hard-code. Polling the task's overall_status against the terminal_states from step 1's poll block is the reliable signal — and the same pattern every ingestion workflow uses.

Next Step

→ Step 3: Add Core And EUDR Assessments — opt in to validation now that the plots are staged.