feat(backend): 完善 Workflow 与 DeepResearch 的运行链路与持久化能力

功能说明:\n- 重构并增强工作流网关执行链路,支持更完整的 proposal 与 run 调度参数透传\n- 增加 DeepResearch/workflow 运行事件持久化能力并补齐建表 SQL 与查询/保存接口适配\n- 优化 lead agent 与 deep research runner 的中间态处理,增强线程收集与执行链并发控制\n- 调整工作流执行器与任务路由,提升兼容性并完善错误与回放行为\n- 补充回归测试:deep_research 持久化、workflow 并发、定义加载、引擎执行、run 流程等覆盖
This commit is contained in:
董宏凯 committed 2026-09-02 12:52:37 +08:00
1 parent f5bf7897b9
commit 6d326a21cd
28 files changed
+836 -135

No files matched your search

@@ -454,6 +454,25 @@ async def test_event_payload_round_trip():
await repos["_engine"].dispose()
@pytest.mark.asyncio
async def test_event_payload_serializes_native_source_datetime():
"""Source-added events share the source model's native ``published_at``."""
repos = await _make_repos()
try:
repo = repos["events"]
published_at = datetime(2026, 9, 2, 10, 9, tzinfo=UTC)
await repo.append(
session_id="drs_1",
job_id="drj_1",
event_type="source_added",
payload={"source": {"id": "src_1", "published_at": published_at}},
)
events = await repo.list_after("drj_1", after=0)
assert events[0]["payload"]["source"]["published_at"] == published_at.isoformat()
finally:
await repos["_engine"].dispose()
@pytest.mark.asyncio
async def test_event_seq_independent_per_job():
repos = await _make_repos()