Skip to content

feat(review): Add --wait-timeout - #13

Merged
nfebe merged 1 commit into
mainfrom
feat/review-wait-timeout
Oct 22, 2026
Merged

nfebe merged 1 commit into
mainfrom
feat/review-wait-timeout

Conversation

@nfebe

@nfebe nfebe commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Add --wait-timeout to sourceant review. It defaults to 10 minutes.

Sets how long review waits for the finished result. The default stays
ten minutes.
@sourceant

sourceant Bot commented Oct 21, 2026

Copy link
Copy Markdown

Code Review Summary

Adds a --wait-timeout duration flag to sourceant review, defaulting to the existing patience value (10 minutes). The timeout is validated as greater than zero before any request is sent, and is threaded into settled, which now uses it as the give-up deadline and caps each poll sleep so the loop stops closer to that deadline. Two tests cover a custom timeout and rejection of a zero timeout.

🚀 Key Improvements

  • internal/command/review.go: wait duration is now configurable per invocation instead of a fixed constant.
  • Poll sleep is capped by remaining time, so the loop no longer overshoots the deadline by one beat.
  • Invalid timeouts fail fast, before any repository or review requests are issued.

@sourceant sourceant Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review complete. See the overview comment for a summary.

@nfebe
nfebe merged commit 831d139 into main Oct 22, 2026
3 checks passed
@nfebe
nfebe deleted the feat/review-wait-timeout branch October 22, 2026 03:42
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