Add failure_category to tasks and workflow runs (SKY-8469) (#5254)

This commit is contained in:
LawyZheng 2026-03-27 02:13:52 +08:00 committed by GitHub
parent e7b2f09d00
commit 9d9ae67fe4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 651 additions and 24 deletions

View file

@ -162,6 +162,7 @@ async def test_max_retries_with_error_detection(agent, mock_browser_state):
failure_reason=None,
webhook_failure_reason=None,
errors=None,
failure_category=None,
):
updates = {}
if status is not None:
@ -170,6 +171,8 @@ async def test_max_retries_with_error_detection(agent, mock_browser_state):
updates["failure_reason"] = failure_reason
if errors is not None:
updates["errors"] = errors
if failure_category is not None:
updates["failure_category"] = failure_category
return await mock_app.DATABASE.update_task(task.task_id, organization_id=task.organization_id, **updates)
with patch.object(ForgeAgent, "summary_failure_reason_for_max_retries", mock_summary):