A failed auto-commit still advances the workflow from the old HEAD

This commit is contained in:
Ian Gulliver
2026-10-16 12:49:45 -07:00
parent ecfae97d97
commit 3da0394116
3 changed files with 4 additions and 4 deletions
+3 -1
View File
@@ -871,13 +871,15 @@ func (m *Manager) turnEnded(ctx context.Context, l *live, res endResult) error {
m.mu.Unlock()
finished := !res.isError && !interrupted && strings.TrimSpace(res.result) != ""
handoff := compacting && finished
payload := res.payload
sha, err := git.CommitAll(l.dir, commitMessage(res), l.gitName, l.gitEmail)
if err != nil {
slog.Error("commit turn", "session", l.id, "err", err)
m.fileError(l, fmt.Sprintf("byre couldn't commit the turn's work, so the turn counts as unfinished: %v", err))
finished = false
}
handoff := compacting && finished
if sha != "" {
payload["commit"] = sha
}