runs: reconcile uncertain browser launches with a persistent intent key

This commit is contained in:
2026-10-20 15:40:43 +01:00
parent f06281db08
commit 44834e91f0
8 changed files with 146 additions and 9 deletions
+9 -1
View File
@@ -302,7 +302,15 @@ func HandlerWithOptions(ctx context.Context, options Options, stores ...*pipelin
}
case protocol.GetRun:
response.Type = protocol.Run
response.RunDetail, err = runs.getRun(request.RunID)
if request.RunID == 0 && request.RequestKey != "" {
var id int64
id, err = stores[0].RunByKey(connCtx, request.RequestKey)
if err == nil && id != 0 {
response.RunDetail, err = runs.getRun(id)
}
} else {
response.RunDetail, err = runs.getRun(request.RunID)
}
case protocol.CancelRun:
response.Type = protocol.Run
err = runs.cancel(request.RunID)