Skip to content

fix(approval-flow): do not skip the polling interval - #236

Merged
snskArora merged 2 commits into
trstringer:mainfrom
lowie27:fix/poll-interval-skipped
Aug 28, 2026
Merged

snskArora merged 2 commits into
trstringer:mainfrom
lowie27:fix/poll-interval-skipped

Conversation

@lowie27

@lowie27 lowie27 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Fixes #235

The continue in the pending branch bypassed time.Sleep, so with close-issue-means-denial set
the loop sent 12 API calls per polling-interval-seconds instead of 1.

Measured against an httptest stub with the real newCommentLoopChannel, 1 second interval over
5.5 seconds:

before   72 API calls   13.1 per interval
after     6 API calls    1.1 per interval

make test and make lint pass locally (golangci-lint v2.10.1, 0 issues).

The measurement is a Go test I can add in a follow-up if you want it; left out here to keep this to
one line.

lizziemac
lizziemac previously approved these changes Aug 21, 2026
Added comments to clarify throttling logic for API calls and control flow in the loop.
@snskArora

Copy link
Copy Markdown
Collaborator

Note

Today the eleven-iteration burst completes in roughly one interval, so a closed issue is noticed within ~10s at defaults
After this fix, Issues.Get fires once every 11 intervals; ~110s at defaults, and ~11 minutes for anyone running polling-interval-seconds as 60.

@snskArora
snskArora merged commit 109c29a into trstringer:main Aug 28, 2026
@lowie27
lowie27 deleted the fix/poll-interval-skipped branch August 30, 2026 08:23
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.

close-issue-means-denial sends 12 API calls per polling interval instead of 1

3 participants