mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-13 12:14:40 +00:00
fix(team): prevent task progress regression from model actions
This commit is contained in:
1 parent
60995ff956
commit
89937edb22
1 file changed
+5
@@ -322,6 +322,11 @@ func (t *TeamTasksTool) executeProgress(ctx context.Context, args map[string]any
|
||||
return ErrorResult("only the assigned task owner can update progress. As team lead, task results arrive automatically when members complete their work.")
|
||||
}
|
||||
|
||||
// Prevent progress regression — keep the higher value.
|
||||
if percent < task.ProgressPercent {
|
||||
percent = task.ProgressPercent
|
||||
}
|
||||
|
||||
if err := t.manager.teamStore.UpdateTaskProgress(ctx, taskID, team.ID, percent, step); err != nil {
|
||||
return ErrorResult("failed to update progress: " + err.Error())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user