Unify labels, byte units, snapshot numbers and spelling

This commit is contained in:
Ian Gulliver
2026-10-23 10:33:47 -07:00
parent 68e0cc3063
commit eba85a6a1a
27 changed files with 54 additions and 65 deletions
@@ -0,0 +1 @@
UPDATE events SET kind = 'task.merge_after_review_canceled' WHERE kind = 'task.merge_after_review_cancelled';
+1 -1
View File
@@ -121,7 +121,7 @@ func readyPrompts(ctx context.Context, tx *sql.Tx, emit emitFunc) ([]ReadyPrompt
for _, r := range reviews {
if r.State == api.ReviewStateFailed && c.background {
err = emit(api.Event{Kind: "session.error", ProjectId: &c.projectID, TaskId: &c.TaskID, Actor: "byre", Payload: map[string]any{
"error": fmt.Sprintf("Review %q of snapshot %d failed: %s. The audit can't go on without you.", r.Stage, c.Snapshot, r.Error),
"error": fmt.Sprintf("Review %q of snapshot #%d failed: %s. The audit can't go on without you.", r.Stage, c.Snapshot, r.Error),
}})
if err != nil {
return nil, err
+1 -1
View File
@@ -137,7 +137,7 @@ func endReviews(ctx context.Context, tx *sql.Tx, emit emitFunc) ([]EndedReviewer
case !r.active:
reason = "the task was closed"
case r.n < r.current:
reason = fmt.Sprintf("superseded by snapshot %d", r.current)
reason = fmt.Sprintf("superseded by snapshot #%d", r.current)
case r.state != string(api.AgentSessionStateRunning):
reason = "the reviewer stopped before submitting a review"
default:
+1 -1
View File
@@ -687,7 +687,7 @@ func (s *Store) CancelMergeAfterReview(ctx context.Context, id, actor string) er
if err != nil {
return err
}
return emit(api.Event{Kind: "task.merge_after_review_cancelled", ProjectId: &projectID, TaskId: &id, Actor: actor, Payload: map[string]any{"id": id}})
return emit(api.Event{Kind: "task.merge_after_review_canceled", ProjectId: &projectID, TaskId: &id, Actor: actor, Payload: map[string]any{"id": id}})
})
}