fix: refresh delegation permissions and report Reasoner task outcomes

This commit is contained in:
Xin Wang
2026-10-24 09:27:33 +08:00
parent 7600a297b3
commit 5e0cde85e3
11 changed files with 359 additions and 20 deletions
+2 -2
View File
@@ -60,7 +60,7 @@ class ReasonerServiceTest(unittest.IsolatedAsyncioTestCase):
)
async def test_snapshot_is_frozen_and_business_projection_has_no_secrets(self):
model = SimulatedLLM([[('complete_task', {"result": "模拟任务完成"})]])
model = SimulatedLLM([[('complete_task', {"status": "succeeded", "result": "模拟任务完成"})]])
self.backend.instructions = "为 {{customer}} 核查结果"
self.backend.config["instructions"] = "字面模板 {{customer}}"
state = {"values": {"customer": "before"}, "definitions": {"customer": {"type": "string"}}, "secrets": {"secret__token": "private-token"}}
@@ -83,7 +83,7 @@ class ReasonerServiceTest(unittest.IsolatedAsyncioTestCase):
model = SimulatedLLM([
[('ask_user', {"question": "选择日期?"})],
[('ask_user', {"question": "选择范围?"})],
[('complete_task', {"result": "两个问题均已回答"})],
[('complete_task', {"status": "succeeded", "result": "两个问题均已回答"})],
])
with patch("services.background_tasks.reasoner.create_reasoner_llm", return_value=model):
task = await self.submit()