Skip to content

fix: make await-pause-point wait for a new hit on continuous markers - #2050

Merged
hatayama merged 3 commits into
feat/pause-point-feedback-r13-integrationfrom
fix/pause-point-await-new-hit
Jul 29, 2026
Merged

hatayama merged 3 commits into
feat/pause-point-feedback-r13-integrationfrom
fix/pause-point-await-new-hit

Conversation

@hatayama

@hatayama hatayama commented Jul 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • await-pause-point on an already-hit continuous/trace marker now waits for a later LastHitSequence instead of returning the stale Hit snapshot.
  • Baseline is allowlisted (continuous / trace only); empty Mode (older packages) and single-shot keep the historical immediate-Hit success path.
  • Timeout while waiting for that new hit stays PAUSE_POINT_WAIT_TIMEOUT and adds a hint to pass --resume-play or resume Play Mode.

User Impact

Agents awaiting a continuous marker a second time no longer mis-diagnose from an old hit. With --resume-play, resume still runs before polling so a post-resume hit can satisfy the wait.

Test plan

  • scripts/check-go-cli.sh (format / vet / lint / tests / rebuild)
  • New cases in pause_point_await_new_hit_test.go (new sequence / timeout+hint / single-shot immediate)
  • Existing resume-play / await / trigger wait tests still pass

Review in cubic

Already-hit continuous/trace markers stay Status=Hit, so a second await
was returning the stale snapshot. Baseline LastHitSequence at wait start
and require a later sequence; keep single-shot and empty Mode immediate.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@hatayama, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 31 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3acce685-df18-4496-8552-5436bacc3db3

📥 Commits

Reviewing files that changed from the base of the PR and between f0852c9 and 4710817.

📒 Files selected for processing (2)
  • cli/project-runner/internal/projectrunner/pause_point_enable.go
  • cli/project-runner/internal/projectrunner/pause_point_wait.go
📝 Walkthrough

Walkthrough

Pause-point waiting now tracks LastHitSequence baselines for already-hit continuous or trace markers, delays completion until a new hit, preserves armed markers on baseline timeouts, and reports a dedicated timeout hint. Tests cover baseline advancement, races, single-shot behavior, and updated return signatures.

Changes

Pause-point baseline waiting

Layer / File(s) Summary
Baseline-aware pause-point polling
cli/project-runner/internal/projectrunner/pause_point_wait.go, cli/project-runner/internal/projectrunner/pause_point_wait_poll.go
Continuous and trace markers establish a hit baseline, require sequence advancement before completing, and apply the same semantics during timeout and trigger-rejection status checks.
Baseline-aware timeout propagation
cli/project-runner/internal/projectrunner/pause_point_enable.go, cli/project-runner/internal/projectrunner/pause_point_wait.go, cli/project-runner/internal/projectrunner/pause_point_errors.go
The wait result carries baseline state into timeout handling, conditionally skips clearing the marker, and emits the already-hit/waiting-for-new hint when applicable.
Wait-flow regression and baseline tests
cli/project-runner/internal/projectrunner/*pause_point*_test.go
Tests cover sequence advancement, unchanged baselines, transient query failure, enable races, single-shot immediate completion, timeout hints, and callers updated for expanded return values.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Runner
  participant WaitForPausePoint
  participant Unity
  participant TimeoutError
  Runner->>WaitForPausePoint: start pause-point wait
  WaitForPausePoint->>Unity: query marker status
  Unity-->>WaitForPausePoint: already-hit continuous marker
  WaitForPausePoint->>Unity: poll LastHitSequence
  Unity-->>WaitForPausePoint: unchanged or advanced sequence
  WaitForPausePoint-->>Runner: hit result or timeout state
  Runner->>TimeoutError: build error with baseline state
  TimeoutError-->>Runner: baseline-specific hint
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: awaiting a new hit for already-hit continuous markers.
Description check ✅ Passed The description matches the changeset and explains the new wait, timeout hint, and test coverage.
Docstring Coverage ✅ Passed Docstring coverage is 84.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pause-point-await-new-hit

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

hatayama and others added 2 commits July 29, 2026 12:09
Skip timeout clear when waiting for a later sequence, leave baseline
undecided after a failed arm query, and never baseline enable --await
hits that race in before the first status poll.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@hatayama
hatayama merged commit a339f1b into feat/pause-point-feedback-r13-integration Jul 29, 2026
1 check was pending
@hatayama
hatayama deleted the fix/pause-point-await-new-hit branch July 29, 2026 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant