You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of the Agent migration epic #152 (platform hardening). Owner: Jack.
Goal
Productionize DBOS durable execution (ADR 0011 shipped it off + unvalidated) and make the upload pipeline's side-effects crash-safe on the path users actually hit — the streaming route.
Background (ADR 0011)
services/durable.py ships @durable_workflow/@durable_step that no-op unless DBOS_ENABLED=true. @durable_workflow wraps agents.document.process_document, and the workers are wrapped with @durable_step.
Only /upload/sync gets durability today. The streaming POST /api/documents/upload calls agents inline (to emit SSE) and is intentionally not wrapped — ADR 0011 argues the SSE connection is per-process, so a crash loses the stream and the right semantic is "re-run on client retry, deduped by X-Request-ID."
ADR 0011's deferred items — test coverage, production validation, resume monitoring — never shipped.
Scope
Test coverage for durable workflow/step resume (crash mid-_run_workers, resume at last completed step).
Production validation procedure from ADR 0011 (provision DBOS Postgres, dbos migrate, flip flags, confirm is_durable()), documented and exercised once.
Part of the Agent migration epic #152 (platform hardening). Owner: Jack.
Goal
Productionize DBOS durable execution (ADR 0011 shipped it off + unvalidated) and make the upload pipeline's side-effects crash-safe on the path users actually hit — the streaming route.
Background (ADR 0011)
services/durable.pyships@durable_workflow/@durable_stepthat no-op unlessDBOS_ENABLED=true.@durable_workflowwrapsagents.document.process_document, and the workers are wrapped with@durable_step./upload/syncgets durability today. The streamingPOST /api/documents/uploadcalls agents inline (to emit SSE) and is intentionally not wrapped — ADR 0011 argues the SSE connection is per-process, so a crash loses the stream and the right semantic is "re-run on client retry, deduped byX-Request-ID."Scope
_run_workers, resume at last completed step).dbos migrate, flip flags, confirmis_durable()), documented and exercised once.resultevent can't double-fire or strand the doc.Files
backend/services/durable.py,backend/agents/document.py,backend/routes/documents.py(streaming path),requirements-durable.txt.Acceptance
DBOS_ENABLED=true; pipeline behaves identically with it off.resultevent leaves exactly one consistent document (no double-fire), verified against the [P2] Document pipeline robustness: post-result fallback double-fire, empty-OCR persistence, blocking IO, wrong size message #132 scenario.