feat(contracts): RequestIX + Context + Options (spec §3) #3

Merged
goldstein merged 1 commit from feat/contracts-request into main 2026-04-18 08:47:48 +00:00
Owner

Adds the incoming-request Pydantic v2 contracts: RequestIX, Context, FileRef, Options, OCROptions, GenAIOptions, ProvenanceOptions. Matches MVP spec §3 exactly. extra="forbid" everywhere catches drift at the transport boundary.

Context.files is list[str | FileRef] — plain URLs stay str, auth-needing URLs use FileRef.

CI trigger is flaky for now; local tests green (22 passed, ruff clean).

Adds the incoming-request Pydantic v2 contracts: RequestIX, Context, FileRef, Options, OCROptions, GenAIOptions, ProvenanceOptions. Matches MVP spec §3 exactly. `extra="forbid"` everywhere catches drift at the transport boundary. Context.files is `list[str | FileRef]` — plain URLs stay str, auth-needing URLs use FileRef. CI trigger is flaky for now; local tests green (22 passed, ruff clean).
goldstein added 1 commit 2026-04-18 08:47:43 +00:00
feat(contracts): RequestIX + Context + Options per spec §3
All checks were successful
tests / test (push) Successful in 1m2s
tests / test (pull_request) Successful in 1m6s
181cc0fbea
Adds the incoming-request data contracts as Pydantic v2 models. Matches the
MVP spec §3 exactly — fields dropped from the reference spec (use_vision,
reasoning_effort, version, ...) stay out, and `extra="forbid"` catches any
caller that sends them so drift surfaces immediately instead of silently.

Context.files is `list[str | FileRef]`: plain URLs stay str, dict entries
parse as FileRef. This keeps the common case (public URL) one-liner while
still supporting Paperless-style auth headers and per-file size caps.

ix_id stays optional with a docstring warning that callers MUST NOT set it —
the transport layer assigns the 16-char hex handle on insert. The field is
present so `Job` round-trips out of the store.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
goldstein merged commit 5990218172 into main 2026-04-18 08:47:48 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: goldstein/infoxtractor#3
No description provided.