Happy review

This commit is contained in:
Ian Gulliver
2026-10-15 20:07:36 -07:00
parent ccd55afe13
commit 35368242e3
14 changed files with 312 additions and 191 deletions
+15
View File
@@ -142,6 +142,18 @@ func (m *Manager) startReviewer(ctx context.Context, task api.Task, snap api.Sna
return err
}
if prompt == "" {
now := time.Now().UTC()
err = m.store.CreateReview(ctx, api.Review{
Id: store.NewID(),
TaskId: task.Id,
SnapshotN: snap.N,
State: api.ReviewStateSkipped,
CreatedAt: now,
FinishedAt: &now,
})
if err != nil {
return err
}
slog.Info("review skipped, snapshot has no diff", "task", task.Id, "snapshot", snap.N)
return nil
}
@@ -494,6 +506,9 @@ func reviewLine(r api.Review) string {
if r.State == api.ReviewStateFailed {
return fmt.Sprintf("review of snapshot %d failed: %s", r.SnapshotN, clip(r.Error, 300))
}
if r.State == api.ReviewStateSkipped {
return fmt.Sprintf("review of snapshot %d skipped: no changes", r.SnapshotN)
}
res := map[string]any{}
if r.Result != nil {
res = *r.Result