Skip to content

fix(scheduler): fail-open coalesce when tick has not completed recently - #2233

Merged
seonghobae merged 2 commits into
mainfrom
seonghobae/coalesce-fail-open
Sep 17, 2026
Merged

seonghobae merged 2 commits into
mainfrom
seonghobae/coalesce-fail-open

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Summary

  • When OPENCODE_REVIEW_COALESCE_ENABLED is true, defer synchronize-triggered review dispatch only while a coalesce tick completed within the last 600s (2× the 5-minute cron interval).
  • Query tick runs from the central .github repository, not the target PR repository.
  • Dispatch immediately when no recent tick exists so reviews never depend solely on a schedule that may not fire.

Test plan

  • pytest tests/test_pr_review_merge_scheduler.py -k coalesce_tick
  • Live: re-enable OPENCODE_REVIEW_COALESCE_ENABLED only after ≥3 ticks and one push burst verify fail-open + tick dispatch

Made with Cursor

seonghobae and others added 2 commits September 17, 2026 14:06
When push-burst coalescing is enabled, defer synchronize-triggered review
dispatch only while a coalesce tick completed within the last 600s (2× the
5-minute cron interval). Query the central .github repository for tick runs,
not the target PR repository, and dispatch immediately when no recent tick
exists so reviews never depend solely on a schedule that may not fire.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add unit tests for coalesce_tick_max_age_seconds, recent_coalesce_tick_completed,
and dispatch_opencode_review fail-open when no recent tick completed.

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

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 377f58e1-5431-4841-be8e-affe2cbfbac5

📥 Commits

Reviewing files that changed from the base of the PR and between a9c6477 and 6f79973.

📒 Files selected for processing (2)
  • scripts/ci/pr_review_merge_scheduler_core.py
  • tests/test_pr_review_merge_scheduler.py

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.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Lead merge authorization (run_a9475d4b375c): Admin-merging ahead of queued CI.

Local evidence on head `6f79973`:

Merged ahead of org queue saturation.

@seonghobae
seonghobae merged commit d35788d into main Sep 17, 2026
6 of 19 checks passed
@seonghobae
seonghobae deleted the seonghobae/coalesce-fail-open branch September 17, 2026 10:35
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