Conversation
Entire-Checkpoint: bd9be44c4666
PR SummaryMedium Risk Overview
Adds tests covering failed-condensation tracking, stop-time checkpoint creation, and trailer-based file discovery. Written by Cursor Bugbot for commit 9f40b26. Configure here. |
There was a problem hiding this comment.
Pull request overview
This PR addresses a Cursor-specific race where PostCommit may run before Cursor has finished writing its transcript/logs, causing condensation to fail at commit time; the fix ensures the checkpoint can be retried and finalized once the full transcript is available.
Changes:
- Track
TurnCheckpointIDswhen condensation was attempted even if it failed, enabling stop-time retry. - Extend stop-time finalization to create missing checkpoints from the full transcript when they weren’t created during
PostCommit. - Add test coverage for the failed-condensation/retry flow and for computing
FilesTouchedfrom a checkpoint trailer.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| cmd/entire/cli/strategy/manual_commit_hooks.go | Tracks attempted condensations and adds a stop-time fallback to create missing checkpoints, including a helper to infer touched files via git history. |
| cmd/entire/cli/strategy/phase_postcommit_test.go | Adds tests for the Cursor race condition flow (failed condensation → retry at turn end) plus helper behavior tests. |
You can also share your feedback on Copilot code review. Take the survey.
| repoDir, repoErr := paths.WorktreeRoot(ctx) | ||
| if repoErr != nil { | ||
| repoDir = "" |
| out, err := exec.CommandContext(ctx, "git", "-C", repoDir, | ||
| "log", "--all", "--grep=Entire-Checkpoint: "+cpID, "--format=%H", "-1").Output() |
| } | ||
|
|
||
| logging.Warn(logCtx, "finalize: failed to update checkpoint", | ||
| slog.String("checkpoint_id", cpIDStr), |
Entire-Checkpoint: 18e2aff440f3
This handles an issue with cursor where logs weren't ready when the hook expected them but were later when the commit was made so let's retry than.