Skip to content

Commit 96013ab

Browse files
peyton-altclaude
andcommitted
fix(checkpoint): short-circuit cancelled contexts in backfillTranscript
Copilot review finding on #1824: backfillTranscript lacked the ctx.Err() guard its two backfill siblings have, so a cancelled context could still reach the (now potentially fetching) base resolution. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent b33b3c2 commit 96013ab

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

cmd/entire/cli/checkpoint/refs_store.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ func (s *gitRefsStore) writeSession(ctx context.Context, opts WriteOptions) erro
209209
}
210210

211211
func (s *gitRefsStore) backfillTranscript(ctx context.Context, opts UpdateOptions) error {
212+
if err := ctx.Err(); err != nil {
213+
return err //nolint:wrapcheck // Propagating context cancellation
214+
}
212215
if opts.CheckpointID.IsEmpty() {
213216
return errors.New("invalid update options: checkpoint ID is required")
214217
}

0 commit comments

Comments
 (0)