修复:智能分析空回答与工具结束条件冲突
统一自主分析工具范围与执行前校验,严格核验正常结束、最终正文和图表恢复状态,并显示空回答及恢复失败原因。 包含两次已上线修复及回归测试,保留已有回答与业务数据。 验证:1101 项 Python、469 项前端、97 项后端测试通过;前后端构建和真实模型、页面验收通过。
This commit is contained in:
@@ -52,6 +52,18 @@ def document(ref, *proofs):
|
||||
|
||||
|
||||
class NativeRunTests(unittest.TestCase):
|
||||
def test_pretool_progress_cannot_be_promoted_by_a_stop_finish(self):
|
||||
from nao_quality_runtime import ConversationAccumulator
|
||||
self.accumulator=ConversationAccumulator()
|
||||
for event in ({'type':'text-delta','id':'progress','delta':'正在查询。'},
|
||||
{'type':'tool-input-available','toolName':'mcp_call','toolCallId':'q'},
|
||||
{'type':'tool-output-available','toolCallId':'q','output':{}},
|
||||
{'type':'finish','finishReason':'stop'}):self.accumulator.feed(event)
|
||||
result=self.invoke()
|
||||
self.assertEqual(result['status'],'PARTIAL')
|
||||
self.assertFalse(result['answerQuality']['narrativeComplete'])
|
||||
self.assertEqual(result['answer'],'正在查询。')
|
||||
|
||||
def test_optional_scope_notice_is_shown_once_without_internal_visual_diagnostics(self):
|
||||
child = {**self.task, 'stages': ['bright']}
|
||||
self.snapshot['scopes'].append({'nodeId': 'bright-detail', 'scopeId': 'bright-detail',
|
||||
|
||||
Reference in New Issue
Block a user