Enhance workflow execution with detailed run logging and error handling, including workflow run status tracking and node tracing
This commit is contained in:
@@ -27,6 +27,10 @@ func TestSummaryPrimaryToolCodePrefersToolSearchTarget(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestToRunLogFinalAction(t *testing.T) {
|
||||
if got := toRunLogFinalAction(&applicationruntime.Summary{WorkflowVersionID: 66, ReplyText: "ok"}); got != "workflow_reply" {
|
||||
t.Fatalf("expected workflow_reply final action, got %q", got)
|
||||
}
|
||||
|
||||
if got := toRunLogFinalAction(&applicationruntime.Summary{PlannedSkillID: 44, ReplyText: "ok"}); got != "skill" {
|
||||
t.Fatalf("expected skill final action, got %q", got)
|
||||
}
|
||||
@@ -50,6 +54,22 @@ func TestToRunLogFinalAction(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestBuildRunLogPlanUsesWorkflowSummary(t *testing.T) {
|
||||
plannedAction, plannedToolCode, planReason := buildRunLogPlan(&applicationruntime.Summary{
|
||||
WorkflowVersionID: 66,
|
||||
Status: "completed",
|
||||
})
|
||||
if plannedAction != "workflow" {
|
||||
t.Fatalf("expected workflow planned action, got %q", plannedAction)
|
||||
}
|
||||
if plannedToolCode != "workflow/66" {
|
||||
t.Fatalf("expected workflow planned tool code, got %q", plannedToolCode)
|
||||
}
|
||||
if planReason == "" {
|
||||
t.Fatalf("expected plan reason")
|
||||
}
|
||||
}
|
||||
|
||||
func TestExtractInterruptMessageAndCheckpointError(t *testing.T) {
|
||||
if got := extractInterruptMessage(`{"message":"请补充订单号"}`); got != "请补充订单号" {
|
||||
t.Fatalf("unexpected interrupt message: %q", got)
|
||||
|
||||
Reference in New Issue
Block a user