Ask each last workflow stage to merge as soon as it finishes

This commit is contained in:
Ian Gulliver
2026-10-21 08:46:51 -07:00
parent b34f9c1511
commit 279919c6cd
6 changed files with 20 additions and 27 deletions
+3 -3
View File
@@ -115,7 +115,7 @@ func (m *Manager) auditError(ctx context.Context, task api.Task, msg string) {
func auditBrief(branch, commit string) string {
return fmt.Sprintf("Audit of %s at %s. This isn't a review of a change: check the whole codebase as it stands against the project's standards and expectations, and fix what falls short. "+
"byre runs this task in the background: the human doesn't see it until you ask a question, call ready_for_merge or hit an error. "+
"Finish your stage with finish_stage as usual, even when you found nothing. Once the workflow has finished, byre asks whether the task is ready to merge; "+
"Finish your stage with finish_stage as usual, even when you found nothing. Once your stage has finished and its review has come back, byre asks whether the task is ready to merge;"+
"if nothing needed changing, answer with suggest_discard, and byre discards the task without bothering the human.", branch, commit)
}
@@ -129,12 +129,12 @@ func (m *Manager) dismissAudit(taskID string) {
if !task.Background || task.Status != api.TaskStatusActive {
return
}
finished, err := m.store.WorkflowFinished(ctx, *task.WorkflowRun)
output, _, err := m.store.StageResult(ctx, taskID)
if err != nil {
slog.Error("dismiss audit", "task", taskID, "err", err)
return
}
if !finished {
if output == "" {
return
}
_, err = m.Discard(ctx, task, "byre")