Skip to content

Platform ask: idempotency key on POST /v2/parse/jobs (and /v2/extract/jobs) #136

Description

@MingruiZhang

Raised by review on PR landing-ai/ade-cli-internal#16 (parse guarantee).

Problem

The CLI creates a claim ticket atomically before submit, so re-runs and races never double-submit — except in one window the client cannot close alone: an interrupt (Ctrl-C, network drop) after the server accepts POST /v2/parse/jobs but before the response delivers job_id. The ticket stays submitless, recovery reclaims it, and the resubmit bills a second job for the same bytes. This is a two-generals problem without server support: the v2 contract has no idempotency-key header and no lookup that maps a submit back to its job.

Ask

Accept a client-supplied idempotency key on the async submit routes (parse, extract), returning the existing job for a repeated key. The CLI would derive the key from its claim-ticket generation (doc content hash × params fingerprint × claim timestamp), making submit exactly-once end-to-end.

Interim posture

Documented narrow window; fails toward a duplicate parse of identical bytes, never data loss.


Migrated from the private development tracker (landing-ai/ade-cli-internal#17) during the launch cutover.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions