test: orchestrator voice sync skip/passthrough 路径覆盖

照 sync_wechat_accounts 的现有测试模式给 WA + 微信 voice 各加 2 个测试:
skip-when-no-root-department(断言 status=skipped + scraper 未调用 + 无 SyncRun)
+ passes-resolved-root-to-scraper(断言 resolved department_id 透传到 scraper)。
顺手补 SyncResult.status 的 'skipped' 第三态文档。

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
浅念
2026-08-07 09:57:34 +08:00
parent 79b89bc919
commit 21c555a7e4
2 changed files with 189 additions and 2 deletions
+10 -2
View File
@@ -120,8 +120,16 @@ class SyncResult:
"""Outcome of one sync run (one entity / one conversation).
Mirrors the essential fields of the persisted ``SyncRun`` row so callers can
react to a run without re-querying the DB. ``status`` is ``"success"`` or
``"failed"``; on failure ``error`` carries the exception text.
react to a run without re-querying the DB. ``status`` is one of:
* ``"success"`` — the scrape + upsert completed (the SyncRun row is
persisted with ``status='success'``).
* ``"failed"`` — the scrape/upsert raised; ``error`` carries the
exception text (the SyncRun row is persisted with ``status='failed'``).
* ``"skipped"`` — a precondition was unmet (e.g. no resolvable root
``department_id`` for an endpoint that requires one); ``error`` carries
the reason. NO SyncRun row is recorded (a skip is neither success nor
failure), so a skipped entity does not advance the watermark.
"""
entity: str