Move LLM-backed operations to async job pattern
- Ngôn ngữ chính
- HTML
- Star
- 5
- Fork
- 2
- Merge trung bình
- 1 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 1
Mô tả
# Context
LLM-backed operations (label extraction, compliance evaluation) regularly take tens of seconds and can run a minute or more under `reasoning_effort=high`. Today they are issued as synchronous HTTP requests from the frontend, which has caused dropped connections to leave the UI stuck in a loading state with no recovery, and exposes the system to reverse-proxy timeouts. There is no way for a user to rejoin an in-flight request after a network blip.
# Outcome
LLM-backed operations run as async jobs whose result is retrievable independently of the originating HTTP connection. A dropped connection no longer loses or strands work.
# Acceptance criteria
- Label extraction and compliance evaluation are submitted as jobs that complete out-of-band from the request that started them.
- The frontend can observe a job's status (pending / running / succeeded / failed) and retrieve its result.
- A user whose connection drops mid-job can return to the label/compliance page and see the same job's current status and final result.
- Failed jobs surface a clear error in the UI; stuck/loading UI states from dropped connections are no longer possible.
- Existing UX (spinner during work, success/error toasts) is preserved or improved.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.