worktrunk icon indicating copy to clipboard operation
worktrunk copied to clipboard

review-pr: unbounded CI polling recurrence — 55 min consumed in run 22837325148

Open worktrunk-bot opened this issue 8 months ago • 2 comments

Problem

The review-pr skill Step 5 ("Monitor CI") tells the bot to "Poll with gh pr checks every 60 seconds until all checks complete" (line 369) with no explicit cap on iterations. While the running-in-ci skill mentions "this may take up to 10 minutes" as a parenthetical, it's guidance rather than a hard instruction, and the review-pr skill doesn't reference it.

This allows the bot to poll indefinitely until the GitHub Actions workflow is externally cancelled.

Evidence

Run 22837325148 (claude-review for PR #1400, dependabot tempfile bump):

  • The bot correctly reviewed and approved the PR
  • Then entered CI monitoring, polling gh pr checks 1400 every 60 seconds
  • The benchmarks check was stuck pending (waiting for a runner)
  • The bot polled 55 times (~55 minutes) before being externally cancelled
  • No useful work was performed after the approval at iteration 1

Prior issues

This is a recurrence of:

  • #1186 — "Review bot wastes CI compute with unbounded polling" (closed 2026-02-24)
  • #1245 — "CI polling wastes compute due to skill discrepancy" (closed 2026-03-02)

Those issues led to skill text updates but did not add an explicit iteration cap.

Suggested fix

Add an explicit maximum of 10 polling iterations (10 minutes) to the review-pr skill's Step 5. After 10 iterations, the bot should stop polling and report that CI is still pending. The running-in-ci skill should also be updated to make the 10-minute guidance an explicit instruction rather than a parenthetical.

worktrunk-bot avatar Mar 09 '26 05:03 worktrunk-bot

let's have it poll for the required checks. but remove all existing changes here

max-sixty avatar Mar 09 '26 05:03 max-sixty

Updated #1403 — removed the iteration-cap approach and switched to gh pr checks --required in both skills instead. The bot will now only poll for required checks, so non-required checks like benchmarks won't cause unbounded waiting.

worktrunk-bot avatar Mar 09 '26 05:03 worktrunk-bot