feat(work): persist task evaluation worker context
CI / test (push) Successful in 1m8s
CI / test (pull_request) Successful in 59s

This commit is contained in:
m
2026-08-23 12:18:53 +03:00
parent 9a6ab6a9ca
commit def0e4aff0
8 changed files with 162 additions and 23 deletions
+15 -1
View File
@@ -120,7 +120,21 @@ func AdmitAndScheduleTaskEvaluation(ctx context.Context, store ports.GraphStore,
if err != nil {
return work.WorkGraph{}, nil, err
}
return AdmitAndSchedule(ctx, store, GraphScheduleRequest{Graph: graph, Intents: request.Intents, Now: request.Now})
intents := make([]work.AgentDispatchIntent, len(request.Intents))
copy(intents, request.Intents)
for i := range intents {
for _, node := range graph.Nodes {
if node.DispatchID != intents[i].DispatchID {
continue
}
intents[i].SpecialistPurpose = string(node.Purpose)
intents[i].TaskEvaluationProfileID = node.TaskProfileID
intents[i].TaskEvaluationBindingID = node.BindingID
intents[i].TaskEvaluationCaseIDs = append([]string(nil), node.CaseIDs...)
break
}
}
return AdmitAndSchedule(ctx, store, GraphScheduleRequest{Graph: graph, Intents: intents, Now: request.Now})
}
func CompleteGraphNode(ctx context.Context, store ports.GraphStore, graphID string, revision int64, nodeID work.GraphNodeID, success bool) (work.WorkGraph, error) {