A failed auto-commit still advances the workflow from the old HEAD
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user