Documentation
Compute plans and streams
View .mdOpenAPI

Accept the loss of a stage's dead-lettered packs

POSThttps://weights.fyi/run/v1/compute/plans/{plan_id}/stages/{stage_id}/packs/accept-lossscope: submit
text
POST https://weights.fyi/run/v1/compute/plans/{plan_id}/stages/{stage_id}/packs/accept-loss
Authorization: Bearer <token>                    scope: submit
Content-Type: application/json
Available since
2026-10-29: included in this build; see What is live for deployment status.
Answer time
synchronous count check, acceptance commit and scheduling refresh.

Accepts missing results from a stage's dead-lettered packs with a reason. Review failures and decide the results are unnecessary. Send the current stage's dead-letter count to detect intervening changes.

The packs become dead_letter_accepted; they are not retried and no successful output is invented. A stage failed by dead-lettered packs can reopen, restoring work cancelled by that failure. A sealed stream completes when no unfinished work remains; accepting loss does not seal an open stream. Cancelled stages and stages failed for other reasons cannot reopen.

Request

NameWhereRequiredMeaning
AuthorizationheaderyesBearer token with submit.
plan_id, stage_idpathyesYour plan and stream stage.
Idempotency-KeyheaderconditionalUnique key, unless operation_key is supplied.
operation_keyJSON bodyconditionalOperation key; takes precedence over the header for durable replay.
expected_dead_letteredJSON bodyyesPositive integer matching the current stage count.
reasonJSON bodyyesNonblank string, at most 4,096 UTF-8 bytes after trimming.

Send a JSON object of at most 1 MiB. Unknown fields are rejected. Reuse the same key and payload when retrying a request.

Return value

200 OK with the plan receipt, operation details and replayed. Accepted losses remain visible in packs_dead_letter_accepted. Durable replay returns the current receipt without another change; HTTP replay can return the original response.

Errors

StatusCodeMeaning
400invalid_json, invalid_compute_plan, invalid_idempotency_keyInvalid body, count, key or reason.
401unauthorized, invalid_token, token_revoked, token_expiredSupply a valid token.
403scope_required, account_suspended, compute_tenancy_unauthorizedAccess is unavailable.
404compute_plan_not_found, compute_stage_not_foundAbsent or inaccessible work.
409dead_letter_count_changedRefresh; includes expected and actual counts.
409compute_plan_conflict, idempotency_key_in_progressState or key prevents acceptance.
413body_too_largeOver 1 MiB.
422idempotency_key_reusedHeader key belongs to a different request.
429rate_limitedWait for Retry-After.

Examples

sh
curl -s https://weights.fyi/run/v1/compute/plans/PLAN_ID/stages/STAGE_ID/packs/accept-loss \
  -H "Authorization: Bearer $WEIGHTS_API_KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: accept-loss-1" \
  -d '{"expected_dead_lettered":1,"reason":"Reviewed; missing results are unnecessary."}'

History

  • 2026-10-29: documented accepted losses, count checks and replay.

See also