fix(core): /retry чистит postmortem-трассы — на новом прогоне постмортем запускается заново
Some checks failed
CI / test (push) Failing after 1m54s
CI / build-and-package (amd64, linux) (push) Failing after 1m21s
CI / build-and-package (amd64, windows) (push) Successful in 33s

This commit is contained in:
ki.sagidullin
2026-08-24 14:56:39 +05:00
parent 9cb174a5d3
commit ed13386612
3 changed files with 36 additions and 0 deletions

View File

@@ -228,6 +228,11 @@ func (c *Core) handleRetry(ctx context.Context, rest string) (Result, error) {
if err := c.Store.ClearHistory(ctx, id); err != nil {
return Result{}, err
}
// Чистый перезапуск: сбрасываем маркер постмортем-анализа от прошлого
// прогона, чтобы на новом failed/timeout постмортем запустился заново.
if err := c.Store.DeleteTracesByAgent(ctx, id, "postmortem"); err != nil {
return Result{}, err
}
return Result{
Reply: "Задача перезапущена. Опишите, что меняем:",
TaskID: id,