wangweiandCopilot 0907470a2d fix: offload flush to thread pool, add QwenVL stream_options assert, document single-worker assumption
Fix 1 (bootstrap.py): wrap store.flush() in asyncio.to_thread() inside the
periodic _flush_loop() to avoid blocking the async event loop every 60s.
Synchronous signatures of _start/_stop_model_usage_persistence() and the
one-time seed/shutdown flushes are left unchanged per review scope.

Fix 2 (test_stream_chat_usage_capture.py): add the two-line stream_options
assertion to test_qwen_vl_stream_chat_returns_usage_from_trailing_chunk,
matching the identical check already present in the DeepSeek and Qwen tests.

Fix 3 (design doc): note the single-worker assumption in A3's write strategy
section — multi-worker deployments get last-writer-wins per-row semantics.

Tests: 69 passed, 0 failed (python -m pytest backend/tests -q)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-23 15:30:21 +08:00
@
2026-06-03 16:58:35 +08:00
2026-07-02 22:03:39 +08:00
@
2026-06-03 16:58:35 +08:00
2026-06-05 18:00:31 +08:00
2026-07-23 14:09:33 +08:00
2026-07-02 22:03:39 +08:00
2026-07-02 22:03:39 +08:00
@
2026-06-03 16:58:35 +08:00
@
2026-06-03 16:58:35 +08:00
@
2026-06-03 16:58:35 +08:00
@
2026-06-03 16:58:35 +08:00
@
2026-06-03 16:58:35 +08:00
2026-06-05 18:00:31 +08:00
2026-06-05 18:00:31 +08:00
2026-04-28 11:29:33 +08:00
2026-04-28 11:29:33 +08:00
2026-07-02 22:03:39 +08:00
2026-04-28 11:29:33 +08:00
2026-04-28 11:29:33 +08:00
2026-05-26 12:34:12 +08:00
S
Description
AIRegulation-DocAnalysis-Demo
12 MiB
Languages
Python 55.2%
HTML 22.7%
TypeScript 16.2%
CSS 2.8%
Shell 1.4%
Other 1.6%