refactor(file-check): 增强文件检核服务,新增可靠性元信息与错误分类
This commit is contained in:
1 parent
f72c1c9f0e
commit
090281835a
14 files changed
+1093
-151
No files matched your search
@@ -86,6 +86,8 @@ def test_file_check_service_normalizes_failed_workflow():
|
||||
assert payload['dify_result'] == '人工判定'
|
||||
assert 'Dify执行失败' in payload['dify_message']
|
||||
assert payload['workflow_run_id'] == 'wf-2'
|
||||
assert payload['manual_reason_type'] == 'dify_failed'
|
||||
assert payload['is_system_error'] is True
|
||||
|
||||
|
||||
def test_file_check_service_evaluate_degrades_on_dify_error(monkeypatch):
|
||||
@@ -130,6 +132,8 @@ def test_file_check_loop_splits_processing_and_judgement_counts(app, monkeypatch
|
||||
'dify_message': 'Dify执行失败:workflow timeout',
|
||||
'workflow_run_id': 'wf-failed',
|
||||
'error': 'workflow timeout',
|
||||
'manual_reason_type': 'dify_failed',
|
||||
'is_system_error': True,
|
||||
}
|
||||
|
||||
writebacks = []
|
||||
@@ -169,6 +173,7 @@ def test_file_check_loop_splits_processing_and_judgement_counts(app, monkeypatch
|
||||
assert errors == []
|
||||
assert judgement['manual_count'] == 1
|
||||
assert judgement['dify_error_count'] == 1
|
||||
assert judgement['system_error_count'] == 1
|
||||
assert (run.response_summary_json or {}).get('current_step', {}).get('step') == 'completed'
|
||||
assert any(log['step'] == 'call_dify' and log['status'] == 'success' for log in step_logs)
|
||||
|
||||
|
||||
Reference in new issue
Block a user