Skip to content

Start and poll an extraction #629

Description

@chetanr25

Start and poll an extraction

Parent issue: #550
Blocker issue: #627, #628

The entry and poll points of the layer. This ships a working slice before the LLM work lands: submit an extraction and poll it, with the worker stubbed for now.

Scope

  • POST /api/v1/extract/{input_id}: load the input, return the right errors when it is missing, not ready, or already has an extraction, otherwise create the extraction row, queue an extraction job, and return 202 with a poll url. The queued task is a stub here; the real worker is Chunked extraction worker - Extraction Layer #630.
  • GET /api/v1/extract/{extract_id}: return the processing shape while running, or the completed shape when done, reading the contract from the linked incident row rather than the extraction. Return not-found when missing.
  • Tests for every status path on both endpoints.

Contract reference

  • contracts/path/extraction.yaml (start and poll)
  • contracts/schemas/extraction-record.yaml

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Week X Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions