Skip to content

sync openapi spec with conveyor; add task created_at/updated_at to results (ENG-232) - #19

Open
emirlan-zen wants to merge 1 commit into
mainfrom
sync-spec-results-timestamps
Open

sync openapi spec with conveyor; add task created_at/updated_at to results (ENG-232)#19
emirlan-zen wants to merge 1 commit into
mainfrom
sync-spec-results-timestamps

Conversation

@emirlan-zen

@emirlan-zen emirlan-zen commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Syncs docs/openapi.yaml from conveyor and regenerates the models (make generate, datamodel-code-generator 0.64.0) + reference doc (make docs).

Headline change (ENG-232, ZenRows/conveyor#296)

TaskResult gains required created_at / updated_at (AwareDatetime). On a terminal row updated_at is the settle time — when the scrape finished — so recurring-job callers can verify result freshness instead of tracking external_id and diffing task_id across runs. Caveat carried from the spec: partial-retry inherited rows (source_run_id set) report copy time.

Spec ride-alongs (already on conveyor main)

  • Rerun always-async wording (ENG-226) — 202 is the normal path, 201 the legacy sync fallback.
  • Export failure-string / byte-cap wording (20 GiB).
  • extract / extract_fields param docs (ENG-230).

The gateway_error docstring keeps the SDK's "Zenrows" brand casing (#18) rather than reverting to the upstream spec's "ZenRows".

Merge ordering

The new fields are required in the model, so this SDK rev will reject /results responses from a server that doesn't return them yet. Condition met (2026-08-26): conveyor#296 is merged and deployed to prod via the CI/CD pipeline. Verified live on prod with this exact SDK build: submit → scrape → typed created_at/updated_at round-trip passed, and existing prod jobs render the fields on read. Safe to merge.

Follow-up after both merge: bump the pinned SDK rev in conveyor's e2e_tests/pyproject.toml (currently pinned to the deleted sync-spec-post-method line's e0359e1) and tighten the raw-httpx timestamp e2e to use the typed fields.

Testing

make test (126 passed — fixtures updated for the now-required fields), make lint, make typecheck all green.

Integration-tested against dev (conveyor-dev-api:116) with this exact build installed into conveyor's e2e venv: test_results_listing, test_submit_and_wait, and test_download_body all pass — every result row parsed through the stricter model (fields now required) — plus a direct typed-access check (row.created_at/row.updated_at as tz-aware datetimes, settle 1.5s after task creation on a live job).

🤖 Generated with Claude Code

…sults (ENG-232)

TaskResult gains required created_at/updated_at (AwareDatetime) —
updated_at on a terminal row is the settle time, the freshness signal
for recurring jobs. Regenerated via make generate from conveyor's
docs/openapi.yaml (conveyor#296); reference doc rebuilt via make docs;
test fixtures updated for the now-required fields. The gateway_error
prose keeps the SDK's Zenrows brand casing (#18) over the upstream
spec's. Spec ride-alongs from conveyor main: rerun-always-async wording
(ENG-226), export cap wording (20 GiB), extract/extract_fields param
docs (ENG-230).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@linear

linear Bot commented Aug 25, 2026

Copy link
Copy Markdown

ENG-232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant